mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 23:30:36 +01:00
fixes to appearance/widgets page
This commit is contained in:
@@ -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<areas.length; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user