Index: lams_central/web/includes/javascript/dialog.js =================================================================== diff -u -r2d93f89a71df0d0d377702f08e33faac1753515d -rf23934c16665e4fbb311fd7f397e2600b4644539 --- lams_central/web/includes/javascript/dialog.js (.../dialog.js) (revision 2d93f89a71df0d0d377702f08e33faac1753515d) +++ lams_central/web/includes/javascript/dialog.js (.../dialog.js) (revision f23934c16665e4fbb311fd7f397e2600b4644539) @@ -272,7 +272,7 @@ } -//used by both main.jsp and /lti/addlesson.jsp pages +//used by both /lams_central/web/main.jsp and /lams_central/web/lti/addlesson.jsp pages function showAuthoringDialog(learningDesignID){ var dialog = showDialog('dialogAuthoring', { 'height' : Math.max(300, $(window).height() - 30), @@ -306,4 +306,39 @@ $('.modal-content', dialog).on('resizestop', function() { $('iframe', this)[0].contentWindow.GeneralLib.resizePaper(); }); +} + + +//used by both /lams_central/web/main.jsp and /lams_monitoring/web/monitor.jsp pages +function showNotificationsDialog(orgID, lessonID) { + // if screen is narrow, then it is much longer + var width = Math.max(380, Math.min(800, $(window).width() - 60)), + height = width < 798 ? 850 : 650; + height = Math.max(380, Math.min(height, $(window).height() - 30)); + + var id = "dialogNotifications" + (lessonID ? "Lesson" + lessonID : "Org" + orgID); + showDialog(id, { + 'data' : { + 'orgID' : orgID, + 'lessonID' : lessonID + }, + 'height': height, + 'width' : width, + 'title' : LABELS.EMAIL_NOTIFICATIONS_TITLE, + 'open' : function() { + var dialog = $(this), + lessonID = dialog.data('lessonID'); + // if lesson ID is given, use lesson view; otherwise use course view + if (lessonID) { + // load contents after opening the dialog + $('iframe', dialog).attr('src', LAMS_URL + + 'monitoring/emailNotifications.do?method=getLessonView&lessonID=' + + lessonID); + } else { + $('iframe', dialog).attr('src', LAMS_URL + + 'monitoring/emailNotifications.do?method=getCourseView&organisationID=' + + orgID); + } + } + }, true); } \ No newline at end of file Index: lams_central/web/includes/javascript/main.js =================================================================== diff -u -r5ccaa5d3f475e93053eb657ace948a855f865a90 -rf23934c16665e4fbb311fd7f397e2600b4644539 --- lams_central/web/includes/javascript/main.js (.../main.js) (revision 5ccaa5d3f475e93053eb657ace948a855f865a90) +++ lams_central/web/includes/javascript/main.js (.../main.js) (revision f23934c16665e4fbb311fd7f397e2600b4644539) @@ -404,40 +404,6 @@ } -function showNotificationsDialog(orgID, lessonID) { - // if screen is narrow, then it is much longer - var width = Math.max(380, Math.min(800, $(window).width() - 60)), - height = width < 798 ? 850 : 650; - height = Math.max(380, Math.min(height, $(window).height() - 30)); - - var id = "dialogNotifications" + (lessonID ? "Lesson" + lessonID : "Org" + orgID); - showDialog(id, { - 'data' : { - 'orgID' : orgID, - 'lessonID' : lessonID - }, - 'height': height, - 'width' : width, - 'title' : LABELS.EMAIL_NOTIFICATIONS_TITLE, - 'open' : function() { - var dialog = $(this), - lessonID = dialog.data('lessonID'); - // if lesson ID is given, use lesson view; otherwise use course view - if (lessonID) { - // load contents after opening the dialog - $('iframe', dialog).attr('src', LAMS_URL - + 'monitoring/emailNotifications.do?method=getLessonView&lessonID=' - + lessonID); - } else { - $('iframe', dialog).attr('src', LAMS_URL - + 'monitoring/emailNotifications.do?method=getCourseView&organisationID=' - + orgID); - } - } - }, true); -} - - function showPrivateNotificationsDialog(){ var notificationDialog = showDialog("dialogPrivateNotifications", { 'height': Math.max(380, Math.min(600, $(window).height() - 30)),