From 9938c968ae884aa61878de409533a383ebd30c95 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 30 Mar 2013 22:02:21 +0100 Subject: separate addon and plugin configs --- module/web/static/css/default/settings.less | 18 ++++++++++++++++-- module/web/static/img/default/logo_grey.png | Bin 6236 -> 1141 bytes .../web/static/js/views/settings/configSectionView.js | 1 - module/web/static/js/views/settings/settingsView.js | 18 ++++++++++++++++-- 4 files changed, 32 insertions(+), 5 deletions(-) (limited to 'module/web/static') diff --git a/module/web/static/css/default/settings.less b/module/web/static/css/default/settings.less index 12cc31e06..947cbaa22 100644 --- a/module/web/static/css/default/settings.less +++ b/module/web/static/css/default/settings.less @@ -22,7 +22,7 @@ margin-top: 0; } - .plugin { + .plugin, .addon { a { padding-left: 28px; background-position: 4px 2px; @@ -30,7 +30,7 @@ background-size: 20px 20px; } - i { + .iconf-remove { display: none; } @@ -42,6 +42,20 @@ } + .addon { + div { + font-size: small; + } + .addon-on { + color: @green; + } + + .addon-off { + color: @red; + } + + } + border-top-left-radius: 0; border-top-right-radius: 0; diff --git a/module/web/static/img/default/logo_grey.png b/module/web/static/img/default/logo_grey.png index 7061372aa..a4114d832 100644 Binary files a/module/web/static/img/default/logo_grey.png and b/module/web/static/img/default/logo_grey.png differ 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); -- cgit v1.2.3