Index: lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java =================================================================== diff -u -r0a60188d27bdb965b5bd1b989bd7ac83c622e0aa -r67dfbf3258ae491f495d918b8c397819ffed018f --- lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java (.../DisplayGroupAction.java) (revision 0a60188d27bdb965b5bd1b989bd7ac83c622e0aa) +++ lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java (.../DisplayGroupAction.java) (revision 67dfbf3258ae491f495d918b8c397819ffed018f) @@ -176,13 +176,12 @@ + "/findUserLessons.do?dispatch=getResults&courseID=" + org.getOrganisationId() + "&KeepThis=true&TB_iframe=true&height=400&width=600", "search-lesson thickbox" + org.getOrganisationId(), null, "index.searchlesson.tooltip")); - + // Adding course notifications links if enabled - if (org.getEnableCourseNotifications() && (contains(roles, Role.ROLE_GROUP_MANAGER) || contains(roles, Role.ROLE_MONITOR))) { - moreLinks.add(new IndexLinkBean("index.emailnotifications", Configuration.get(ConfigurationKeys.SERVER_URL) - + "/monitoring/emailNotifications.do?method=getCourseView&organisationID=" - + org.getOrganisationId() + "&KeepThis=true&TB_iframe=true&height=500&width=800", - "course-notifications thickbox" + org.getOrganisationId(), null, + if (org.getEnableCourseNotifications() + && (contains(roles, Role.ROLE_GROUP_MANAGER) || contains(roles, Role.ROLE_MONITOR))) { + moreLinks.add(new IndexLinkBean("index.emailnotifications", "javascript:showNotificationsDialog(" + + org.getOrganisationId() + ",null)", "course-notifications", null, "index.emailnotifications.tooltip")); } @@ -356,11 +355,9 @@ // Adding lesson notifications links if enabled if (isGroupManagerOrMonitor && bean.isEnableLessonNotifications()) { - String emailnotificationsUrl = Configuration.get(ConfigurationKeys.SERVER_URL) - + "/monitoring/emailNotifications.do?method=getLessonView&lessonID=" + bean.getId() - + "&KeepThis=true&TB_iframe=true&height=560&width=800"; - lessonLinks.add(new IndexLinkBean("index.emailnotifications", emailnotificationsUrl, - "thickbox" + orgId, "mycourses-notifications-img", "index.emailnotifications.tooltip")); + lessonLinks.add(new IndexLinkBean("index.emailnotifications", "javascript:showNotificationsDialog(null," + + bean.getId() + ")", null, "mycourses-notifications-img", + "index.emailnotifications.tooltip")); } // Adding gradebook course monitor links if enabled Index: lams_central/src/java/org/lamsfoundation/lams/web/EmailUserAction.java =================================================================== diff -u -r1edbb81f16cedfcc1326e4eca6e520b5b48cbddc -r67dfbf3258ae491f495d918b8c397819ffed018f --- lams_central/src/java/org/lamsfoundation/lams/web/EmailUserAction.java (.../EmailUserAction.java) (revision 1edbb81f16cedfcc1326e4eca6e520b5b48cbddc) +++ lams_central/src/java/org/lamsfoundation/lams/web/EmailUserAction.java (.../EmailUserAction.java) (revision 67dfbf3258ae491f495d918b8c397819ffed018f) @@ -169,7 +169,8 @@ } if (!StringUtils.isBlank(orgId)) { result = getUserManagementService().isUserInRole(currentUser.getUserID(), new Integer(orgId), - Role.MONITOR); + Role.MONITOR) || getUserManagementService().isUserInRole(currentUser.getUserID(), new Integer(orgId), + Role.GROUP_MANAGER); } } Index: lams_central/web/includes/javascript/groupDisplay.js =================================================================== diff -u -r910872499b502ccfcae4f620bedb1fa7e1b991ad -r67dfbf3258ae491f495d918b8c397819ffed018f --- lams_central/web/includes/javascript/groupDisplay.js (.../groupDisplay.js) (revision 910872499b502ccfcae4f620bedb1fa7e1b991ad) +++ lams_central/web/includes/javascript/groupDisplay.js (.../groupDisplay.js) (revision 67dfbf3258ae491f495d918b8c397819ffed018f) @@ -73,8 +73,10 @@ }, success: function(html) { jQuery(courseBg).append(html); - // unregister and re-register thickbox for this group in order to avoid double - // registration of thickbox for existing elements (i.e. group 'add lesson' link) + // unregister and re-register thickbox for this + // group in order to avoid double + // registration of thickbox for existing elements + // (i.e. group 'add lesson' link) $('a.thickbox'+jQuery(courseBg).attr("id")).unbind("click"); tb_init('a.thickbox'+jQuery(courseBg).attr("id")); } @@ -139,7 +141,8 @@ var $originals = tr.children(); var $helper = tr.clone(); $helper.children().each(function(index) { - // Set helper cell sizes to match the original sizes + // Set helper cell sizes to match the original + // sizes $(this).width($originals.eq(index).width()) }); return $helper; @@ -167,4 +170,38 @@ } }).disableSelection();; } - //--> \ No newline at end of file + + function showMonitorLessonDialog(lessonID){ + $("#monitorDialog").dialog('option', 'lessonID', lessonID) + .dialog('open'); + } + + function showAddLessonDialog(orgID){ + $("#addLessonDialog").dialog('option', 'orgID', orgID) + .dialog('open'); + } + + function showNotificationsDialog(organisationID, lessonID){ + $("#notificationsDialog").dialog('option', { + 'orgID' : organisationID, + 'lessonID': lessonID + }).dialog('open'); + } + + function closeAddLessonDialog(refresh) { + $('#addLessonFrame').attr('src', null); + // was the dialog just closed or a new lesson really added? + // if latter, refresh the list + $("#addLessonDialog").dialog('option', 'refresh', refresh ? true : false) + .dialog('close'); + } + + function closeMonitorLessonDialog(refresh) { + $('#monitorFrame').attr('src', null); + // was the dialog just closed or a new lesson really added? + // if latter, refresh the list + $("#monitorDialog").dialog('option', 'refresh', refresh ? true : false) + .dialog('close'); + } + + // --> Index: lams_central/web/main.jsp =================================================================== diff -u -re34e4f27264febfd215f34616a05f7d02294de85 -r67dfbf3258ae491f495d918b8c397819ffed018f --- lams_central/web/main.jsp (.../main.jsp) (revision e34e4f27264febfd215f34616a05f7d02294de85) +++ lams_central/web/main.jsp (.../main.jsp) (revision 67dfbf3258ae491f495d918b8c397819ffed018f) @@ -51,30 +51,6 @@