diff options
Diffstat (limited to 'pyload/web/app/scripts/views/accounts/accountEdit.js')
-rw-r--r-- | pyload/web/app/scripts/views/accounts/accountEdit.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pyload/web/app/scripts/views/accounts/accountEdit.js b/pyload/web/app/scripts/views/accounts/accountEdit.js new file mode 100644 index 000000000..b9109390b --- /dev/null +++ b/pyload/web/app/scripts/views/accounts/accountEdit.js @@ -0,0 +1,37 @@ +define(['jquery', 'underscore', 'app', 'views/abstract/modalView', 'hbs!tpl/accounts/editAccount'], + function($, _, App, modalView, template) { + 'use strict'; + return modalView.extend({ + + events: { + 'click .btn-save': 'save', + 'submit form': 'save' + }, + + template: template, + + initialize: function() { + // Inherit parent events + this.events = _.extend({}, modalView.prototype.events, this.events); + }, + + onRender: function() { + }, + + save: function() { + var password = this.$('#password').val(); + if (password !== '') { + this.model.setPassword(password); + } + + this.hide(); + return false; + }, + + onShow: function() { + }, + + onHide: function() { + } + }); + });
\ No newline at end of file |