summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/views/linkgrabber
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-04 19:45:15 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-04 19:45:15 +0100
commitdfbb7dbeb5551b7b60aa05e59855f628c2e001ea (patch)
tree471e297783ce906869e32322d71e4de6d04e1c90 /pyload/web/app/scripts/views/linkgrabber
parentfixed changing the dl speed limit (diff)
downloadpyload-dfbb7dbeb5551b7b60aa05e59855f628c2e001ea.tar.xz
password field for linkgrabber
Diffstat (limited to 'pyload/web/app/scripts/views/linkgrabber')
-rw-r--r--pyload/web/app/scripts/views/linkgrabber/packageView.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/pyload/web/app/scripts/views/linkgrabber/packageView.js b/pyload/web/app/scripts/views/linkgrabber/packageView.js
index 356d39b4b..a9d04ced6 100644
--- a/pyload/web/app/scripts/views/linkgrabber/packageView.js
+++ b/pyload/web/app/scripts/views/linkgrabber/packageView.js
@@ -13,7 +13,8 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/linkgrabber/package'
ui: {
'name': '.name',
- 'table': 'table'
+ 'table': 'table',
+ 'password': '.password'
},
events: {
@@ -21,6 +22,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/linkgrabber/package'
'click .name': 'renamePackage',
'keyup .name input': 'saveName',
'click .btn-add': 'addPackage',
+ 'click .btn-password': 'togglePassword',
'click .btn-delete': 'deletePackage',
'click .btn-mini': 'deleteLink'
},
@@ -35,6 +37,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/linkgrabber/package'
addPackage: function(e) {
e.stopPropagation();
+ this.model.set('password', this.ui.password.val());
this.model.add();
return false;
},
@@ -80,6 +83,12 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/linkgrabber/package'
this.expanded ^= true;
this.ui.table.toggle();
return false;
+ },
+
+ togglePassword: function(e) {
+ var el = $(e.target);
+ el.find('i').toggleClass('icon-lock icon-unlock');
+ this.ui.password.toggle();
}
});