From 1357480ac68e81c55077d140c7dab1c2d3bfef58 Mon Sep 17 00:00:00 2001 From: zenggang Date: Wed, 23 Mar 2022 07:54:03 +0000 Subject: [PATCH] * Finish task#51109,51108,51128 --- module/bug/model.php | 2 ++ module/common/model.php | 2 +- module/doc/control.php | 2 ++ module/doc/js/create.js | 2 ++ module/doc/js/selectlibtype.js | 9 ++++++++- module/doc/lang/en.php | 2 ++ module/doc/lang/zh-cn.php | 2 ++ module/doc/view/create.html.php | 3 +++ module/doc/view/selectlibtype.html.php | 3 ++- module/install/css/common.css | 2 +- module/tutorial/control.php | 2 ++ module/upgrade/css/common.css | 2 +- 12 files changed, 28 insertions(+), 5 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index d07cfe6a95..6c663c6fd2 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1783,6 +1783,8 @@ class bugModel extends model public function getProductMemberPairs($productID) { + if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs(); + $projects = $this->loadModel('product')->getProjectPairsByProduct($productID); $users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1') diff --git a/module/common/model.php b/module/common/model.php index 8fb318c3ec..974e31c88c 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -577,7 +577,7 @@ class commonModel extends model $params = "objectType=&objectID=0&libID=0"; $createMethod = 'selectLibType'; $isOnlyBody = true; - $attr = "class='iframe' data-width='650px'"; + $attr = "class='iframe' data-width='700px'"; break; case 'project': if($config->vision == 'lite') diff --git a/module/doc/control.php b/module/doc/control.php index 5bc5930f08..280558756a 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -351,6 +351,8 @@ class doc extends control $this->view->title = $libName . $this->lang->doc->create; + $this->view->objectType = $objectType; + $this->view->objectID = $objectID; $this->view->libID = $libID; $this->view->libs = $libs; $this->view->gobackLink = $gobackLink; diff --git a/module/doc/js/create.js b/module/doc/js/create.js index d6e045d74d..bc3b5b57a6 100644 --- a/module/doc/js/create.js +++ b/module/doc/js/create.js @@ -59,6 +59,8 @@ $(function() } }, 200); }); + + if($(".createCustomLib").length == 1) $(".createCustomLib").click(); // Fix bug #15139. }) function toggleEditor(type) diff --git a/module/doc/js/selectlibtype.js b/module/doc/js/selectlibtype.js index d0983905aa..2b1db0b934 100644 --- a/module/doc/js/selectlibtype.js +++ b/module/doc/js/selectlibtype.js @@ -8,6 +8,13 @@ function redirectParentWindow(objectType) { config.onlybody = 'no'; - var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=0') + '#app=doc'; + if(objectType == 'api') + { + var link = createLink('api', 'create', 'libID=0') + '#app=doc'; + } + else + { + var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=0') + '#app=doc'; + } window.parent.$.apps.open(link); } diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 263a30f556..f21f1e0258 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -127,6 +127,8 @@ if($config->systemMode == 'new') $lang->doc->libTypeList['project'] = 'Project L $lang->doc->libTypeList['execution'] = $lang->execution->common . ' Library'; $lang->doc->libTypeList['custom'] = 'Custom Library'; +$lang->doc->libGlobalList['api'] = 'Api Libray'; + $lang->doc->libIconList['product'] = 'icon-product'; $lang->doc->libIconList['execution'] = 'icon-stack'; $lang->doc->libIconList['custom'] = 'icon-folder-o'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index cfbd42c599..279b396419 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -127,6 +127,8 @@ if($config->systemMode == 'new') $lang->doc->libTypeList['project'] = '项目文 $lang->doc->libTypeList['execution'] = $lang->execution->common . '文档库'; $lang->doc->libTypeList['custom'] = '自定义文档库'; +$lang->doc->libGlobalList['api'] = '接口文档库'; + $lang->doc->libIconList['product'] = 'icon-product'; $lang->doc->libIconList['execution'] = 'icon-stack'; $lang->doc->libIconList['custom'] = 'icon-folder-o'; diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 83f3ec807b..55190bbf02 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -45,6 +45,9 @@ $("a[href^='###']").click(function()

doc->create;?>

+ + ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?> +
diff --git a/module/doc/view/selectlibtype.html.php b/module/doc/view/selectlibtype.html.php index 13712afe88..dea3ce77c7 100644 --- a/module/doc/view/selectlibtype.html.php +++ b/module/doc/view/selectlibtype.html.php @@ -21,7 +21,8 @@
- + doc->libTypeList + $lang->doc->libGlobalList;?> + diff --git a/module/install/css/common.css b/module/install/css/common.css index a20948a759..bd54cb17bf 100644 --- a/module/install/css/common.css +++ b/module/install/css/common.css @@ -1,6 +1,6 @@ body {background: #f1f1f1;} .container {padding: 0;} -.modal-dialog {width: 100%;} +.modal-dialog {width: 100%; margin-top:20px;} .modal-footer {text-align: center; margin-top: 0;} .w-350px {width: 350px;} diff --git a/module/tutorial/control.php b/module/tutorial/control.php index f09b4f00f4..5ec68c3d0c 100644 --- a/module/tutorial/control.php +++ b/module/tutorial/control.php @@ -127,6 +127,8 @@ class tutorial extends control if(($module == 'story' or $module == 'task' or $module == 'bug') and $method == 'create') $target = 'self'; if($module == 'execution' and $method == 'linkStory') $target = 'self'; if($module == 'execution' and $method == 'managemembers') $target = 'self'; + + if(helper::isAjaxRequest()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => helper::createLink('tutorial', 'wizard', "module=$module&method=$method¶ms=" . helper::safe64Encode($params)))); return print(js::locate(helper::createLink('tutorial', 'wizard', "module=$module&method=$method¶ms=" . helper::safe64Encode($params)), $target)); } echo $this->fetch($module, $method, $params); diff --git a/module/upgrade/css/common.css b/module/upgrade/css/common.css index 41a9a00363..137b5f74be 100644 --- a/module/upgrade/css/common.css +++ b/module/upgrade/css/common.css @@ -1,6 +1,6 @@ body {background: #f1f1f1; padding: 0;} .container {padding: 0;} -.modal-dialog {width: 800px;} +.modal-dialog {width: 800px; margin-top:20px;} .modal-footer {text-align: center; margin-top: 0;} .table,.alert {margin: 0;}
doc->libType;?>doc->libTypeList, key($lang->doc->libTypeList));?>
confirm);?>