This commit is contained in:
barisusakli
2014-07-20 14:35:16 -04:00
parent ec9cc52d03
commit 341a0c8190
2 changed files with 15 additions and 17 deletions

View File

@@ -29,7 +29,7 @@
if (!numLocations) {
ajaxify.widgets.reposition();
}
function renderWidgets(location) {
var area = $('#content [widget-area="' + location + '"]'),
areaData = {
@@ -46,12 +46,12 @@
}
if (!area.length && window.location.pathname.indexOf('/admin') === -1 && renderedWidgets.length) {
if (location === 'footer') {
if (location === 'footer' && !$('#content [widget-area="footer"]').length) {
$('#content').append($('<div class="col-xs-12"><div widget-area="footer"></div></div>'));
} else if (location === 'sidebar') {
} else if (location === 'sidebar' && !$('#content [widget-area="sidebar"]').length) {
$('#content > *').wrapAll($('<div class="col-lg-9 col-xs-12"></div>'));
$('#content').append($('<div class="col-lg-3 col-xs-12"><div widget-area="sidebar"></div></div>'));
} else if (location === 'header') {
} else if (location === 'header' && !$('#content [widget-area="header"]').length) {
$('#content').prepend($('<div class="col-xs-12"><div widget-area="header"></div></div>'));
}