diff options
| author | 2013-03-30 22:02:21 +0100 | |
|---|---|---|
| committer | 2013-03-30 22:02:21 +0100 | |
| commit | 9938c968ae884aa61878de409533a383ebd30c95 (patch) | |
| tree | a2cab805d597eac52d400218ac37550325446f2a /module/web/static/js | |
| parent | save and delete configs (diff) | |
| download | pyload-9938c968ae884aa61878de409533a383ebd30c95.tar.xz | |
separate addon and plugin configs
Diffstat (limited to 'module/web/static/js')
| -rw-r--r-- | module/web/static/js/views/settings/configSectionView.js | 1 | ||||
| -rw-r--r-- | module/web/static/js/views/settings/settingsView.js | 18 | 
2 files changed, 16 insertions, 3 deletions
| diff --git a/module/web/static/js/views/settings/configSectionView.js b/module/web/static/js/views/settings/configSectionView.js index b3861f27e..14ce4a0b9 100644 --- a/module/web/static/js/views/settings/configSectionView.js +++ b/module/web/static/js/views/settings/configSectionView.js @@ -74,7 +74,6 @@ define(['jquery', 'underscore', 'backbone', 'app', '../abstract/itemView', '../i                  // TODO: success / failure popups                  var self = this;                  this.model.save({success: function(){ -                    console.log("saved");                      self.render();                      App.settingsView.refresh();                  }}); diff --git a/module/web/static/js/views/settings/settingsView.js b/module/web/static/js/views/settings/settingsView.js index 9968a48e0..d6f874c47 100644 --- a/module/web/static/js/views/settings/settingsView.js +++ b/module/web/static/js/views/settings/settingsView.js @@ -49,9 +49,22 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ConfigHolder', './con              },              render: function() { +                var plugins = [], +                    addons = []; + +                // separate addons and default plugins +                // addons have an activated state +                _.each(this.pluginConfig, function(item) { +                    if (item.activated === null) +                        plugins.push(item); +                    else +                        addons.push(item); +                }); +                  this.menu.html(this.templateMenu({                      core: this.coreConfig, -                    plugin: this.pluginConfig +                    plugin: plugins, +                    addon: addons                  }));                  // mark the selected element @@ -122,7 +135,8 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ConfigHolder', './con                  // TODO check for changes                  // TODO move this into render? -                var el = $(e.target).parent(); +                var el = $(e.target).closest('li'); +                  this.selected = el.data("name");                  this.openConfig(this.selected); | 
