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:
parent
752e8ccf66
commit
47cc1bdc33
13
js/custom.js
13
js/custom.js
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user