mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Scrolling fixes for Model Admin
This commit is contained in:
parent
eee9ffaaa2
commit
bb2f487644
@ -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');
|
||||
|
@ -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();
|
||||
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user