|
|
@ -128,22 +128,22 @@ function loadNewNotifications() {
|
|
|
|
if (responsePayload["notifications"]) {
|
|
|
|
if (responsePayload["notifications"]) {
|
|
|
|
if (responsePayload.count > 0) {
|
|
|
|
if (responsePayload.count > 0) {
|
|
|
|
viewModel["notifications"] = responsePayload["notifications"];
|
|
|
|
viewModel["notifications"] = responsePayload["notifications"];
|
|
|
|
viewModel["appContext"] = context;
|
|
|
|
// viewModel["appContext"] = context;
|
|
|
|
$(messageSideBar).html(template(viewModel));
|
|
|
|
$(messageSideBar).html(template(viewModel));
|
|
|
|
} else {
|
|
|
|
} 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 {
|
|
|
|
} else {
|
|
|
|
$(messageSideBar).html("<h4 class ='message-danger'>Unexpected error " +
|
|
|
|
$(messageSideBar).html("<h4 class ='message-danger text-center'>Unexpected error " +
|
|
|
|
"occurred while loading new notifications.</h4>");
|
|
|
|
"occurred while loading new notifications</h4>");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// on error
|
|
|
|
// on error
|
|
|
|
function (jqXHR) {
|
|
|
|
function (jqXHR) {
|
|
|
|
if (jqXHR.status = 500) {
|
|
|
|
if (jqXHR.status = 500) {
|
|
|
|
$(messageSideBar).html("<h4 class ='message-danger'>Unexpected error occurred while trying " +
|
|
|
|
$(messageSideBar).html("<h4 class ='message-danger text-center'>Unexpected error occurred while trying " +
|
|
|
|
"to retrieve any new notifications.</h4>");
|
|
|
|
"to retrieve any new notifications</h4>");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|