From e9408ae4ae488b5652e491bf898b6a80def160a9 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 26 Sep 2022 08:49:17 +0800 Subject: [PATCH] * Fix the bug which autofill the title for creating doc. --- module/doc/js/create.js | 2 +- module/doc/view/create.html.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/doc/js/create.js b/module/doc/js/create.js index 7c70650790..9745391a60 100644 --- a/module/doc/js/create.js +++ b/module/doc/js/create.js @@ -62,7 +62,7 @@ $(function() if($(".createCustomLib").length == 1) $(".createCustomLib").click(); // Fix bug #15139. - if(!fromGlobal && textType.indexOf(docType) != -1) + if(!fromGlobal && textType.indexOf(docType) != -1 && from == 'doc') { var basicInfo = JSON.parse(sessionStorage.getItem('docBasicInfo')); diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 5ce268c485..ff22a206ab 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -10,6 +10,7 @@ * @link http://www.zentao.net */ ?> + doc->textTypes, $docType) !== false and $from == 'doc'):?>