Node.js based forum software built for the modern web
closes #1673
psychobunnyb12ca5ab9f86
diff --git a/public/src/forum/admin/themes.js b/public/src/forum/admin/themes.jsindex 1addd44466..9465cbe3df 100644--- a/public/src/forum/admin/themes.js+++ b/public/src/forum/admin/themes.js@@ -14,6 +14,18 @@ define('forum/admin/themes', ['forum/admin/settings'], function(Settings) {scriptEl.attr('src', '//bootswatch.aws.af.cm/3/?callback=bootswatchListener');$('body').append(scriptEl);+ $('#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;+ });+var bootstrapThemeContainer = $('#bootstrap_themes'),installedThemeContainer = $('#installed_themes');diff --git a/src/controllers/admin.js b/src/controllers/admin.jsindex 71b63d075a..3e93f3adeb 100644--- a/src/controllers/admin.js+++ b/src/controllers/admin.js@@ -148,7 +148,28 @@ adminController.themes.get = function(req, res, next) {}}+ var templates = [],+ list = {}, index = 0;++ widgetData.areas.forEach(function(area) {+ if (typeof list[area.template] === 'undefined') {+ list[area.template] = index;+ templates.push({+ template: area.template,+ areas: []+ });++ index++;+ }++ templates[list[area.template]].areas.push({+ name: area.name,+ location: area.location+ });+ });+res.render('admin/themes', {+ templates: templates,areas: widgetData.areas,widgets: widgetData.widgets,branding: branding