diff options
Diffstat (limited to 'pyload')
-rw-r--r-- | pyload/AccountManager.py | 4 | ||||
-rw-r--r-- | pyload/web/app/scripts/models/Account.js | 2 | ||||
-rw-r--r-- | pyload/web/app/scripts/views/accounts/accountListView.js | 2 | ||||
-rw-r--r-- | pyload/web/app/scripts/views/accounts/accountModal.js | 4 | ||||
-rw-r--r-- | pyload/web/app/scripts/views/accounts/accountView.js | 4 | ||||
-rwxr-xr-x | pyload/web/app/templates/default/accounts/editAccount.html | 9 |
6 files changed, 13 insertions, 12 deletions
diff --git a/pyload/AccountManager.py b/pyload/AccountManager.py index 7820d42f6..b9f1536d9 100644 --- a/pyload/AccountManager.py +++ b/pyload/AccountManager.py @@ -46,8 +46,8 @@ class AccountManager: klass = self.core.pluginManager.loadClass("accounts", plugin) if not klass: - self.core.log.warning(_("Unknown account plugin %s") % plugin) - return + self.core.log.warning(_("Account plugin %s not available") % plugin) + raise ValueError("Account plugin %s not available" % plugin) if plugin not in self.accounts: self.accounts[plugin] = [] diff --git a/pyload/web/app/scripts/models/Account.js b/pyload/web/app/scripts/models/Account.js index e2cc4f9ec..d98d3374f 100644 --- a/pyload/web/app/scripts/models/Account.js +++ b/pyload/web/app/scripts/models/Account.js @@ -51,7 +51,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes'], function($ var options = App.apiRequest('updateAccountInfo', {account: this.toJSON()}, { success: function() { _.delay(function() { - App.vent.trigger('accounts:updated'); + App.vent.trigger('account:updated'); }, 1000); } }); diff --git a/pyload/web/app/scripts/views/accounts/accountListView.js b/pyload/web/app/scripts/views/accounts/accountListView.js index 4eb5bfe7d..37bfba964 100644 --- a/pyload/web/app/scripts/views/accounts/accountListView.js +++ b/pyload/web/app/scripts/views/accounts/accountListView.js @@ -24,7 +24,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'collections/AccountList', '. this.collection = new AccountList(); this.update(); - this.listenTo(App.vent, 'accounts:updated', this.update); + this.listenTo(App.vent, 'account:updated', this.update); }, update: function() { diff --git a/pyload/web/app/scripts/views/accounts/accountModal.js b/pyload/web/app/scripts/views/accounts/accountModal.js index 85db96b2b..31e05dff6 100644 --- a/pyload/web/app/scripts/views/accounts/accountModal.js +++ b/pyload/web/app/scripts/views/accounts/accountModal.js @@ -61,8 +61,8 @@ define(['jquery', 'underscore', 'app', 'views/abstract/modalView', 'hbs!tpl/dial $.ajax(App.apiRequest('updateAccount', { plugin: plugin, loginname: login, password: password - }, { success: function() { - App.vent.trigger('accounts:updated'); + }, { success: function(data) { + App.vent.trigger('account:updated', data); self.hide(); }})); } diff --git a/pyload/web/app/scripts/views/accounts/accountView.js b/pyload/web/app/scripts/views/accounts/accountView.js index 123327a27..f49deb0a6 100644 --- a/pyload/web/app/scripts/views/accounts/accountView.js +++ b/pyload/web/app/scripts/views/accounts/accountView.js @@ -12,7 +12,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/accounts/account'], 'click .btn-success': 'toggle', 'click .btn-blue': 'edit', 'click .btn-yellow': 'refresh', - 'click .btn-danger': 'remove' + 'click .btn-danger': 'deleteAccount' }, modelEvents: { @@ -41,7 +41,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/accounts/account'], this.model.fetch({refresh: true}); }, - remove: function() { + deleteAccount: function() { this.model.destroy(); } }); diff --git a/pyload/web/app/templates/default/accounts/editAccount.html b/pyload/web/app/templates/default/accounts/editAccount.html index 212f11e12..45cbf95f6 100755 --- a/pyload/web/app/templates/default/accounts/editAccount.html +++ b/pyload/web/app/templates/default/accounts/editAccount.html @@ -5,7 +5,7 @@ <div class="modal-body"> <form class="form-horizontal" autocomplete="off"> <div class="control-group"> - <label class="control-label" for="pluginSelect"> + <label class="control-label"> Account </label> @@ -23,12 +23,13 @@ <input type="password" id="password"> </div> </div> - {{#if options }} + {{#if config }} <legend> - Options + {{ _ "Configuration" }} </legend> + TODO {{/if}} - <div class="account-options"> + <div class="account-config"> </div> </form> </div> |