From 7abf8585f3da5cbd2608f2da4bc18bdb695e4e6d Mon Sep 17 00:00:00 2001 From: zhouxin Date: Mon, 11 Nov 2024 09:42:21 +0800 Subject: [PATCH] * [task#131758,doing,0.5h] ajax load parent type by scope. --- module/tree/js/edit.ui.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/module/tree/js/edit.ui.js b/module/tree/js/edit.ui.js index 5bed556104..02a55c8c94 100644 --- a/module/tree/js/edit.ui.js +++ b/module/tree/js/edit.ui.js @@ -46,17 +46,24 @@ function changeRoot() var confirmRoot = type == 'doc' ? confirmRoot4Doc : confirmRoot; if(moduleRoot != root) { - zui.Modal.confirm(confirmRoot).then(result => + if(type == 'docTemplate') { - if(result) + ajaxLoadModules(root, 0, 'docTemplate', moduleID); + } + else + { + zui.Modal.confirm(confirmRoot).then(result => { - ajaxLoadModules(root, 0, type != 'doc' ? 'story' : type, moduleID); - } - else - { - $('[name=root]').zui('picker').$.setValue(moduleRoot); - } - }); + if(result) + { + ajaxLoadModules(root, 0, type != 'doc' ? 'story' : type, moduleID); + } + else + { + $('[name=root]').zui('picker').$.setValue(moduleRoot); + } + }); + } } else {