mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
widgets - only collapse / expand divs that specify a target location
This commit is contained in:
@@ -4,11 +4,13 @@
|
|||||||
(function(ajaxify) {
|
(function(ajaxify) {
|
||||||
ajaxify.widgets = {};
|
ajaxify.widgets = {};
|
||||||
|
|
||||||
ajaxify.widgets.reposition = function() {
|
ajaxify.widgets.reposition = function(location) {
|
||||||
$('body [no-widget-class]').each(function() {
|
$('body [no-widget-class]').each(function() {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
if ($this.attr('no-widget-target') === location) {
|
||||||
$this.removeClass();
|
$this.removeClass();
|
||||||
$this.addClass($this.attr('no-widget-class'));
|
$this.addClass($this.attr('no-widget-class'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -51,7 +53,7 @@
|
|||||||
area.html(html).removeClass('hidden');
|
area.html(html).removeClass('hidden');
|
||||||
|
|
||||||
if (!renderedWidgets.length) {
|
if (!renderedWidgets.length) {
|
||||||
ajaxify.widgets.reposition();
|
ajaxify.widgets.reposition(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#content [widget-area] img:not(.user-img)').addClass('img-responsive');
|
$('#content [widget-area] img:not(.user-img)').addClass('img-responsive');
|
||||||
|
|||||||
Reference in New Issue
Block a user