mirror of
https://github.com/e107inc/e107.git
synced 2025-06-11 21:50:59 +02:00
Merge pull request #2766 from lonalore/flexpanel
Remove margin from empty draggable-panels.
This commit is contained in:
@ -1569,6 +1569,10 @@ body#admin-menus .admin-left-panel,
|
|||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.row-flex .draggable-panels.empty {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.flex-col {
|
.flex-col {
|
||||||
display: flex;
|
display: flex;
|
||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
|
@ -63,9 +63,12 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
$draggablePanels.css('background-color', 'transparent');
|
$draggablePanels.css('background-color', 'transparent');
|
||||||
|
|
||||||
e107.callbacks.flexPanelSavePanelOrder();
|
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});
|
$.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);
|
})(jQuery);
|
||||||
|
Reference in New Issue
Block a user