From 51327f01e22deaf460920abcb124b98c6d73732c Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 11 Jul 2013 17:34:06 +0200 Subject: fixed settings --- pyload/web/app/scripts/views/settings/configSectionView.js | 2 +- pyload/web/app/scripts/views/settings/settingsView.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'pyload/web/app/scripts/views') diff --git a/pyload/web/app/scripts/views/settings/configSectionView.js b/pyload/web/app/scripts/views/settings/configSectionView.js index e05701b2a..0d9b0762f 100644 --- a/pyload/web/app/scripts/views/settings/configSectionView.js +++ b/pyload/web/app/scripts/views/settings/configSectionView.js @@ -77,7 +77,7 @@ define(['jquery', 'underscore', 'backbone', 'app', '../abstract/itemView', '../i var self = this; this.model.save({success: function() { self.render(); - App.settingsView.refresh(); + App.vent.trigger('config:change'); }}); }, diff --git a/pyload/web/app/scripts/views/settings/settingsView.js b/pyload/web/app/scripts/views/settings/settingsView.js index cad5ab075..ff86efdf9 100644 --- a/pyload/web/app/scripts/views/settings/settingsView.js +++ b/pyload/web/app/scripts/views/settings/settingsView.js @@ -11,7 +11,6 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ConfigHolder', './con events: { 'click .settings-menu li > a': 'change_section', - 'click .btn-add': 'choosePlugin', // TODO not in scope 'click .icon-remove': 'deleteConfig' }, @@ -41,6 +40,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ConfigHolder', './con }); this.listenTo(App.vent, 'config:open', this.openConfig); + this.listenTo(App.vent, 'config:change', this.refresh); this.refresh(); }, @@ -75,7 +75,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ConfigHolder', './con addons.push(item); }); - this.ui.menu.html(this.templateMenu({ + this.$(this.ui.menu).html(this.templateMenu({ core: this.coreConfig, plugin: plugins, addon: addons @@ -177,7 +177,7 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ConfigHolder', './con $.ajax(App.apiRequest('deleteConfig', {plugin: name}, { success: function() { self.refresh(); }})); - + return false; } }); -- cgit v1.2.3