From 821e26fa30372ad6e534a54134653d8f664c58dd Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 6 Jan 2013 19:45:09 +0100 Subject: fixed the lexer rules --- module/web/static/js/views/settingsView.js | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'module/web/static/js/views/settingsView.js') diff --git a/module/web/static/js/views/settingsView.js b/module/web/static/js/views/settingsView.js index c6fe535b9..1b7f5e356 100644 --- a/module/web/static/js/views/settingsView.js +++ b/module/web/static/js/views/settingsView.js @@ -5,10 +5,10 @@ define(['jquery', 'underscore', 'backbone'], return Backbone.View.extend({ el: "#content", -// template: _.compile($("#template-package").html()), + template_menu: _.compile($("#template-menu").html()), events: { - + 'click .settings-menu li > a': 'change_section' }, menu: null, @@ -18,24 +18,21 @@ define(['jquery', 'underscore', 'backbone'], this.menu = $('.settings-menu'); var self = this; - $.ajax("/api/getCoreConfig", {success: function(data) { - self.data = data; - self.render() - }}); +// $.ajax("/api/getCoreConfig", {success: function(data) { +// self.data = data; +// self.render() +// }}); // $.ajax("/api/getPluginConfig"); console.log("Settings initialized"); }, + // TODO: this is only a showcase 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 + '
  • ')); - }) - } + this.menu.html(this.template_menu({core:false})); + }, + + change_section: function(el) { + console.log("Section changed"); } }); -- cgit v1.2.3