mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 08:55:36 +02:00
closes #1673
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user