Index: lams_central/web/includes/javascript/progressBar.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/progressBar.js,v diff -u -r1.13.2.12 -r1.13.2.13 --- lams_central/web/includes/javascript/progressBar.js 4 Nov 2016 01:59:28 -0000 1.13.2.12 +++ lams_central/web/includes/javascript/progressBar.js 30 Nov 2016 21:35:39 -0000 1.13.2.13 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/includes/javascript/monitorLesson.js,v diff -u -r1.44.2.52 -r1.44.2.53 --- lams_monitoring/web/includes/javascript/monitorLesson.js 23 Nov 2016 10:06:50 -0000 1.44.2.52 +++ lams_monitoring/web/includes/javascript/monitorLesson.js 30 Nov 2016 21:36:33 -0000 1.44.2.53 @@ -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); }); } }