From 44f507a55d25dfed2f10ccd72cf34085a1b4c758 Mon Sep 17 00:00:00 2001 From: dingyongliang Date: Wed, 28 Jun 2023 09:35:18 +0800 Subject: [PATCH] * zin: fix form-actions of detailBody(hack). --- lib/zin/wg/detailbody/js/v1.js | 9 +++++++++ lib/zin/wg/detailbody/v1.php | 11 ++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 lib/zin/wg/detailbody/js/v1.js diff --git a/lib/zin/wg/detailbody/js/v1.js b/lib/zin/wg/detailbody/js/v1.js new file mode 100644 index 0000000000..18e065eaa0 --- /dev/null +++ b/lib/zin/wg/detailbody/js/v1.js @@ -0,0 +1,9 @@ +$(() => +{ + const $formActions = $('form.detail-body + .form-actions'); + if($formActions.length) + { + $detailBody = $formActions.prev(); + $detailBody.append($formActions); + } +}); diff --git a/lib/zin/wg/detailbody/v1.php b/lib/zin/wg/detailbody/v1.php index 4e9d245078..38f327d086 100644 --- a/lib/zin/wg/detailbody/v1.php +++ b/lib/zin/wg/detailbody/v1.php @@ -13,9 +13,13 @@ class detailBody extends wg 'side' => array('map' => 'detailSide'), 'bottom' => array('map' => 'history,fileList'), 'floating' => array('map' => 'floatToolbar'), - 'fixedActions' => array(), ); + public static function getPageJS(): string|false + { + return file_get_contents(__DIR__ . DS . 'js' . DS . 'v1.js'); + } + protected function build() { $main = $this->block('main'); @@ -41,9 +45,9 @@ class detailBody extends wg ); } - return form + return formBase ( - set::actionsClass('h-14 flex flex-auto items-center justify-center shadow'), + set::actionsClass('h-14 flex flex-none items-center justify-center shadow'), setClass('detail-body rounded col of-y-hidden bg-white'), set($this->props->skip(array_keys(static::getDefinedProps()))), setStyle('height', 'calc(100vh - 120px)'), @@ -53,6 +57,7 @@ class detailBody extends wg div ( setClass('flex'), + setStyle('min-height', '100%'), div ( setClass('col grow'),