Scrolling fixes for Model Admin

This commit is contained in:
Christopher Joe 2016-10-10 16:04:49 +13:00 committed by Damian Mooyman
parent eee9ffaaa2
commit bb2f487644
3 changed files with 11 additions and 18 deletions

View File

@ -254,7 +254,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
'type' => 'Includes',
'SilverStripe\\Admin\\LeftAndMain_EditForm',
]);
$form->addExtraClass('cms-content cms-edit-form center flexbox-area-grow');
$form->addExtraClass('cms-content cms-edit-form center fill-height flexbox-area-grow');
$form->setAttribute('data-pjax-fragment', 'CurrentForm Content');
if ($form->Fields()->hasTabSet()) {
$form->Fields()->findOrMakeTab('Root')->setTemplate('SilverStripe\\Forms\\CMSTabSet');

View File

@ -329,7 +329,7 @@ $.entwine('ss', function($) {
content.css({'min-width': ''});
preview.css({'min-width': ''});
if (content.width() + preview.width() >= options.minContentWidth + options.minPreviewWidth) {
content.css({'min-width': options.minContentWidth});
preview.css({'min-width': options.minPreviewWidth});
@ -1447,22 +1447,15 @@ $.entwine('ss', function($) {
$filters = $('.cms-content-filters').first(),
collapsed = this.data('collapsed');
// Prevent the user from spamming the UI with animation requests.
if (this.data('animating')) {
return;
// previously using "slideDown"/"slideUp" jQuery, but it was causing issues
if (collapsed) {
this.addClass('active');
$filters.css('display', 'block');
} else {
this.removeClass('active');
$filters.css('display', '');
}
this.toggleClass('active');
this.data('animating', true);
// Slide the element down / up based on it's current collapsed state.
$filters[collapsed ? 'slideDown' : 'slideUp']({
complete: function () {
// Update the element's state.
self.data('collapsed', !collapsed);
self.data('animating', false);
}
});
self.data('collapsed', !collapsed);
},
onclick: function () {
this.showHide();

View File

@ -27,7 +27,7 @@
</div>
</div>
<div class="cms-content-fields center ui-widget-content cms-panel-padded" data-layout-type="border">
<div class="cms-content-fields center ui-widget-content cms-panel-padded fill-height" data-layout-type="border">
$Tools
<div class="cms-content-view">