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