From 61c23273610766c43e893e99e640f2a8ce0efd01 Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 19 Nov 2024 11:28:26 +0800 Subject: [PATCH] * [ui] fix whitelist box not show in move doc modal in mine space. --- module/doc/js/batchmovedoc.ui.js | 6 ++++-- module/doc/ui/batchmovedoc.html.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/doc/js/batchmovedoc.ui.js b/module/doc/js/batchmovedoc.ui.js index 51b0450df4..45eaef3e64 100644 --- a/module/doc/js/batchmovedoc.ui.js +++ b/module/doc/js/batchmovedoc.ui.js @@ -12,6 +12,8 @@ window.changeLib = function(e) window.toggleDocAcl = function(e) { - $this = $(e.target); - $this.closest('form').find('#whiteListBox').toggleClass('hidden', $(e.target).val() != 'private' || type == 'mine'); + const $this = $(e instanceof Event ? e.target : e); + const $form = $this.closest('form,.modal-body').first(); + const aclType = $form.find('[name="acl"]:checked').val(); + $form.find('#whiteListBox').toggleClass('hidden', type === 'mine' || aclType !== 'private'); }; diff --git a/module/doc/ui/batchmovedoc.html.php b/module/doc/ui/batchmovedoc.html.php index a00389f763..9ae299b71b 100644 --- a/module/doc/ui/batchmovedoc.html.php +++ b/module/doc/ui/batchmovedoc.html.php @@ -24,6 +24,7 @@ formPanel ( on::change('[name=space]', 'changeSpace'), on::change('[name=lib]', 'changeLib'), + on::init()->call('toggleDocAcl', jsRaw('$element')), formGroup ( set::width('5/6'),