Refactoring notifications side-pane - EMM UI

revert-dabc3590
dilanua 8 years ago
parent b65e99a4a7
commit 00448814e8

@ -94,10 +94,11 @@
{{#zone "sidePanes"}}
<!--suppress HtmlUnknownAttribute -->
<div class="sidebar-wrapper" id="right-sidebar" is-authorized="{{permissions.LIST_NOTIFICATIONS}}"
data-side="right" data-width="320" data-sidebar-fixed="true" data-fixed-offset="50" data-spy="affix"
data-offset-top="80">
<ul class="sidebar-messages">
</ul>
data-side="right" data-width="320" data-sidebar-fixed="true" data-fixed-offset="60" data-spy="affix"
data-offset-top="80">
<br>
<ul class="sidebar-messages"></ul>
<br>
<div class="text-center"><a href="{{appContext}}notification-listing" class="btn btn-primary">Show all notifications</a></div>
</div>
{{/zone}}

@ -128,22 +128,22 @@ function loadNewNotifications() {
if (responsePayload["notifications"]) {
if (responsePayload.count > 0) {
viewModel["notifications"] = responsePayload["notifications"];
viewModel["appContext"] = context;
// viewModel["appContext"] = context;
$(messageSideBar).html(template(viewModel));
} else {
$(messageSideBar).html('<div class="alert alert-info" role="alert"><i class="icon fw fw-info"></i>No new notifications found...</div>');
$(messageSideBar).html("<h4 class='text-center'>No new notifications found</h4>");
}
} else {
$(messageSideBar).html("<h4 class ='message-danger'>Unexpected error " +
"occurred while loading new notifications.</h4>");
$(messageSideBar).html("<h4 class ='message-danger text-center'>Unexpected error " +
"occurred while loading new notifications</h4>");
}
}
},
// on error
function (jqXHR) {
if (jqXHR.status = 500) {
$(messageSideBar).html("<h4 class ='message-danger'>Unexpected error occurred while trying " +
"to retrieve any new notifications.</h4>");
$(messageSideBar).html("<h4 class ='message-danger text-center'>Unexpected error occurred while trying " +
"to retrieve any new notifications</h4>");
}
}
);

Loading…
Cancel
Save