Skip to content
Snippets Groups Projects
Unverified Commit c7bcf422 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

fix new-message-button event registration

parent f8bb1a2a
No related branches found
No related tags found
No related merge requests found
......@@ -29,10 +29,10 @@ define(function(require) {
template: Handlebars.compile(NewMessageTemplate),
accounts: null,
ui: {
input: 'input'
button: '#mail_new_message'
},
events: {
'click input': 'onClick'
'click @ui.button': 'onClick'
},
initialize: function(options) {
this.accounts = options.accounts;
......@@ -44,9 +44,9 @@ define(function(require) {
},
onAccountsChanged: function() {
if (this.accounts.size === 0) {
this.ui.input.hide();
this.ui.button.hide();
} else {
this.ui.input.show();
this.ui.button.show();
}
},
onClick: function(e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment