1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

cleaner jquery ready callback

This commit is contained in:
glaszig 2019-08-06 22:42:50 +02:00
parent 752e8ccf66
commit 47cc1bdc33

View File

@ -175,11 +175,7 @@ function updateCSRFTokens(event, xhr, settings) {
}
}
$(document)
.ajaxSend(setCSRFTokenHeader)
.ajaxComplete(updateCSRFTokens);
$().ready(function(){
function contentLoaded() {
pageCurrent = window.location.href.split("?")[1].split("=")[1];
pageCurrent = pageCurrent.replace("#","");
$('#side-menu').metisMenu();
@ -190,6 +186,9 @@ $().ready(function(){
setupBtns();
break;
}
});
}
$(document)
.ajaxSend(setCSRFTokenHeader)
.ajaxComplete(updateCSRFTokens)
.ready(contentLoaded);