From 0fa17b8d26d9fc887fd55884801c24b4c4d8665a Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 6 Jan 2013 16:13:45 +0100 Subject: show settings menu items --- module/web/static/js/views/settingsView.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'module/web/static/js') 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($('')); + + _.each(this.data, function(section) { + self.menu.append($('
  • ' + section.label + '
  • ')); + }) + } } }); -- cgit v1.2.3