Revert "Merge branch 'notifications_refresh' into 'master'"

This reverts merge request !1215
This commit is contained in:
Ariel Rin
2020-06-04 11:21:50 +00:00
parent 3a984e8a4d
commit ae3f5a0f62
6 changed files with 12 additions and 63 deletions

View File

@@ -1,27 +0,0 @@
/*
Javascript for the base template
*/
$(function() {
var elem = document.getElementById("dataExport");
var notificationsRenderUrl = elem.getAttribute("data-notificationsRenderUrl");
// render the notifications item in the top menu
function render_notifications(){
$("#menu_item_notifications").load(
notificationsRenderUrl,
function(responseTxt, statusTxt, xhr){
if(statusTxt == "error")
console.log(
"Failed to load HTMl to render notifications item. Error: "
+ xhr.status
+ ": "
+ xhr.statusText
);
});
}
render_notifications()
// re-render notifications every x seconds
setInterval(render_notifications, 5000);
});