widget overflow fix

This commit is contained in:
Barış Soner Uşaklı
2023-10-14 15:06:09 -04:00
parent f6120ebb9f
commit eca64ef3d6
2 changed files with 7 additions and 3 deletions

View File

@@ -66,10 +66,14 @@ define('admin/extend/widgets', [
appendToggle(ui.item);
},
start: function () {
draftContainer.find('[data-location="drafts"]>div').removeClass('overflow-auto');
draftContainer.find('[data-location="drafts"]>div')
.removeClass('overflow-auto')
.css({ 'max-height': 'initial' });
},
stop: function () {
draftContainer.find('[data-location="drafts"]>div').addClass('overflow-auto');
draftContainer.find('[data-location="drafts"]>div')
.addClass('overflow-auto')
.css({ 'max-height': 'calc(100vh - 200px)' });
},
connectWith: 'div',
}).on('click', '.delete-widget', function () {

View File

@@ -28,7 +28,7 @@
{{{ each templates.areas }}}
<div class="area" data-template="{templates.template}" data-location="{./location}">
<h5>{./name} <span class="fs-6 text-secondary">{templates.template} / {./location}</span></h5>
<div class="card card-body text-bg-light widget-area overflow-auto" {{{ if (./location == "drafts")}}}style="max-height: calc(100vh - 200px);"{{{ end }}}>
<div class="card card-body text-bg-light widget-area {{{ if (./location == "drafts")}}} overflow-auto{{{ end }}}" {{{ if (./location == "drafts")}}}style="max-height: calc(100vh - 200px);"{{{ end }}}>
</div>
</div>