mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 09:58:39 +00:00
Fixed action manager
This commit is contained in:
parent
3b78030993
commit
4735f7cef5
|
|
@ -90,7 +90,7 @@
|
|||
}
|
||||
|
||||
for (let id in this.groups[group]) {
|
||||
if (this.groups[group].hasOwnProperty(id) && this.groups[group][id]) {
|
||||
if (!this.groups[group].hasOwnProperty(id) || !this.groups[group][id]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -117,6 +117,10 @@
|
|||
{
|
||||
id = typeof id !== 'undefined' ? id : 0;
|
||||
|
||||
if(!this.callbacks.hasOwnProperty(group)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof this.groups[group] !== 'undefined') {
|
||||
this.groups[group][id] = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,14 +75,14 @@
|
|||
actionLength = listeners[i].action.length;
|
||||
|
||||
for (let j = 1; j < actionLength; j++) {
|
||||
// todo: handle onload action right after registering everything. this will be used for onload api calls in order to get content such as lists or models. Maybe in the main application after registering a invoke('onload') should be called if the application wants to execute the onload elements
|
||||
// todo: right now one event type can only exist once... needs fixing!!!
|
||||
this.app.eventManager.addGroup(e.id + listeners[i].action[j - 1].type, listeners[i].action[j - 1].type);
|
||||
this.app.eventManager.setDone(e.id + listeners[i].action[j - 1].type, function ()
|
||||
this.app.eventManager.attach(e.id + listeners[i].action[j - 1].type, function ()
|
||||
{
|
||||
// todo: how to pass result from previous action to next action?!
|
||||
self.runAction(e, listeners[i].action[j]);
|
||||
});
|
||||
}, false, true);
|
||||
// todo: handle onload action right after registering everything. this will be used for onload api calls in order to get content such as lists or models. Maybe in the main application after registering a invoke('onload') should be called if the application wants to execute the onload elements
|
||||
// todo: right now one event type can only exist once... needs fixing!!!
|
||||
//this.app.eventManager.addGroup(e.id + listeners[i].action[j - 1].type, listeners[i].action[j - 1].type);
|
||||
}
|
||||
|
||||
// Register event for first action
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user