Index: lams_central/web/includes/javascript/progressBar.js =================================================================== diff -u -r2f284c5988e3026585cd0773eddf24893669f70a -r4818b288dd85a6e6b94bdead072dedd9d4003921 --- lams_central/web/includes/javascript/progressBar.js (.../progressBar.js) (revision 2f284c5988e3026585cd0773eddf24893669f70a) +++ lams_central/web/includes/javascript/progressBar.js (.../progressBar.js) (revision 4818b288dd85a6e6b94bdead072dedd9d4003921) @@ -45,19 +45,32 @@ }, isPreview = false, - controlFramePadding = 0; + controlFramePadding = 0, + // popup window size + popupWidth = 1280, + popupHeight = 720; + // ----- CONTROL FRAME & WINDOW MANIPULATION ----- // generic function for opening a pop up function openPopUp(url, title, h, w, status, forceNewWindow) { + + var width = screen.width; + var height = screen.height; + + var left = ((width / 2) - (w / 2)); + var top = ((height / 2) - (h / 2)); + if (forceNewWindow) { // opens a new window rather than loading content to existing one title += new Date().getTime(); } + window.open(url, title, "HEIGHT=" + h + ",WIDTH=" + w + ",resizable=yes,scrollbars=yes,status=" + status - + ",menubar=no, toolbar=no"); + + ",menubar=no, toolbar=no" + + ",top=" + top + ",left=" + left); } // just a short cut to openPopUp function @@ -67,8 +80,8 @@ if (!dialog.hasClass('ui-dialog')) { dialog.dialog({ 'autoOpen' : false, - 'height' : 600, - 'width' : 800, + 'height' : popupHeight, + 'width' : popupWidth, 'modal' : true, 'resizable' : false, 'hide' : 'fold', @@ -89,7 +102,7 @@ dialog.dialog('open'); } else { - openPopUp(url, "LearnerActivity", 600, 800, "yes"); + openPopUp(url, "LearnerActivity", popupHeight, popupWidth, "yes"); } } @@ -1198,4 +1211,4 @@ }); return true; -} \ No newline at end of file +} Index: lams_monitoring/web/includes/javascript/monitorLesson.js =================================================================== diff -u -r4bbff846d0964a517ddad7020fe6cf10536c347e -r4818b288dd85a6e6b94bdead072dedd9d4003921 --- lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision 4bbff846d0964a517ddad7020fe6cf10536c347e) +++ lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision 4818b288dd85a6e6b94bdead072dedd9d4003921) @@ -30,7 +30,10 @@ // double tap support tapTimeout = 500, lastTapTime = 0, - lastTapTarget = null; + lastTapTarget = null +// popup window size + popupWidth = 1280, + popupHeight = 720; //********** LESSON TAB FUNCTIONS ********** @@ -506,7 +509,7 @@ selectedLearner = $('.dialogList div.dialogListItemSelected', dialog); if (selectedLearner.length == 1) { // open pop up with user progress in the given activity - openPopUp(selectedLearner.attr('viewUrl'), "LearnActivity", 600, 800, true); + openPopUp(selectedLearner.attr('viewUrl'), "LearnActivity", popupHeight, popupWidth, true); } }); @@ -789,7 +792,7 @@ activityGroup.css('cursor', 'pointer'); dblTap(activityGroup, function(){ // double click on activity shape to open Monitoring for this activity - openPopUp(LAMS_URL + activity.url, "MonitorActivity", 720, 900, true, true); + openPopUp(LAMS_URL + activity.url, "MonitorActivity", popupHeight, popupWidth, true, true); }); } }); @@ -1116,7 +1119,7 @@ event.stopPropagation(); var url = LAMS_URL + 'monitoring/monitoring.do?method=getLearnerActivityURL&userID=' + learner.id + '&activityID=' + activity.id + '&lessonID=' + lessonId; - openPopUp(url, "LearnActivity", 600, 800, true); + openPopUp(url, "LearnActivity", popupHeight, popupWidth, true); }); } @@ -1910,7 +1913,7 @@ if (allowView){ dblTap(learnerDiv, function(){ // same as clicking View Learner button - openPopUp(viewUrl, "LearnActivity", 600, 800, true); + openPopUp(viewUrl, "LearnActivity", popupHeight, popupWidth, true); }); } }