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',
|
'type' => 'Includes',
|
||||||
'SilverStripe\\Admin\\LeftAndMain_EditForm',
|
'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');
|
$form->setAttribute('data-pjax-fragment', 'CurrentForm Content');
|
||||||
if ($form->Fields()->hasTabSet()) {
|
if ($form->Fields()->hasTabSet()) {
|
||||||
$form->Fields()->findOrMakeTab('Root')->setTemplate('SilverStripe\\Forms\\CMSTabSet');
|
$form->Fields()->findOrMakeTab('Root')->setTemplate('SilverStripe\\Forms\\CMSTabSet');
|
||||||
|
@ -1447,22 +1447,15 @@ $.entwine('ss', function($) {
|
|||||||
$filters = $('.cms-content-filters').first(),
|
$filters = $('.cms-content-filters').first(),
|
||||||
collapsed = this.data('collapsed');
|
collapsed = this.data('collapsed');
|
||||||
|
|
||||||
// Prevent the user from spamming the UI with animation requests.
|
// previously using "slideDown"/"slideUp" jQuery, but it was causing issues
|
||||||
if (this.data('animating')) {
|
if (collapsed) {
|
||||||
return;
|
this.addClass('active');
|
||||||
|
$filters.css('display', 'block');
|
||||||
|
} else {
|
||||||
|
this.removeClass('active');
|
||||||
|
$filters.css('display', '');
|
||||||
}
|
}
|
||||||
|
self.data('collapsed', !collapsed);
|
||||||
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onclick: function () {
|
onclick: function () {
|
||||||
this.showHide();
|
this.showHide();
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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
|
$Tools
|
||||||
|
|
||||||
<div class="cms-content-view">
|
<div class="cms-content-view">
|
||||||
|
Loading…
Reference in New Issue
Block a user