This commit is contained in:
psychobunny
2014-03-17 13:38:32 -04:00
parent 1804373322
commit e60b2f7716
2 changed files with 17 additions and 6 deletions

View File

@@ -156,6 +156,14 @@ var ajaxify = {};
return tpl_url;
};
ajaxify.repositionNoWidgets = function() {
$('body [no-widget-class]').each(function() {
var $this = $(this);
$this.removeClass();
$this.addClass($this.attr('no-widget-class'));
});
};
ajaxify.renderWidgets = function(tpl_url, url, callback) {
var widgetLocations = [], numLocations;
@@ -165,6 +173,10 @@ var ajaxify = {};
numLocations = widgetLocations.length;
if (!numLocations) {
ajaxify.repositionNoWidgets();
}
function renderWidgets(location) {
var area = $('#content [widget-area="' + location + '"]');
@@ -175,11 +187,7 @@ var ajaxify = {};
})).removeClass('hidden');
if (!renderedWidgets.length) {
$('body [no-widget-class]').each(function() {
var $this = $(this);
$this.removeClass();
$this.addClass($this.attr('no-widget-class'));
});
ajaxify.repositionNoWidgets();
}
}