1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

Remove margin from empty draggable-panels.

This commit is contained in:
lonalore
2017-08-11 10:25:13 +02:00
parent 1764aa1cf7
commit 43af65908d
2 changed files with 26 additions and 0 deletions

View File

@@ -63,9 +63,12 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
$draggablePanels.css('background-color', 'transparent');
e107.callbacks.flexPanelSavePanelOrder();
e107.callbacks.flexPanelEmptyPanels();
}
});
});
e107.callbacks.flexPanelEmptyPanels();
}
};
@@ -100,4 +103,23 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
$.post(window.location.href, {'core-flexpanel-order': NewOrder});
};
e107.callbacks.flexPanelEmptyPanels = function ()
{
var selector = e107.settings.flexPanel.selector;
$(selector).each(function ()
{
var $this = $(this);
if($this.find('div').length > 0)
{
$this.removeClass('empty');
}
else
{
$this.addClass('empty');
}
});
};
})(jQuery);