1
0
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:
Cameron 2017-08-11 14:33:32 -07:00 committed by GitHub
commit b3d1775d41
2 changed files with 26 additions and 0 deletions

View File

@ -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;

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);