support for calling a function in data-afterload after loading div.ajax

This commit is contained in:
Uwe Steinmann 2021-03-12 10:01:20 +01:00
parent abaeb3ee10
commit 1bcae7a93b

View File

@ -447,6 +447,7 @@ $(document).ready( function() {
var view = element.data('view');
var action = element.data('action');
var query = element.data('query');
var afterload = $(this).data('afterload');
if(view && action) {
url = seeddms_webroot+base+"out/out."+view+".php?action="+action;
if(query) {
@ -477,6 +478,12 @@ $(document).ready( function() {
}
}
}); /* }}} */
if(afterload) {
var func = eval(afterload);
if(typeof func === "function"){
func();
}
}
});
}); /* }}} */
@ -490,6 +497,7 @@ $(document).ready( function() {
var view = element.data('view');
var action = element.data('action');
var query = element.data('query');
var afterload = $(this).data('afterload');
if(view && action) {
url = seeddms_webroot+base+"out/out."+view+".php?action="+action;
if(query) {
@ -538,6 +546,12 @@ $(document).ready( function() {
}); /* }}} */
if(callback)
callback.call();
if(afterload) {
var func = eval(afterload);
if(typeof func === "function"){
func();
}
}
});
}); /* }}} */