Adjusting for eventmanager changes

This commit is contained in:
Dennis Eichhorn 2016-08-11 17:47:31 +02:00
parent 8bbe20288f
commit 9439738e05
3 changed files with 6 additions and 6 deletions

View File

@ -21,9 +21,9 @@
* @since 1.0.0
* @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.callbacks = {};
};

View File

@ -75,7 +75,7 @@
for (let j = 1; j < actionLength; j++) {
// 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 ()
{
// todo: how to pass result from previous action to next action?!
@ -111,7 +111,7 @@
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);
});
};

View File

@ -168,7 +168,7 @@
for (let property in injects) {
if (injects.hasOwnProperty(property)) {
counter++;
this.app.eventManager.addGroup(counter, form.getId());
this.app.eventManager.addGroup(form.getId(), counter);
injects[property](form.getElement(), counter, form.getId());
} else {
this.app.logger.warning('Invalid property.');
@ -176,7 +176,7 @@
}
if(counter === 0) {
this.app.eventManager.trigger('?', form.getId());
this.app.eventManager.trigger(form.getId());
}
};