diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css index 93cc1e9f67..ac466c077e 100644 --- a/dashboard-ui/css/notifications.css +++ b/dashboard-ui/css/notifications.css @@ -84,7 +84,16 @@ } .btnMarkReadContainer, .btnNotificationListContainer { - padding: .5em; + padding: 0 .5em; +} + +.notificationsList { + border-bottom: 1px solid #ccc; +} + +.notificationsList .flyoutNotification { + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; } .imgNotification, .imgNotificationInner { diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js index b3e2087149..1b32889e0d 100644 --- a/dashboard-ui/scripts/notifications.js +++ b/dashboard-ui/scripts/notifications.js @@ -81,12 +81,14 @@ }); + self.isFlyout = true; + var startIndex = 0; var limit = 4; var elem = $('.notificationsFlyoutlist'); var markReadButton = $('.btnMarkReadContainer'); - refreshNotifications(startIndex, limit, elem, markReadButton); + refreshNotifications(startIndex, limit, elem, markReadButton, false); }; self.markNotificationsRead = function(ids, callback) { @@ -103,23 +105,23 @@ }; - self.showNotificationsList = function(startIndex, limit, elem, btn) { + self.showNotificationsList = function (startIndex, limit, elem, btn) { - refreshNotifications(startIndex, limit, elem, btn); + refreshNotifications(startIndex, limit, elem, btn, true); }; } - function refreshNotifications(startIndex, limit, elem, btn) { + function refreshNotifications(startIndex, limit, elem, btn, showPaging) { ApiClient.getNotifications(Dashboard.getCurrentUserId(), { StartIndex: startIndex, Limit: limit }).done(function (result) { - listUnreadNotifications(result.Notifications, result.TotalRecordCount, startIndex, limit, elem, btn); + listUnreadNotifications(result.Notifications, result.TotalRecordCount, startIndex, limit, elem, btn, showPaging); }); } - function listUnreadNotifications(list, totalRecordCount, startIndex, limit, elem, btn) { + function listUnreadNotifications(list, totalRecordCount, startIndex, limit, elem, btn, showPaging) { if (!totalRecordCount) { elem.html('

No unread notifications.

'); @@ -141,7 +143,7 @@ var html = ''; - if (totalRecordCount > limit) { + if (totalRecordCount > limit && showPaging === true) { var query = { StartIndex: startIndex, Limit: limit };