Index: lams_central/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_central/conf/language/lams/ApplicationResources.properties,v diff -u -r1.138.2.29 -r1.138.2.30 --- lams_central/conf/language/lams/ApplicationResources.properties 26 Oct 2016 15:29:14 -0000 1.138.2.29 +++ lams_central/conf/language/lams/ApplicationResources.properties 28 Oct 2016 02:49:07 -0000 1.138.2.30 @@ -699,5 +699,6 @@ label.password.must.ucase =at least 1 upper case letter label.password.must.number=at least 1 number label.password.must.symbol =at least 1 symbol +label.email.send.me.a.copy=Send me a copy #======= End labels: Exported 439 labels for en AU ===== Index: lams_central/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_central/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.111.2.14 -r1.111.2.15 --- lams_central/conf/language/lams/ApplicationResources_en_AU.properties 26 Oct 2016 15:29:14 -0000 1.111.2.14 +++ lams_central/conf/language/lams/ApplicationResources_en_AU.properties 28 Oct 2016 02:49:07 -0000 1.111.2.15 @@ -698,6 +698,6 @@ label.password.must.ucase =at least 1 upper case letter label.password.must.number=at least 1 number label.password.must.symbol =at least 1 symbol +label.email.send.me.a.copy=Send me a copy - #======= End labels: Exported 439 labels for en AU ===== Index: lams_central/web/emailuser.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/emailuser.jsp,v diff -u -r1.3.2.4 -r1.3.2.5 --- lams_central/web/emailuser.jsp 14 Oct 2016 07:44:29 -0000 1.3.2.4 +++ lams_central/web/emailuser.jsp 28 Oct 2016 02:49:07 -0000 1.3.2.5 @@ -57,12 +57,13 @@ function closeDialog() { if (returnUrl == '') { - // if this page is in dialog, close it - if (parent.closeEmailDialog) { - parent.closeEmailDialog(); + if (window.parent.closeEmailDialog) { + window.parent.closeEmailDialog(); + } else if (closeEmailDialog) { + closeEmailDialog(); } else { // if this is a pop up, close it - window.close(); + close(); } } else { // if it is a main page, navigate away @@ -113,31 +114,25 @@ -
- + - <> - -
+ <> + + - -
+ id="cc-email-enabled" />
- + -    - - +   
@@ -148,7 +143,7 @@
-
Index: lams_central/web/main.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/main.jsp,v diff -u -r1.77.2.28 -r1.77.2.29 --- lams_central/web/main.jsp 27 Oct 2016 16:02:36 -0000 1.77.2.28 +++ lams_central/web/main.jsp 28 Oct 2016 02:49:07 -0000 1.77.2.29 @@ -85,6 +85,8 @@ MY_PROFILE : '', REMOVE_ORG_FAVORITE : '', MARK_ORG_FAVORITE : '', + EMAIL_TITLE : '', + }, stateId = 1, // TODO Figure out when stateId is required to be equal 3. Old version code: stateId = tabName == 'profile' ? 3 : 1; activeOrgId = null${lastVisitedOrganisationId}; Index: lams_central/web/includes/javascript/dialog.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/dialog.js,v diff -u -r1.1.2.12 -r1.1.2.13 --- lams_central/web/includes/javascript/dialog.js 27 Oct 2016 05:57:29 -0000 1.1.2.12 +++ lams_central/web/includes/javascript/dialog.js 28 Oct 2016 02:49:07 -0000 1.1.2.13 @@ -26,6 +26,7 @@ * If not, creates a new dialog with the given ID and init parameters. */ function showDialog(id, initParams, extraButtons, recreate) { + var dialog = $('#' + id); // is it open already? if (dialog.length > 0) { Index: lams_central/web/includes/javascript/main.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/Attic/main.js,v diff -u -r1.1.2.2 -r1.1.2.3 --- lams_central/web/includes/javascript/main.js 27 Oct 2016 16:02:36 -0000 1.1.2.2 +++ lams_central/web/includes/javascript/main.js 28 Oct 2016 02:49:07 -0000 1.1.2.3 @@ -327,6 +327,7 @@ function showMonitorLessonDialog(lessonID) { + var id = "dialogMonitorLesson" + lessonID, dialog = showDialog(id, { 'data' : { @@ -343,7 +344,7 @@ + $(this).data('lessonID')); }, - }, true); + }, true, true); // if it was just created if (dialog) { @@ -373,7 +374,7 @@ 'data' : { 'orgID' : orgID }, - 'modal' : true, + 'modal' : false, 'height' : 740, 'width' : 'auto', 'title' : LABELS.ADD_LESSON_TITLE, @@ -427,7 +428,7 @@ 'toolID' : toolID, 'learningLibraryID' : learningLibraryID }, - 'modal' : true, + 'modal' : false, 'height' : 600, 'width' : 'auto', 'title' : LABELS.SINGLE_ACTIVITY_LESSON_TITLE, @@ -474,6 +475,7 @@ }, 'height' : 650, 'width' : 'auto', + 'modal' : false, 'title' : LABELS.EMAIL_NOTIFICATIONS_TITLE, 'open' : function() { var dialog = $(this), @@ -621,13 +623,14 @@ 'orgID' : orgID, 'height' : 650, 'width' : 'auto', + 'modal' : false, 'title' : LABELS.GRADEBOOK_COURSE_TITLE, 'open' : function() { var orgID = $(this).dialog('option', 'orgID'); // load contents after opening the dialog $('iframe', this).attr('src', LAMS_URL + 'gradebook/gradebookMonitoring.do?dispatch=courseMonitor&organisationID=' + orgID); - $(this).css("maxWidth", "850").css("margin", "auto"); + $(this).css("maxWidth", "800px").css("margin", "auto"); } }, true); } @@ -640,12 +643,13 @@ }, 'height' : 650, 'width' : 'auto', + 'modal' : false, 'title' : LABELS.GRADEBOOK_LESSON_TITLE, 'open' : function() { var lessonID = $(this).data('lessonID'); // load contents after opening the dialog $('iframe', this).attr('src', LAMS_URL + 'gradebook/gradebookMonitoring.do?lessonID=' + lessonID); - $(this).css("maxWidth", "850").css("margin", "auto"); + $(this).css("maxWidth", "800px").css("margin", "auto"); } }, true); } @@ -660,13 +664,14 @@ }, 'height' : 400, 'width' : 'auto', + 'modal' : false, 'title' : LABELS.GRADEBOOK_LEARNER_TITLE, 'open' : function() { var orgID = $(this).data('orgID'); // load contents after opening the dialog $('iframe', this).attr('src', LAMS_URL + 'gradebook/gradebookLearning.do?dispatch=courseLearner&organisationID=' + orgID); - $(this).css("maxWidth", "750").css("margin", "auto"); + $(this).css("maxWidth", "750px").css("margin", "auto"); } }, true); } @@ -679,6 +684,7 @@ }, 'height' : 750, 'width' : 'auto', + 'modal' : false, 'title' : LABELS.CONDITIONS_TITLE, 'open' : function() { var lessonID = $(this).data('lessonID'); @@ -698,6 +704,7 @@ }, 'height' : 400, 'width' : 'auto', + 'modal' : false, 'title' : LABELS.SEARCH_LESSON_TITLE, 'open' : function() { var orgID = $(this).data('orgID'); @@ -821,4 +828,35 @@ }); } } -} \ No newline at end of file +} + + +function showEmailDialog(userId, lessonId){ + + var dialog = showDialog("dialogEmail", { + 'autoOpen' : true, + 'height' : 700, + 'width' : 700, + 'modal' : true, + 'resizable' : true, + 'title' : LABELS.EMAIL_TITLE, + 'open' : function(){ + autoRefreshBlocked = true; + var dialog = $(this); + // load contents after opening the dialog + $('iframe', dialog).attr('src', + LAMS_URL + 'emailUser.do?method=composeMail&lessonID=' + lessonId + + '&userID=' + userId); + }, + 'close' : function(){ + autoRefreshBlocked = false; + $(this).remove(); + } + }, false, true); +} + + +function closeEmailDialog(){ + $('#dialogEmail').modal('hide'); +} +