mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Merge pull request #2766 from lonalore/flexpanel
Remove margin from empty draggable-panels.
This commit is contained in:
commit
b3d1775d41
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user