From d4f47f4157e2ccea0b42bbde58c086a3ea4f73d9 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 25 Sep 2014 13:39:07 -0400 Subject: [PATCH] fixes to appearance/widgets page --- public/src/forum/admin/appearance/widgets.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/public/src/forum/admin/appearance/widgets.js b/public/src/forum/admin/appearance/widgets.js index 2bafe5cdc7..2cdb2c0cbe 100644 --- a/public/src/forum/admin/appearance/widgets.js +++ b/public/src/forum/admin/appearance/widgets.js @@ -6,6 +6,18 @@ define('forum/admin/appearance/widgets', function() { Widgets.init = function() { prepareWidgets(); + + $('#widgets .nav-pills a').on('click', function(ev) { + var $this = $(this); + $('#widgets .nav-pills li').removeClass('active'); + $this.parent().addClass('active'); + + $('#widgets .tab-pane').removeClass('active'); + $('#widgets .tab-pane[data-template="' + $this.attr('data-template') + '"]').addClass('active'); + + ev.preventDefault(); + return false; + }); }; function prepareWidgets() { @@ -143,7 +155,7 @@ define('forum/admin/appearance/widgets', function() { return widget; } - $.get(RELATIVE_PATH + '/api/admin/themes', function(data) { + $.get(RELATIVE_PATH + '/api/admin/appearance/widgets', function(data) { var areas = data.areas; for(var i=0; i