global header widgets

This commit is contained in:
psychobunny
2014-05-28 16:30:16 -04:00
parent 351e376812
commit bfa3b0f22f
3 changed files with 5 additions and 1 deletions

View File

@@ -15,7 +15,7 @@
};
ajaxify.widgets.render = function(tpl_url, url, callback) {
var widgetLocations = ['sidebar', 'footer'], numLocations;
var widgetLocations = ['sidebar', 'footer', 'header'], numLocations;
$('#content [widget-area]').each(function() {
var location = $(this).attr('widget-area');
@@ -48,6 +48,8 @@
} else if (location === 'sidebar') {
$('#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') {
$('#content').prepend($('<div class="col-xs-12"><div widget-area="header"></div></div>'));
}
area = $('#content [widget-area="' + location + '"]');