summaryrefslogtreecommitdiffstats
path: root/module/web/static/js
diff options
context:
space:
mode:
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>'));
+ })
+ }
}
});