mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
add SeeddmsAjax for running function after updating div.ajax
This commit is contained in:
parent
22915df3e1
commit
ea5218ea03
|
@ -492,6 +492,7 @@ $(document).ready( function() {
|
|||
}
|
||||
}
|
||||
initMost();
|
||||
SeedDMSAjax.run(view, action);
|
||||
});
|
||||
}); /* }}} */
|
||||
|
||||
|
@ -542,6 +543,7 @@ $(document).ready( function() {
|
|||
}
|
||||
}
|
||||
initMost();
|
||||
SeedDMSAjax.run(view, action);
|
||||
});
|
||||
}); /* }}} */
|
||||
|
||||
|
@ -1366,3 +1368,27 @@ $(document).ready(function() { /* {{{ */
|
|||
timeOutId = setTimeout(SeedDMSTask.run, timeout);
|
||||
}
|
||||
}( window.SeedDMSTask = window.SeedDMSTask || {}, jQuery )); /* }}} */
|
||||
|
||||
(function( SeedDMSAjax, $, undefined ) { /* {{{ */
|
||||
var tasks = Array(
|
||||
{name: 'test', view: 'null', action: null, func:
|
||||
test = function() {
|
||||
console.log('Run in SeedDMSAjax');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
SeedDMSAjax.add = function(task) {
|
||||
tasks.push(task);
|
||||
}
|
||||
|
||||
SeedDMSAjax.run = function(view, action) {
|
||||
for(let task of tasks) {
|
||||
//console.log('Checking for '+view+':'+action);
|
||||
if(task.view == null || (task.view == view && task.action == null) || (task.view == view && task.action == action)) {
|
||||
//console.log('Running '+task.name+' after update for '+view+':'+action);
|
||||
task.func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}( window.SeedDMSAjax = window.SeedDMSAjax || {}, jQuery )); /* }}} */
|
||||
|
|
|
@ -523,6 +523,7 @@ $(document).ready( function() {
|
|||
}
|
||||
}
|
||||
initMost();
|
||||
SeedDMSAjax.run(view, action);
|
||||
});
|
||||
}); /* }}} */
|
||||
|
||||
|
@ -573,6 +574,7 @@ $(document).ready( function() {
|
|||
}
|
||||
}
|
||||
initMost();
|
||||
SeedDMSAjax.run(view, action);
|
||||
});
|
||||
}); /* }}} */
|
||||
|
||||
|
@ -1422,3 +1424,27 @@ $(document).ready(function() { /* {{{ */
|
|||
timeOutId = setTimeout(SeedDMSTask.run, timeout);
|
||||
}
|
||||
}( window.SeedDMSTask = window.SeedDMSTask || {}, jQuery )); /* }}} */
|
||||
|
||||
(function( SeedDMSAjax, $, undefined ) { /* {{{ */
|
||||
var tasks = Array(
|
||||
{name: 'test', view: 'null', action: null, func:
|
||||
test = function() {
|
||||
console.log('Run in SeedDMSAjax');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
SeedDMSAjax.add = function(task) {
|
||||
tasks.push(task);
|
||||
}
|
||||
|
||||
SeedDMSAjax.run = function(view, action) {
|
||||
for(let task of tasks) {
|
||||
//console.log('Checking for '+view+':'+action);
|
||||
if(task.view == null || (task.view == view && task.action == null) || (task.view == view && task.action == action)) {
|
||||
//console.log('Running '+task.name+' after update for '+view+':'+action);
|
||||
task.func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}( window.SeedDMSAjax = window.SeedDMSAjax || {}, jQuery )); /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user