summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/views/accounts/accountEdit.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-11 20:36:10 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-08-11 20:36:10 +0200
commit080643e89af62013d70bb574cd54cf4876628515 (patch)
treee79e3bebe9175da613c4a339fc4ac3fa172ecced /pyload/web/app/scripts/views/accounts/accountEdit.js
parentanother try to fix broken accounts (diff)
downloadpyload-080643e89af62013d70bb574cd54cf4876628515.tar.xz
improved account list
Diffstat (limited to 'pyload/web/app/scripts/views/accounts/accountEdit.js')
-rw-r--r--pyload/web/app/scripts/views/accounts/accountEdit.js37
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