From cdfd9aa5b2397cd95b6b7a5e5d9b33eb8bc1d7e3 Mon Sep 17 00:00:00 2001 From: sunhao Date: Thu, 28 Dec 2023 14:06:53 +0800 Subject: [PATCH] * zin: close other modals on open modal from float toolbar. --- lib/zin/wg/floattoolbar/v1.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/zin/wg/floattoolbar/v1.php b/lib/zin/wg/floattoolbar/v1.php index a698647307..bb1e89ed44 100644 --- a/lib/zin/wg/floattoolbar/v1.php +++ b/lib/zin/wg/floattoolbar/v1.php @@ -38,6 +38,9 @@ class floatToolbar extends wg $className = 'ghost'; if(!empty($item['className'])) $className .= ' ' . $item['className']; + + /* Close other modals on open modal from float toolbar. */ + if(isset($item['data-toggle']) && $item['data-toggle'] === 'modal' && (!empty($item['url']) || !empty($item['data-url'])) && !isset($item['data-close-others'])) $item['data-close-others'] = true; $btns[] = btn(set($item), setClass($className)); } return $btns;