Index: lams_central/src/java/org/lamsfoundation/lams/web/NotificationAction.java =================================================================== diff -u -r51fb2a37254f24bb2a805d4ffd54482c779f43fa -ra49ad1a34b02a266e498b34eac28a2997e1fd69a --- lams_central/src/java/org/lamsfoundation/lams/web/NotificationAction.java (.../NotificationAction.java) (revision 51fb2a37254f24bb2a805d4ffd54482c779f43fa) +++ lams_central/src/java/org/lamsfoundation/lams/web/NotificationAction.java (.../NotificationAction.java) (revision a49ad1a34b02a266e498b34eac28a2997e1fd69a) @@ -63,11 +63,8 @@ List subscriptions = getEventNotificationService().getNotificationSubscriptions(null, getUser().getUserID(), false, limit, offset); JSONArray responseJSON = new JSONArray(); - Event event = null; for (Subscription subscription : subscriptions) { - if (event == null) { - event = subscription.getEvent(); - } + Event event = subscription.getEvent(); JSONObject subscriptionJSON = new JSONObject(); subscriptionJSON.put("subscriptionUid", subscription.getUid()); subscriptionJSON.put("message", event.getMessage()); Index: lams_central/web/css/main.css =================================================================== diff -u -rb594c93f7d31529431ae41c1cbb82ae81b81f771 -ra49ad1a34b02a266e498b34eac28a2997e1fd69a --- lams_central/web/css/main.css (.../main.css) (revision b594c93f7d31529431ae41c1cbb82ae81b81f771) +++ lams_central/web/css/main.css (.../main.css) (revision a49ad1a34b02a266e498b34eac28a2997e1fd69a) @@ -393,25 +393,23 @@ padding: 3px; } -#dialogPrivateNotifications table tr:first-child td { +#tablePrivateNotifications tr:first-child td { font-weight: bold; text-align: center; } -#dialogPrivateNotifications td.notificationsReadCell { +#tablePrivateNotifications td.notificationsReadCell { font-size: 16px; width: 30px; text-align: center; } -#dialogPrivateNotifications td.notificationsPendingCell { +#tablePrivateNotifications td.notificationsPendingCell { font-weight: bold; } -#dialogPrivateNotifications td.notificationsClickableCell:hover { +#tablePrivateNotifications td.notificationsClickableCell:hover { cursor: pointer; - border-color: #9be0f9; - background-color: #F0F8FF; /* CSS3 glow effect: */ -moz-border-radius: 6px; -webkit-border-radius: 6px; Index: lams_central/web/includes/javascript/main.js =================================================================== diff -u -r03fac710f2f2b245573637fbad274540608e1206 -ra49ad1a34b02a266e498b34eac28a2997e1fd69a --- lams_central/web/includes/javascript/main.js (.../main.js) (revision 03fac710f2f2b245573637fbad274540608e1206) +++ lams_central/web/includes/javascript/main.js (.../main.js) (revision a49ad1a34b02a266e498b34eac28a2997e1fd69a) @@ -458,109 +458,34 @@ function showPrivateNotificationsDialog(){ - showDialog("dialogPrivateNotifications", { - 'height' : 470, - 'width' : 600, + var notificationDialog = showDialog("dialogPrivateNotifications", { + 'height' : 650, + 'width' : 'auto', 'title' : LABELS.PRIVATE_NOTIFICATIONS_TITLE, 'close' : function(){ refreshPrivateNotificationCount(); - // completely delete the dialog $(this).remove(); }, 'open' : function() { - // build the table from the scratch - var dialog = $(this), - table = $('').appendTo(dialog), - // table header - headerRow = $('').appendTo(table); - $('').attr('id', 'subscription-' + notification.subscriptionUid) - .appendTo(table), - messageCell = $('
').text(LABELS.PRIVATE_NOTIFICATIONS_MESSAGES).appendTo(headerRow); - // click it to mark all notifications as read - $('').text(LABELS.PRIVATE_NOTIFICATIONS_READ) - .attr('title', LABELS.PRIVATE_NOTIFICATIONS_READ_ALL_HINT) - .click(markAllPrivateNotificationsAsRead) - .appendTo(headerRow); - $('iframe', dialog).remove(); - $.ajax({ - cache : false, - url : LAMS_URL + "notification.do", - dataType : 'json', - data : { - 'method' : 'getNotificationSubscriptions', - // maybe it will change for paging; "offset" param is also available - 'limit' : 10 - }, - success : function(notifications) { - if (!notifications) { - return; - } - - // build notification rows one by one - $.each(notifications, function(){ - var notification = this, - row = $('
').appendTo(row), - readCell = $('') - .appendTo(row); - // is it a link? - if (notification.message.indexOf(' td') - // message cell - .first().removeClass('notificationsPendingCell') - // read cell - .next().html('✔').removeClass('notificationsClickableCell').attr('title', null).off('click'); } - }); + }, false); + } function refreshPrivateNotificationCount(){ Index: lams_central/web/notificationsprivate.jsp =================================================================== diff -u --- lams_central/web/notificationsprivate.jsp (revision 0) +++ lams_central/web/notificationsprivate.jsp (revision a49ad1a34b02a266e498b34eac28a2997e1fd69a) @@ -0,0 +1,134 @@ + + +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> + +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-html" prefix="html"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-core" prefix="c"%> + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+
+ +