mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-15 08:48:42 +00:00
Adjusting for eventmanager changes
This commit is contained in:
parent
8bbe20288f
commit
9439738e05
|
|
@ -21,9 +21,9 @@
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
jsOMS.Event.EventManager = function (logger)
|
jsOMS.Event.EventManager = function ()
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = jsOMS.Log.Logger.getInstance();
|
||||||
this.groups = {};
|
this.groups = {};
|
||||||
this.callbacks = {};
|
this.callbacks = {};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
for (let j = 1; j < actionLength; j++) {
|
for (let j = 1; j < actionLength; j++) {
|
||||||
// todo: right now one event type can only exist once... needs fixing!!!
|
// todo: right now one event type can only exist once... needs fixing!!!
|
||||||
this.app.eventManager.addGroup(listeners[i].action[j - 1].type, e.id + listeners[i].action[j - 1].type);
|
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.setDone(e.id + listeners[i].action[j - 1].type, function ()
|
||||||
{
|
{
|
||||||
// todo: how to pass result from previous action to next action?!
|
// todo: how to pass result from previous action to next action?!
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
|
|
||||||
this.actions[action.type](action, function ()
|
this.actions[action.type](action, function ()
|
||||||
{
|
{
|
||||||
self.app.eventManager.trigger(e.id, e.id + action.type, false);
|
self.app.eventManager.trigger(e.id + action.type, e.id);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
for (let property in injects) {
|
for (let property in injects) {
|
||||||
if (injects.hasOwnProperty(property)) {
|
if (injects.hasOwnProperty(property)) {
|
||||||
counter++;
|
counter++;
|
||||||
this.app.eventManager.addGroup(counter, form.getId());
|
this.app.eventManager.addGroup(form.getId(), counter);
|
||||||
injects[property](form.getElement(), counter, form.getId());
|
injects[property](form.getElement(), counter, form.getId());
|
||||||
} else {
|
} else {
|
||||||
this.app.logger.warning('Invalid property.');
|
this.app.logger.warning('Invalid property.');
|
||||||
|
|
@ -176,7 +176,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if(counter === 0) {
|
if(counter === 0) {
|
||||||
this.app.eventManager.trigger('?', form.getId());
|
this.app.eventManager.trigger(form.getId());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user