summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyload/web/app/scripts/views/linkgrabber/packageView.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/pyload/web/app/scripts/views/linkgrabber/packageView.js b/pyload/web/app/scripts/views/linkgrabber/packageView.js
index 95c46e3cc..356d39b4b 100644
--- a/pyload/web/app/scripts/views/linkgrabber/packageView.js
+++ b/pyload/web/app/scripts/views/linkgrabber/packageView.js
@@ -39,9 +39,19 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/linkgrabber/package'
return false;
},
- renamePackage: function() {
+ renamePackage: function(e) {
+ e.stopPropagation();
+
this.ui.name.addClass('edit');
this.ui.name.find('input').focus();
+
+ var self = this;
+ $(document).one('click', function() {
+ self.ui.name.removeClass('edit');
+ self.ui.name.focus();
+ });
+
+ return false;
},
saveName: function(e) {