Refactoring notifications side-pane - UI

revert-70aa11f8
dilanua 8 years ago
parent 9a095fa670
commit ce1a063688

@ -102,23 +102,23 @@ function loadNewNotifications() {
if (responsePayload.count > 0) { if (responsePayload.count > 0) {
$(messageSideBar).html(template(viewModel)); $(messageSideBar).html(template(viewModel));
} else { } else {
$(messageSideBar).html("<h4 class='text-center'>No new notifications found...</h4>"); $(messageSideBar).html("<h4 class='text-center'>No new notifications found</h4>");
} }
} else { } 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>");
} }
} }
}; };
var errorCallback = function (jqXHR) { var errorCallback = 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>");
} }
}; };
invokerUtil.get(serviceURL, successCallback, errorCallback); invokerUtil.get(serviceURL, successCallback, errorCallback);
}); });
} else { } else {
$(messageSideBar).html("<h4 class ='message-danger'>You are not authorized to view notifications</h4>"); $(messageSideBar).html("<h4 class ='message-danger text-center'>You are not authorized to view notifications</h4>");
} }
} }

Loading…
Cancel
Save