summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js1
-rw-r--r--program/js/common.js3
2 files changed, 2 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index b98272493..1f0b95410 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1179,6 +1179,7 @@ function rcube_webmail()
if (typeof cmd === 'string') {
this.commands[cmd] = enable;
this.set_button(cmd, (enable ? 'act' : 'pas'));
+ this.triggerEvent('enable-command', {command: cmd, status: enable});
}
// push array elements into commands array
else {
diff --git a/program/js/common.js b/program/js/common.js
index f7c0a7536..53dce8cc2 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -298,8 +298,7 @@ addEventListener: function(evt, func, obj)
if (!this._events[evt])
this._events[evt] = [];
- var e = {func:func, obj:obj ? obj : window};
- this._events[evt][this._events[evt].length] = e;
+ this._events[evt].push({func:func, obj:obj ? obj : window});
},
/**