summaryrefslogtreecommitdiffstats
path: root/module/web/static/js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-01-06 16:13:45 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-01-06 16:13:45 +0100
commit0fa17b8d26d9fc887fd55884801c24b4c4d8665a (patch)
treec50059b15f9ca889444f8c3ac0313f46844b9c8c /module/web/static/js
parentfirst working parts of config api (diff)
downloadpyload-0fa17b8d26d9fc887fd55884801c24b4c4d8665a.tar.xz
show settings menu items
Diffstat (limited to 'module/web/static/js')
-rw-r--r--module/web/static/js/views/settingsView.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/module/web/static/js/views/settingsView.js b/module/web/static/js/views/settingsView.js
index f4e118233..c6fe535b9 100644
--- a/module/web/static/js/views/settingsView.js
+++ b/module/web/static/js/views/settingsView.js
@@ -11,14 +11,31 @@ define(['jquery', 'underscore', 'backbone'],
},
+ menu: null,
+ data: null,
+
initialize: function() {
- $.ajax("/api/getCoreConfig");
- $.ajax("/api/getPluginConfig");
- $.ajax("/api/getAvailablePlugins");
+ this.menu = $('.settings-menu');
+ var self = this;
+
+ $.ajax("/api/getCoreConfig", {success: function(data) {
+ self.data = data;
+ self.render()
+ }});
+// $.ajax("/api/getPluginConfig");
console.log("Settings initialized");
},
render: function() {
+ if (this.data != null) {
+ var self = this;
+ this.menu.empty();
+ this.menu.append($('<li class="nav-header"><i class="icon-globe icon-white"></i>General</li>'));
+
+ _.each(this.data, function(section) {
+ self.menu.append($('<li><a href="#">' + section.label + '</a></li>'));
+ })
+ }
}
});