Skip to content
Snippets Groups Projects
Commit c6749f28 authored by Jan-Christoph Borchardt's avatar Jan-Christoph Borchardt Committed by GitHub
Browse files

Merge pull request #66 from nextcloud/fix-new-message-button

fix new-message-button event registration
parents f8bb1a2a c7bcf422
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