From 080643e89af62013d70bb574cd54cf4876628515 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 11 Aug 2013 20:36:10 +0200 Subject: improved account list --- .../web/app/scripts/views/accounts/accountEdit.js | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pyload/web/app/scripts/views/accounts/accountEdit.js (limited to 'pyload/web/app/scripts/views/accounts/accountEdit.js') 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 -- cgit v1.2.3