mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-28 01:18:40 +00:00
"Fix" same action type
This commit is contained in:
parent
95253f94b3
commit
8d929e07a4
|
|
@ -75,14 +75,13 @@
|
|||
actionLength = listeners[i].action.length;
|
||||
|
||||
for (let j = 1; j < actionLength; j++) {
|
||||
this.app.eventManager.attach(e.id + listeners[i].action[j - 1].type, function (data)
|
||||
console.log(e);
|
||||
this.app.eventManager.attach(e.id + listeners[i].action[j - 1].key, function (data)
|
||||
{
|
||||
self.runAction(e, listeners[i].action[j], data);
|
||||
}, false, true);
|
||||
// todo the true here is a memory leak since it should be removed at some point?!
|
||||
// todo: the true here is a memory leak since it should be removed at some point?!
|
||||
// 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
|
||||
|
|
@ -119,7 +118,7 @@
|
|||
|
||||
this.actions[action.type](action, function (data)
|
||||
{
|
||||
self.app.eventManager.trigger(e.id + action.type, e.id, data);
|
||||
self.app.eventManager.trigger(e.id + action.key, e.id, data);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user