diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index dff7ce24b..c62fdc3d2 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1569,6 +1569,10 @@ body#admin-menus .admin-left-panel, margin-bottom: 15px; } +.row-flex .draggable-panels.empty { + margin-bottom: 0; +} + .flex-col { display: flex; display: -webkit-flex; diff --git a/e107_web/js/core/admin.flexpanel.js b/e107_web/js/core/admin.flexpanel.js index 78c10cd0f..327fa922a 100644 --- a/e107_web/js/core/admin.flexpanel.js +++ b/e107_web/js/core/admin.flexpanel.js @@ -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);