|
|
@ -298,20 +298,18 @@ define('forum/admin/themes', ['forum/admin/settings'], function(Settings) {
|
|
|
|
$.get(RELATIVE_PATH + '/api/admin/themes', function(data) {
|
|
|
|
$.get(RELATIVE_PATH + '/api/admin/themes', function(data) {
|
|
|
|
var areas = data.areas;
|
|
|
|
var areas = data.areas;
|
|
|
|
|
|
|
|
|
|
|
|
for (var a in areas) {
|
|
|
|
for(var i=0; i<areas.length; ++i) {
|
|
|
|
if (areas.hasOwnProperty(a)) {
|
|
|
|
var area = areas[i],
|
|
|
|
var area = areas[a],
|
|
|
|
widgetArea = $('#widgets .area[data-template="' + area.template + '"][data-location="' + area.location + '"]').find('.widget-area');
|
|
|
|
widgetArea = $('#widgets .area[data-template="' + area.template + '"][data-location="' + area.location + '"]').find('.widget-area');
|
|
|
|
|
|
|
|
|
|
|
|
widgetArea.html('');
|
|
|
|
for (var i in area.data) {
|
|
|
|
|
|
|
|
if (area.data.hasOwnProperty(i)) {
|
|
|
|
for (var k=0; k<area.data.length; ++k) {
|
|
|
|
var widgetData = area.data[i],
|
|
|
|
var widgetData = area.data[k],
|
|
|
|
widgetEl = $('.available-widgets [data-widget="' + widgetData.widget + '"]').clone();
|
|
|
|
widgetEl = $('.available-widgets [data-widget="' + widgetData.widget + '"]').clone();
|
|
|
|
|
|
|
|
|
|
|
|
widgetArea.append(populateWidget(widgetEl, widgetData.data));
|
|
|
|
widgetArea.append(populateWidget(widgetEl, widgetData.data));
|
|
|
|
appendToggle(widgetEl);
|
|
|
|
appendToggle(widgetEl);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|