Index: lams_central/web/author.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/author.jsp,v diff -u -r1.29 -r1.30 --- lams_central/web/author.jsp 23 Oct 2006 03:28:40 -0000 1.29 +++ lams_central/web/author.jsp 27 Oct 2006 02:15:53 -0000 1.30 @@ -40,6 +40,7 @@ var thePopUp = null; var theFilePopUp = null; +var previewWin = null; var previewSessionId = null; function getWindowSize() { @@ -143,9 +144,25 @@ openPopUp(url, title, h, w, resize, status, scrollbar, menubar, toolbar); } -function openPreview(args){ - window.opener.openPreview(args); -} +function openPreview( lessonId ) + { + if(mac) + { + previewWin = window.open('home.do?method=learner&mode=preview&lessonID='+lessonId,'pWindow','width=796,height=570,resizable,status=yes'); + } + else + { + if(previewWin && !previewWin.closed ) + { + previewWin.location = 'home.do?method=learner&mode=preview&lessonID='+lessonId; + previewWin.focus(); + } + else + { + previewWin = window.open('home.do?method=learner&mode=preview&lessonID='+lessonId,'pWindow','width=796,height=570,resizable,status=yes'); + } + } + } function openURL(args){ window.open(args); Index: lams_central/web/includes/javascript/openUrls.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/openUrls.js,v diff -u -r1.19 -r1.20 --- lams_central/web/includes/javascript/openUrls.js 19 Oct 2006 06:08:16 -0000 1.19 +++ lams_central/web/includes/javascript/openUrls.js 27 Oct 2006 02:15:52 -0000 1.20 @@ -9,7 +9,6 @@ var authorWin = null; var learnWin = null; - var previewWin = null; var monitorLessonWin = null; var addLessonWin = null; var epWin = null; @@ -21,7 +20,6 @@ function closeAllChildren(){ if (authorWin && !authorWin.closed) authorWin.close(); if (learnWin && !learnWin.closed) learnWin.close(); - if (previewWin && !previewWin.closed) previewWin.close(); if (monitorLessonWin && !monitorLessonWin.closed) monitorLessonWin.close(); if (addLessonWin && !addLessonWin.closed) addLessonWin.close(); if (epWin && !epWin.closed) epWin.close(); @@ -145,25 +143,6 @@ } } - function openPreview( lessonId ) - { - if(isMac) - { - previewWin = window.open('home.do?method=learner&mode=preview&lessonID='+lessonId,'pWindow','width=796,height=570,resizable,status=yes'); - } - else - { - if(previewWin && !previewWin.closed ) - { - previewWin.location = 'home.do?method=learner&mode=preview&lessonID='+lessonId; - previewWin.focus(); - } - else - { - previewWin = window.open('home.do?method=learner&mode=preview&lessonID='+lessonId,'pWindow','width=796,height=570,resizable,status=yes'); - } - } - } function openExportPortfolio( lessonId ) {