From fd209a3167ca7427ed39dd5c1c6d95bb94ae0b71 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 14 Mar 2023 15:53:03 +0800 Subject: [PATCH 001/328] * Finish task 87399. --- extension/lite/common/ext/lang/de/lite.php | 21 +++++---------- extension/lite/common/ext/lang/en/lite.php | 21 +++++---------- extension/lite/common/ext/lang/fr/lite.php | 21 +++++---------- extension/lite/common/ext/lang/zh-cn/lite.php | 20 +++++--------- module/common/lang/de.php | 27 +++++++++++-------- module/common/lang/en.php | 27 +++++++++++-------- module/common/lang/fr.php | 27 +++++++++++-------- module/common/lang/menu.php | 26 +++++++----------- module/common/lang/zh-cn.php | 27 +++++++++++-------- 9 files changed, 98 insertions(+), 119 deletions(-) diff --git a/extension/lite/common/ext/lang/de/lite.php b/extension/lite/common/ext/lang/de/lite.php index 5aaca40bd0..2b0ee42efe 100644 --- a/extension/lite/common/ext/lang/de/lite.php +++ b/extension/lite/common/ext/lang/de/lite.php @@ -113,32 +113,23 @@ $lang->kanbanProject->menu->settings['subMenu']->view = array('link' => " $lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team'); $lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel'); -unset($lang->doc->menu->product); -unset($lang->doc->menu->api); -unset($lang->doc->menu->execution); - $lang->URCommon = 'Story'; $lang->SRCommon = 'Story'; /* Doc menu. */ $lang->doc->menu = new stdclass(); $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index"); -$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent'); -$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); -$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); -$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); -$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); +$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); +$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); +$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',project,'; /* Doc menu order. */ -$lang->doc->menuOrder = array(); $lang->doc->menuOrder[5] = 'dashboard'; -$lang->doc->menuOrder[10] = 'recent'; -$lang->doc->menuOrder[15] = 'my'; -$lang->doc->menuOrder[20] = 'collect'; -$lang->doc->menuOrder[25] = $lang->projectCommon; -$lang->doc->menuOrder[30] = 'custom'; +$lang->doc->menuOrder[10] = 'my'; +$lang->doc->menuOrder[15] = 'project'; +$lang->doc->menuOrder[20] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); diff --git a/extension/lite/common/ext/lang/en/lite.php b/extension/lite/common/ext/lang/en/lite.php index 5aaca40bd0..2b0ee42efe 100644 --- a/extension/lite/common/ext/lang/en/lite.php +++ b/extension/lite/common/ext/lang/en/lite.php @@ -113,32 +113,23 @@ $lang->kanbanProject->menu->settings['subMenu']->view = array('link' => " $lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team'); $lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel'); -unset($lang->doc->menu->product); -unset($lang->doc->menu->api); -unset($lang->doc->menu->execution); - $lang->URCommon = 'Story'; $lang->SRCommon = 'Story'; /* Doc menu. */ $lang->doc->menu = new stdclass(); $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index"); -$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent'); -$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); -$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); -$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); -$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); +$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); +$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); +$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',project,'; /* Doc menu order. */ -$lang->doc->menuOrder = array(); $lang->doc->menuOrder[5] = 'dashboard'; -$lang->doc->menuOrder[10] = 'recent'; -$lang->doc->menuOrder[15] = 'my'; -$lang->doc->menuOrder[20] = 'collect'; -$lang->doc->menuOrder[25] = $lang->projectCommon; -$lang->doc->menuOrder[30] = 'custom'; +$lang->doc->menuOrder[10] = 'my'; +$lang->doc->menuOrder[15] = 'project'; +$lang->doc->menuOrder[20] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); diff --git a/extension/lite/common/ext/lang/fr/lite.php b/extension/lite/common/ext/lang/fr/lite.php index 5aaca40bd0..2b0ee42efe 100644 --- a/extension/lite/common/ext/lang/fr/lite.php +++ b/extension/lite/common/ext/lang/fr/lite.php @@ -113,32 +113,23 @@ $lang->kanbanProject->menu->settings['subMenu']->view = array('link' => " $lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team'); $lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel'); -unset($lang->doc->menu->product); -unset($lang->doc->menu->api); -unset($lang->doc->menu->execution); - $lang->URCommon = 'Story'; $lang->SRCommon = 'Story'; /* Doc menu. */ $lang->doc->menu = new stdclass(); $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index"); -$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent'); -$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); -$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); -$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); -$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); +$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); +$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); +$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',project,'; /* Doc menu order. */ -$lang->doc->menuOrder = array(); $lang->doc->menuOrder[5] = 'dashboard'; -$lang->doc->menuOrder[10] = 'recent'; -$lang->doc->menuOrder[15] = 'my'; -$lang->doc->menuOrder[20] = 'collect'; -$lang->doc->menuOrder[25] = $lang->projectCommon; -$lang->doc->menuOrder[30] = 'custom'; +$lang->doc->menuOrder[10] = 'my'; +$lang->doc->menuOrder[15] = 'project'; +$lang->doc->menuOrder[20] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); diff --git a/extension/lite/common/ext/lang/zh-cn/lite.php b/extension/lite/common/ext/lang/zh-cn/lite.php index 14ec03eca2..10828c9c91 100644 --- a/extension/lite/common/ext/lang/zh-cn/lite.php +++ b/extension/lite/common/ext/lang/zh-cn/lite.php @@ -113,32 +113,24 @@ $lang->kanbanProject->menu->settings['subMenu']->view = array('link' => " $lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team'); $lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel'); -unset($lang->doc->menu->product); -unset($lang->doc->menu->api); -unset($lang->doc->menu->execution); - $lang->URCommon = '目标'; $lang->SRCommon = '目标'; /* Doc menu. */ $lang->doc->menu = new stdclass(); $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index"); -$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent'); -$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); -$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); -$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); -$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); +$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); +$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); +$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',project,'; /* Doc menu order. */ $lang->doc->menuOrder = array(); $lang->doc->menuOrder[5] = 'dashboard'; -$lang->doc->menuOrder[10] = 'recent'; -$lang->doc->menuOrder[15] = 'my'; -$lang->doc->menuOrder[20] = 'collect'; -$lang->doc->menuOrder[25] = 'project'; -$lang->doc->menuOrder[30] = 'custom'; +$lang->doc->menuOrder[10] = 'my'; +$lang->doc->menuOrder[15] = 'project'; +$lang->doc->menuOrder[20] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 94980fb14c..43694b6299 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -275,17 +275,22 @@ $lang->project->kanban = $lang->projectCommon . ' Kanban'; $lang->execution->executionKanban = "{$lang->execution->common} Kanban"; $lang->execution->all = "{$lang->execution->common} List"; -$lang->doc->recent = 'Recent'; -$lang->doc->my = 'My'; -$lang->doc->favorite = 'Favorite'; -$lang->doc->product = $lang->productCommon; -$lang->doc->project = $lang->projectCommon; -$lang->doc->api = 'API'; -$lang->doc->execution = $lang->execution->common; -$lang->doc->custom = 'Custom'; -$lang->doc->wiki = 'WIKI'; -$lang->doc->apiDoc = 'API Docuemnt'; -$lang->doc->apiStruct = 'Data Structure'; +$lang->doc->recent = 'Recent'; +$lang->doc->my = 'My'; +$lang->doc->favorite = 'Favorite'; +$lang->doc->product = $lang->productCommon; +$lang->doc->project = $lang->projectCommon; +$lang->doc->api = 'API'; +$lang->doc->execution = $lang->execution->common; +$lang->doc->custom = 'Custom'; +$lang->doc->wiki = 'WIKI'; +$lang->doc->apiDoc = 'API Docuemnt'; +$lang->doc->apiStruct = 'Data Structure'; +$lang->doc->mySpace = 'My Space'; +$lang->doc->productSpace = "{$lang->productCommon} Space"; +$lang->doc->projectSpace = "{$lang->projectCommon} Space"; +$lang->doc->apiSpace = 'API Space'; +$lang->doc->teamSpace = 'Team Space'; $lang->product->list = $lang->productCommon . ' List'; $lang->product->kanban = $lang->productCommon . ' Kanban'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index c041725072..2921c825c3 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -275,17 +275,22 @@ $lang->project->kanban = $lang->projectCommon . ' Kanban'; $lang->execution->executionKanban = "{$lang->execution->common} Kanban"; $lang->execution->all = "{$lang->execution->common} List"; -$lang->doc->recent = 'Recent'; -$lang->doc->my = 'My'; -$lang->doc->favorite = 'Favorite'; -$lang->doc->product = $lang->productCommon; -$lang->doc->project = $lang->projectCommon; -$lang->doc->api = 'API'; -$lang->doc->execution = $lang->execution->common; -$lang->doc->custom = 'Custom'; -$lang->doc->wiki = 'WIKI'; -$lang->doc->apiDoc = 'API Docuemnt'; -$lang->doc->apiStruct = 'Data Structure'; +$lang->doc->recent = 'Recent'; +$lang->doc->my = 'My'; +$lang->doc->favorite = 'Favorite'; +$lang->doc->product = $lang->productCommon; +$lang->doc->project = $lang->projectCommon; +$lang->doc->api = 'API'; +$lang->doc->execution = $lang->execution->common; +$lang->doc->custom = 'Custom'; +$lang->doc->wiki = 'WIKI'; +$lang->doc->apiDoc = 'API Docuemnt'; +$lang->doc->apiStruct = 'Data Structure'; +$lang->doc->mySpace = 'My Space'; +$lang->doc->productSpace = "{$lang->productCommon} Space"; +$lang->doc->projectSpace = "{$lang->projectCommon} Space"; +$lang->doc->apiSpace = 'API Space'; +$lang->doc->teamSpace = 'Team Space'; $lang->product->list = $lang->productCommon . ' List'; $lang->product->kanban = $lang->productCommon . ' Kanban'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index e7496a09a8..d09cea42fc 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -275,17 +275,22 @@ $lang->project->kanban = $lang->projectCommon . ' Kanban'; $lang->execution->executionKanban = "{$lang->execution->common} Kanban"; $lang->execution->all = "{$lang->execution->common} List"; -$lang->doc->recent = 'Recent'; -$lang->doc->my = 'My'; -$lang->doc->favorite = 'Favorite'; -$lang->doc->product = $lang->productCommon; -$lang->doc->project = $lang->projectCommon; -$lang->doc->api = 'API'; -$lang->doc->execution = $lang->execution->common; -$lang->doc->custom = 'Custom'; -$lang->doc->wiki = 'WIKI'; -$lang->doc->apiDoc = 'API Docuemnt'; -$lang->doc->apiStruct = 'Data Structure'; +$lang->doc->recent = 'Recent'; +$lang->doc->my = 'My'; +$lang->doc->favorite = 'Favorite'; +$lang->doc->product = $lang->productCommon; +$lang->doc->project = $lang->projectCommon; +$lang->doc->api = 'API'; +$lang->doc->execution = $lang->execution->common; +$lang->doc->custom = 'Custom'; +$lang->doc->wiki = 'WIKI'; +$lang->doc->apiDoc = 'API Docuemnt'; +$lang->doc->apiStruct = 'Data Structure'; +$lang->doc->mySpace = 'My Space'; +$lang->doc->productSpace = "{$lang->productCommon} Space"; +$lang->doc->projectSpace = "{$lang->projectCommon} Space"; +$lang->doc->apiSpace = 'API Space'; +$lang->doc->teamSpace = 'Team Space'; $lang->product->list = $lang->productCommon . ' List'; $lang->product->kanban = $lang->productCommon . ' Kanban'; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index c9904f160c..5b48beb9c9 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -507,27 +507,21 @@ $lang->kanban->menu = new stdclass(); /* Doc menu. */ $lang->doc->menu = new stdclass(); $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index"); -$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent'); -$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); -$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); -$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'showfiles,product'); -$lang->doc->menu->api = array('link' => "{$lang->doc->api}|api|index", 'alias' => 'api'); -$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); -$lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution'); -$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); +$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); +$lang->doc->menu->product = array('link' => "{$lang->doc->productSpace}|doc|tableContents|type=product", 'alias' => 'showfiles,product'); +$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); +$lang->doc->menu->api = array('link' => "{$lang->doc->apiSpace}|api|index", 'alias' => 'api'); +$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',product,'; /* Doc menu order. */ $lang->doc->menuOrder[5] = 'dashboard'; -$lang->doc->menuOrder[10] = 'recent'; -$lang->doc->menuOrder[15] = 'my'; -$lang->doc->menuOrder[20] = 'collect'; -$lang->doc->menuOrder[25] = 'product'; -$lang->doc->menuOrder[30] = 'project'; -$lang->doc->menuOrder[35] = 'execution'; -$lang->doc->menuOrder[36] = 'api'; -$lang->doc->menuOrder[40] = 'custom'; +$lang->doc->menuOrder[10] = 'my'; +$lang->doc->menuOrder[15] = 'product'; +$lang->doc->menuOrder[20] = 'project'; +$lang->doc->menuOrder[25] = 'api'; +$lang->doc->menuOrder[30] = 'custom'; $lang->doc->menu->product['subMenu'] = new stdclass(); $lang->doc->menu->project['subMenu'] = new stdclass(); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 4f8b53fb0a..6a421d6283 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -275,17 +275,22 @@ $lang->project->kanban = $lang->projectCommon . '看板'; $lang->execution->executionKanban = "{$lang->execution->common}看板"; $lang->execution->all = "{$lang->execution->common}列表"; -$lang->doc->recent = '最近文档'; -$lang->doc->my = '我的文档'; -$lang->doc->favorite = '我的收藏'; -$lang->doc->product = $lang->productCommon . '库'; -$lang->doc->project = $lang->projectCommon . '库'; -$lang->doc->api = '接口库'; -$lang->doc->execution = "{$lang->execution->common}库"; -$lang->doc->custom = '自定义库'; -$lang->doc->wiki = 'WIKI'; -$lang->doc->apiDoc = '文档'; -$lang->doc->apiStruct = '数据结构'; +$lang->doc->recent = '最近文档'; +$lang->doc->my = '我的文档'; +$lang->doc->favorite = '我的收藏'; +$lang->doc->product = $lang->productCommon . '库'; +$lang->doc->project = $lang->projectCommon . '库'; +$lang->doc->api = '接口库'; +$lang->doc->execution = "{$lang->execution->common}库"; +$lang->doc->custom = '自定义库'; +$lang->doc->wiki = 'WIKI'; +$lang->doc->apiDoc = '文档'; +$lang->doc->apiStruct = '数据结构'; +$lang->doc->mySpace = '我的空间'; +$lang->doc->productSpace = "{$lang->productCommon}空间"; +$lang->doc->projectSpace = "{$lang->projectCommon}空间"; +$lang->doc->apiSpace = '接口空间'; +$lang->doc->teamSpace = '团队空间'; $lang->product->list = $lang->productCommon . '列表'; $lang->product->kanban = $lang->productCommon . '看板'; From a3c924edca25dc27409d4e48690d158baaae8222 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 15 Mar 2023 15:00:05 +0800 Subject: [PATCH 002/328] * Finish task 87401,87413. --- module/doc/control.php | 8 ++- module/doc/model.php | 139 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 138 insertions(+), 9 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 62a201ffee..f1a858cefc 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1282,15 +1282,17 @@ class doc extends control * @access public * @return void */ - public function tableContents($type, $objectID = 0, $libID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function tableContents($type, $objectID = 0, $libID = 0, $moduleID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { - list($libs, $libID, $object, $objectID) = $this->doc->setMenuByType($type, $objectID, $libID); $this->session->set('createProjectLocate', $this->app->getURI(true), 'doc'); - $libID = (int)$libID; + list($libs, $libID, $object, $objectID) = $this->doc->setMenuByType($type, $objectID, $libID); + $libID = (int)$libID; $moduleTree = $type == 'book' ? $this->doc->getBookStructure($libID) : $this->doc->getTreeMenu($type, $objectID, $libID); + $libTree = $this->doc->getLibTree($libID, $libs, $type, $moduleID, $objectID); + $title = ($type == 'book' or $type == 'custom') ? $this->lang->doc->tableContents : $object->name . $this->lang->colon . $this->lang->doc->tableContents; /* Build the search form. */ diff --git a/module/doc/model.php b/module/doc/model.php index c0e038bf34..3e5b36f0ec 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1428,8 +1428,8 @@ class docModel extends model ->andWhere('vision')->eq($this->config->vision) ->andWhere('type')->eq($type) ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() - ->beginIF($type == 'custom')->orderBy('`order` asc, id_desc')->fi() - ->beginIF($type == 'book')->orderBy('`order` asc, id_desc')->fi() + ->beginIF($type == 'custom')->orderBy('`order` asc, id_asc')->fi() + ->beginIF($type == 'book')->orderBy('`order` asc, id_asc')->fi() ->fetchAll('id'); } elseif($type != 'product' and $type != 'project' and $type != 'execution') @@ -1438,13 +1438,15 @@ class docModel extends model } else { + $executionList = array(); + if($type == 'project') $executionList = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($objectID)->fetchPairs(); $objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB) ->where('deleted')->eq(0) ->andWhere('vision')->eq($this->config->vision) ->andWhere($type)->eq($objectID) + ->beginIF(!empty($executionList))->orWhere('execution')->in($executionList)->fi() ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() - ->beginIF($type == 'project')->andWhere('execution')->eq(0)->fi() - ->orderBy('`order` asc, id_desc') + ->orderBy('`order` asc, id_asc') ->fetchAll('id'); } @@ -2810,6 +2812,7 @@ EOT; */ public function setMenuByType($type, $objectID, $libID, $appendLib = 0) { + $this->session->set('docList', $this->app->getURI(true), $this->app->tab); if(empty($type)) { $doclib = $this->getLibById($libID); @@ -2817,8 +2820,6 @@ EOT; $objectID = $type == 'custom' or $type == 'book' ? 0 : $doclib->$type; } - $this->session->set('docList', $this->app->getURI(true), $this->app->tab); - $objects = $this->getOrderedObjects($type); if($type == 'custom') @@ -3004,4 +3005,130 @@ EOT; $order++; } } + + /** + * Get module tree. + * + * @param int $rootID + * @param int $moduleID + * @param string $type doc|api + * @param int $parent + * @param array $modules + * @access public + * @return array + */ + public function getModuleTree($rootID, $moduleID = 0, $type = 'doc', $parent = 0, &$modules = array()) + { + if(empty($modules)) + { + $modules = $this->dao->select('*')->from(TABLE_MODULE) + ->where('root')->eq((int)$rootID) + ->andWhere('type')->eq($type) + ->andWhere('deleted')->eq(0) + ->orderBy('grade desc, `order`') + ->fetchAll('id'); + } + + $moduleTree = array(); + foreach($modules as $module) + { + if($module->parent != $parent) continue; + unset($modules[$module->id]); + + $item = new stdclass(); + $item->id = $module->id; + $item->name = $module->name; + $item->active = $module->id == $moduleID ? 1 : 0; + $item->children = $this->getModuleTree($rootID, $moduleID, $type, $module->id, $modules); + + $moduleTree[$module->id] = $item; + } + + return $moduleTree; + } + + /** + * Get lib tree. + * + * @param int $libID + * @param array $libs + * @param string $type product|project|api|custom + * @param int $moduleID + * @param int $objectID + * @param int $executionID + * @access public + * @return array + */ + public function getLibTree($libID, $libs, $type, $moduleID, $objectID = 0) + { + if($type == 'project') + { + $executionLibs = array(); + foreach($libs as $lib) + { + if($lib->type != 'execution') continue; + $executionLibs[$lib->execution][$libID] = $lib; + } + + $executionPairs = $this->dao->select('id,name')->from(TABLE_EXECUTION) + ->where('id')->in(array_keys($executionLibs)) + ->fetchPairs(); + } + + $libTree = array(); + foreach($libs as $lib) + { + $item = new stdclass(); + $item->id = $lib->id; + $item->type = $lib->type == 'api' ? 'api' : 'lib'; + $item->name = $lib->name; + $item->objectType = $type; + $item->objectID = $objectID; + $item->active = $lib->id == $libID ? 1 : 0; + $item->modules = $this->getModuleTree($lib->id, $moduleID, $lib->type == 'api' ? 'api' : 'doc'); + if($lib->type != 'execution') + { + $libTree[$lib->type][$lib->id] = $item; + } + else + { + $executionID = $lib->execution; + if(empty($libTree['execution'][$executionID])) + { + $execution = new stdclass(); + $execution->id = $executionID; + $execution->name = zget($executionPairs, $executionID); + $execution->type = 'execution'; + $execution->active = $item->active; + $execution->isMainLib = 0; + $execution->children = array(); + if(count($executionLibs[$executionID]) == 1) + { + $execution->id = $libID; + $execution->isMainLib = 1; + $execution->children = $item->modules; + } + + $libTree['execution'][$executionID] = $execution; + continue; + } + + $libTree['execution'][$executionID]->active = $item->active ? 1 : $libTree['execution'][$executionID]->active; + $libTree['execution'][$executionID]->children[$lib->id] = $item; + } + } + + if(in_array($type, array('product', 'project'))) + { + $libTree['annex'] = new stdclass(); + $libTree['annex']->id = 0; + $libTree['annex']->name = $this->lang->doclib->files; + $libTree['annex']->type = 'annex'; + $libTree['annex']->objectType = $type; + $libTree['annex']->objectID = $objectID; + $libTree['annex']->active = empty($libID) ? 1 : 0; + } + + return $libTree; + } } From 5d643989c99295293b0d09e12cdbc06bc4cd2123 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 15 Mar 2023 15:11:20 +0800 Subject: [PATCH 003/328] * Finish task 87411. --- module/doc/model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index 3e5b36f0ec..baaa457e14 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -3076,6 +3076,7 @@ EOT; } $libTree = array(); + $apiLibs = array(); foreach($libs as $lib) { $item = new stdclass(); @@ -3088,7 +3089,8 @@ EOT; $item->modules = $this->getModuleTree($lib->id, $moduleID, $lib->type == 'api' ? 'api' : 'doc'); if($lib->type != 'execution') { - $libTree[$lib->type][$lib->id] = $item; + if($item->type == 'lib') $libTree[$lib->type][$lib->id] = $item; + if($item->type == 'api') $apiLibs[$lib->id] = $item; } else { @@ -3120,6 +3122,8 @@ EOT; if(in_array($type, array('product', 'project'))) { + $libTree[$type] = array_merge($libTree[$type], $apiLibs); + $libTree['annex'] = new stdclass(); $libTree['annex']->id = 0; $libTree['annex']->name = $this->lang->doclib->files; From 0330d76e63a09bf0f01e39c9bfadc091c843d4ad Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 15 Mar 2023 16:44:11 +0800 Subject: [PATCH 004/328] * Adjust code . --- module/doc/view/side.html.php | 231 ++++++++++++++++------------------ 1 file changed, 107 insertions(+), 124 deletions(-) diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index 17ac0cbdf7..10bd3629df 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -16,141 +16,124 @@ $sideWidth = common::checkNotCN() ? '270' : '238'; ?>
-
- - "; - echo html::a('javascript:;', "", '', "data-toggle='dropdown' class='btn btn-link'"); - echo "
'; - } - - if($type == 'book' and ($canEditLib or $canManageBook)) - { - echo "'; - } - ?> -
- -
-
- doc->noChapter : $lang->doc->noModule;?> -
-
- - - - - - +
+ + From e1ee99ac6fe17d7f0447ed65da0765c1e6474682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=B7=91=E6=9D=B0?= Date: Mon, 20 Mar 2023 15:01:13 +0800 Subject: [PATCH 018/328] * Code for finish task #87420. --- module/doc/control.php | 19 +++++----- module/doc/css/tablecontents.css | 4 +++ module/doc/view/tablecontents.html.php | 50 ++++++++++++++++++++++++-- 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index b6b60eea72..7f02d43d36 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1299,6 +1299,13 @@ class doc extends control $actionURL = $this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&browseType=bySearch¶m=myQueryID"); $this->doc->buildSearchForm($libID, $libs, $queryID, $actionURL, $type); + /* Load pager. */ + $rawMethod = $this->app->rawMethod; + $this->app->rawMethod = 'tableContents'; + $this->app->loadClass('pager', $static = true); + $pager = new pager($recTotal, $recPerPage, $pageID); + $this->app->rawMethod = $rawMethod; + $this->view->title = $title; $this->view->type = $type; $this->view->browseType = $browseType; @@ -1306,18 +1313,12 @@ class doc extends control $this->view->users = $this->user->getPairs('noletter'); $this->view->libTree = $libTree; $this->view->moduleID = $moduleID; + $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); + $this->view->pager = $pager; + if($browseType == 'bySearch') { - /* Load pager. */ - $rawMethod = $this->app->rawMethod; - $this->app->rawMethod = 'tableContents'; - $this->app->loadClass('pager', $static = true); - $pager = new pager($recTotal, $recPerPage, $pageID); - $this->app->rawMethod = $rawMethod; - - $this->view->docs = $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $pager); $this->view->browseType = 'bySearch'; - $this->view->pager = $pager; $this->display('doc', 'browse', "browseType=bySearch¶m=$queryID"); } else diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index c6ebb3ea36..8d322f9623 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -50,3 +50,7 @@ li.drag-shadow ul {display: none!important;} .flex-center {display: flex; align-items: center; justify-content: space-between;} .tree li>.list-toggle {top: 4px;} +#mainContent .table-empty-tip > p, #createDocs {display: inline-block;} +.createDropdown a.btn-primary, .createDropdown a.btn-info {border-right: 1px solid rgba(255,255,255,0.2);} +.createDropdown button.dropdown-toggle.btn-primary, .createDropdown button.dropdown-toggle.btn-info {padding: 6px;} +.createDropdown ul > li {text-align: left;} diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index 3fc4898f80..c5579f66f9 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -35,8 +35,9 @@ { if($libID) { - $html = "
-
+
>
+ +
+

+ doc->noDoc;?> + "; + $html .= html::a($this->createLink('doc', 'createBasicInfo', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&type=html", '', true), " {$lang->doc->create}", '', "class='btn btn-info iframe'"); + $html .= ""; + $html .= "

'; + echo $html; + } + } + ?> +

+
+ +
From 15ab08380bb113ec3d8451741372ea1a2b511167 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 20 Mar 2023 16:13:14 +0800 Subject: [PATCH 019/328] * Adjust code . --- module/doc/css/tablecontents.css | 2 ++ module/doc/view/tablecontents.html.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index 8d322f9623..a14989c7d1 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -50,6 +50,8 @@ li.drag-shadow ul {display: none!important;} .flex-center {display: flex; align-items: center; justify-content: space-between;} .tree li>.list-toggle {top: 4px;} +.spliter {flex: 0 0 15px;} + #mainContent .table-empty-tip > p, #createDocs {display: inline-block;} .createDropdown a.btn-primary, .createDropdown a.btn-info {border-right: 1px solid rgba(255,255,255,0.2);} .createDropdown button.dropdown-toggle.btn-primary, .createDropdown button.dropdown-toggle.btn-info {padding: 6px;} diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index c5579f66f9..ec1fc25737 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -65,11 +65,12 @@ ?> -
+
-
+
+
>
From 92f8c14b52f87768d3abd271620d010412584c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=B7=91=E6=9D=B0?= Date: Mon, 20 Mar 2023 16:21:29 +0800 Subject: [PATCH 020/328] * Code for finish task #87406. --- module/doc/control.php | 4 +- module/doc/css/tablecontents.css | 3 ++ module/doc/lang/de.php | 8 ++-- module/doc/lang/en.php | 8 ++-- module/doc/lang/fr.php | 8 ++-- module/doc/lang/zh-cn.php | 8 ++-- module/doc/view/tablecontents.html.php | 53 ++++++++++++++++++++++++++ 7 files changed, 74 insertions(+), 18 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 7f02d43d36..2621d517f1 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1296,7 +1296,7 @@ class doc extends control /* Build the search form. */ $queryID = $browseType == 'bySearch' ? (int)$param : 0; - $actionURL = $this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&browseType=bySearch¶m=myQueryID"); + $actionURL = $this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=0&browseType=bySearch¶m=myQueryID"); $this->doc->buildSearchForm($libID, $libs, $queryID, $actionURL, $type); /* Load pager. */ @@ -1313,7 +1313,7 @@ class doc extends control $this->view->users = $this->user->getPairs('noletter'); $this->view->libTree = $libTree; $this->view->moduleID = $moduleID; - $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); + $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, 0, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); $this->view->pager = $pager; if($browseType == 'bySearch') diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index a14989c7d1..b55c62f588 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -56,3 +56,6 @@ li.drag-shadow ul {display: none!important;} .createDropdown a.btn-primary, .createDropdown a.btn-info {border-right: 1px solid rgba(255,255,255,0.2);} .createDropdown button.dropdown-toggle.btn-primary, .createDropdown button.dropdown-toggle.btn-info {padding: 6px;} .createDropdown ul > li {text-align: left;} + +.table .c-name > a.iframe {display: inline-block; max-width: 90%;} +.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: -3px;} diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index 0cf0dec48d..a41fe145bf 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -61,10 +61,10 @@ $lang->doc->keywords = 'Tags'; $lang->doc->url = 'URL'; $lang->doc->files = 'Datei'; $lang->doc->addedBy = 'Angelegt von'; -$lang->doc->addedByAB = 'Added'; -$lang->doc->addedDate = 'Angelegt am'; +$lang->doc->addedByAB = 'CreatedBy'; +$lang->doc->addedDate = 'CreatedDate'; $lang->doc->editedBy = 'Bearbeitet von'; -$lang->doc->editedDate = 'Bearbeitet am'; +$lang->doc->editedDate = 'UpdatedDate'; $lang->doc->lastEditedBy = 'Last Editor'; $lang->doc->version = 'Version'; $lang->doc->basicInfo = 'Basis Info'; @@ -143,7 +143,7 @@ $lang->doc->libName = 'Name'; $lang->doc->libType = 'Kategorie'; $lang->doc->custom = 'Eigene Dok Bibliothek'; $lang->doc->customAB = 'Eigene Bibliothek'; -$lang->doc->createLib = 'Document Library'; +$lang->doc->createLib = 'Create Library'; $lang->doc->allLibs = 'Bibliothek'; $lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothek Liste"; $lang->doc->showFiles = 'Dok Bibliothek'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 2dd01ef1d2..37c301d4f7 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -61,10 +61,10 @@ $lang->doc->keywords = 'Tags'; $lang->doc->url = 'URL'; $lang->doc->files = 'Files'; $lang->doc->addedBy = 'Author'; -$lang->doc->addedByAB = 'Added'; -$lang->doc->addedDate = 'Added'; +$lang->doc->addedByAB = 'CreatedBy'; +$lang->doc->addedDate = 'CreatedDate'; $lang->doc->editedBy = 'UpdatedBy'; -$lang->doc->editedDate = 'Updated'; +$lang->doc->editedDate = 'UpdatedDate'; $lang->doc->lastEditedBy = 'Last Editor'; $lang->doc->version = 'Version'; $lang->doc->basicInfo = 'Basic Information'; @@ -143,7 +143,7 @@ $lang->doc->libName = 'Document Library'; $lang->doc->libType = 'Category'; $lang->doc->custom = 'Custom Document Library'; $lang->doc->customAB = 'Custom Doc Lib'; -$lang->doc->createLib = 'Document Library'; +$lang->doc->createLib = 'Create Library'; $lang->doc->allLibs = 'Library List'; $lang->doc->objectLibs = "Document View of Library"; $lang->doc->showFiles = 'Attachments'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index a455f1c843..05a492908b 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -61,10 +61,10 @@ $lang->doc->keywords = 'Tags'; $lang->doc->url = 'URL'; $lang->doc->files = 'Fichiers'; $lang->doc->addedBy = 'Auteur'; -$lang->doc->addedByAB = 'Added'; -$lang->doc->addedDate = 'Ajouté le'; +$lang->doc->addedByAB = 'CreatedBy'; +$lang->doc->addedDate = 'CreatedDate'; $lang->doc->editedBy = 'Màj par'; -$lang->doc->editedDate = 'Màj le'; +$lang->doc->editedDate = 'UpdatedDate'; $lang->doc->lastEditedBy = 'Last Editor'; $lang->doc->version = 'Version'; $lang->doc->basicInfo = 'Infos de Base'; @@ -143,7 +143,7 @@ $lang->doc->libName = 'Bibliothèque de Documents'; $lang->doc->libType = 'Catégorie'; $lang->doc->custom = 'Personnaliser Bibliothèque de Documents'; $lang->doc->customAB = 'Person. Bib Doc'; -$lang->doc->createLib = 'Document Library'; +$lang->doc->createLib = 'Create Library'; $lang->doc->allLibs = 'Liste des Bibliothèque'; $lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothèque"; $lang->doc->showFiles = 'Pièces Jointes'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 069f26ee90..a936d69271 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -62,9 +62,9 @@ $lang->doc->url = '文档URL'; $lang->doc->files = '附件'; $lang->doc->addedBy = '由谁添加'; $lang->doc->addedByAB = '创建者'; -$lang->doc->addedDate = '添加时间'; -$lang->doc->editedBy = '由谁更新'; -$lang->doc->editedDate = '更新时间'; +$lang->doc->addedDate = '创建时间'; +$lang->doc->editedBy = '修改者'; +$lang->doc->editedDate = '修改日期'; $lang->doc->lastEditedBy = '最后更新者'; $lang->doc->version = '版本号'; $lang->doc->basicInfo = '基本信息'; @@ -143,7 +143,7 @@ $lang->doc->libName = '文档库名称'; $lang->doc->libType = '文档库类型'; $lang->doc->custom = '自定义文档库'; $lang->doc->customAB = '自定义库'; -$lang->doc->createLib = '创建文档库'; +$lang->doc->createLib = '创建库'; $lang->doc->allLibs = '文档库列表'; $lang->doc->objectLibs = "文档库文档详情"; $lang->doc->showFiles = '附件库'; diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index ec1fc25737..eb9c3183f6 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -112,6 +112,59 @@

+
+ + + + + + + + + + + + + + + + + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> + collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> + + + + + + + + + + + + + +
doc->id;?>doc->title;?>doc->addedByAB;?>doc->addedDate;?>doc->editedBy;?>doc->editedDate;?>actions;?>
+ {$doc->id}";?> + createLink('doc', 'view', "docID=$doc->id&version=0", '', true), $doc->id, '', "title='{$doc->id}' data-app='{$this->app->tab}'");?> + + + {$doc->title}";?> + createLink('doc', 'view', "docID=$doc->id&version=0", '', true), "  " . $doc->title, '', "title='{$doc->title}' class='iframe' data-width='90%'");?> + + + id&objectType=doc");?>" title="" class='btn btn-link ajaxCollect'> + + addedBy);?>addedDate, 'y-m-d');?>editedBy);?>editedDate, 'y-m-d');?> + + id&comment=false", "", '', "title='{$lang->edit}' class='btn btn-link'", true, false)?> + id&confirm=no", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> + +
+ + + +
From 036fe270cdf8bc27f092f355aeee9756e4f3968a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=B7=91=E6=9D=B0?= Date: Mon, 20 Mar 2023 16:26:19 +0800 Subject: [PATCH 021/328] * Code for finish task #87406. --- module/doc/css/tablecontents.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index b55c62f588..5cda0e0625 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -1,5 +1,6 @@ .flex {display: flex;} .flex-full {flex: 1;} +.flex-full > .panel {box-shadow: none;} .float-r {float: right;} .h-full {height: 100%;} .w-full {width: 100%;}main-content {padding-top: 0; padding-bottom: 0;} From 14e434c11a5747c37e9f8be14fde1712d074b473 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Tue, 21 Mar 2023 09:26:05 +0800 Subject: [PATCH 022/328] * Code for task spliter . --- module/doc/css/tablecontents.css | 7 +- module/doc/js/tablecontents.js | 117 ++++++++++++++++++++++++- module/doc/view/tablecontents.html.php | 10 +-- 3 files changed, 126 insertions(+), 8 deletions(-) diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index 5cda0e0625..2e0c17b89a 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -1,9 +1,12 @@ .flex {display: flex;} -.flex-full {flex: 1;} +.flex-none {flex: none;} +.flex-auto {flex: auto;} .flex-full > .panel {box-shadow: none;} .float-r {float: right;} .h-full {height: 100%;} -.w-full {width: 100%;}main-content {padding-top: 0; padding-bottom: 0;} +.w-full {width: 100%;} +.overflow-x-auto {overflow-x: auto;} +main-content {padding-top: 0; padding-bottom: 0;} .main-content #createDropdown {display: inline-block;} .main-content #createDropdown ul {position: absolute;} #pageNav .dropdown-menu {max-height: inherit;} diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 258da8d47c..07f12b6088 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -183,5 +183,120 @@ $(function() { $('.dropdown-in-tree').css('display', 'none'); } - }) + }); + + function initSplitRow() + { + /* Init split row. */ + var NAME = 'zui.splitRow'; + /* The SplitRow model class. */ + var SplitRow = function(element, options) + { + var that = this; + that.name = NAME; + var $element = that.$ = $(element); + + options = that.options = $.extend({}, SplitRow.DEFAULTS, this.$.data(), options); + var id = options.id || $element.attr('id') || $.zui.uuid(); + var $cols = $element.children('.col'); + var $firstCol = $cols.first(); + var $secondCol = $cols.eq(1); + var $spliter = $firstCol.next('.col-spliter'); + if (!$spliter.length) + { + $spliter = $(options.spliter); + if (!$spliter.parent().length) + { + $spliter.insertAfter($firstCol); + } + } + var spliterWidth = $spliter.width(); + var minFirstColWidth = $firstCol.data('min-width'); + var minSecondColWidth = $secondCol.data('min-width'); + var rowWidth = $element.width(); + var setFirstColWidth = function(width) + { + var maxFirstWidth = 400; + width = Math.max(minFirstColWidth, Math.min(width, maxFirstWidth)); + $firstCol.width(width); + $secondCol.width($('#mainContent').width() - width); + $.zui.store.set('splitRowFirstSize:' + id, width); + }; + + var defaultWidth = $.zui.store.get('splitRowFirstSize:' + id); + if(typeof(defaultWidth) == 'undefined') defaultWidth = $element.width() * 0.33; + setFirstColWidth(defaultWidth); + + var documentEventName = '.' + id; + + var mouseDownX, isMouseDown, startFirstWidth, rafID; + $spliter.on('mousedown', function(e) + { + startFirstWidth = $firstCol.width(); + mouseDownX = e.pageX; + isMouseDown = true; + $element.addClass('row-spliting'); + e.preventDefault(); + var handleMouseMove = function(e) + { + if(isMouseDown) + { + var deltaX = e.pageX - mouseDownX; + setFirstColWidth(startFirstWidth + deltaX); + e.preventDefault(); + } + else + { + $(document).off(documentEventName); + $element.removeClass('row-spliting'); + } + }; + $(document).on('mousemove' + documentEventName, function(e) + { + if(rafID) cancelAnimationFrame(rafID); + rafID = requestAnimationFrame(function() + { + handleMouseMove(e); + rafID = 0; + }); + }).on('mouseup' + documentEventName + ' mouseleave' + documentEventName, function(e) + { + if(rafID) cancelAnimationFrame(rafID); + isMouseDown = false; + $(document).off(documentEventName); + $element.removeClass('row-spliting'); + }); + }); + }; + + /* default options. */ + SplitRow.DEFAULTS = + { + spliter: '
', + }; + + /* Extense jquery element. */ + $.fn.splitRow = function(option) + { + return this.each(function() + { + var $this = $(this); + var data = $this.data(NAME); + var options = typeof option == 'object' && option; + if(!data) $this.data(NAME, (data = new SplitRow(this, options))); + }); + }; + + SplitRow.NAME = NAME; + + $.fn.splitRow.Constructor = SplitRow; + + /* Auto call splitRow after document load complete. */ + $(function() + { + $('.split-row').splitRow(); + }); + } + + initSplitRow(); }) diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index eb9c3183f6..61908cc510 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -65,13 +65,13 @@ ?>
-
-
+
+ -
-
-
>
+
+
+
>

From 76f9f21288abd69de4dc12da690d17919d5f8ad1 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Mar 2023 09:27:00 +0800 Subject: [PATCH 023/328] * Code for finish task #88081. --- module/doc/control.php | 25 +----------------- module/doc/css/tablecontents.css | 1 + module/doc/lang/zh-cn.php | 2 +- module/doc/model.php | 4 +-- module/doc/view/tablecontents.html.php | 35 +++++++++++++++++--------- 5 files changed, 28 insertions(+), 39 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 2621d517f1..d718c5bce4 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -502,17 +502,14 @@ class doc extends control if($this->app->tab == 'product') { $this->product->setMenu($objectID); - unset($this->lang->product->menu->doc['subMenu']); } else if($this->app->tab == 'project') { $this->project->setMenu($objectID); - unset($this->lang->project->menu->doc['subMenu']); } else if($this->app->tab == 'execution') { $this->execution->setMenu($objectID); - unset($this->lang->execution->menu->doc['subMenu']); } else if($this->app->tab == 'my') { @@ -523,31 +520,11 @@ class doc extends control } else { - $this->app->rawMethod = $objectType; - - unset($this->lang->doc->menu->product['subMenu']); - unset($this->lang->doc->menu->custom['subMenu']); - unset($this->lang->doc->menu->project['subMenu']); - unset($this->lang->doc->menu->execution['subMenu']); - - /* High light menu. */ - if(strpos(',product,project,execution,custom,book,', ",$objectType,") !== false) - { - $menu = $this->lang->doc->menu->$objectType; - $menu['alias'] .= ',edit'; - $menu['subModule'] = 'doc'; - $this->lang->doc->menu->$objectType = $menu; - } + $this->app->rawMethod = $objectType == 'execution' ? 'project' : $objectType; } $this->config->showMainMenu = strpos(',html,markdown,text,', ",{$doc->type},") === false; - $objects = $this->doc->getOrderedObjects($objectType); - $appendLib = (!empty($lib) and $lib->deleted == '1') ? $libID : 0; - $libs = $this->doc->getLibsByObject($objectType, $objectID, '', $appendLib); - $this->lang->modulePageNav = $this->doc->select($objectType, $objects, $objectID, $libs, $libID); - $this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($objectType, $objectID, $libID) : ''; - $this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit; $this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name); $this->view->position[] = $this->lang->doc->edit; diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index 2e0c17b89a..14283a7776 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -63,3 +63,4 @@ li.drag-shadow ul {display: none!important;} .table .c-name > a.iframe {display: inline-block; max-width: 90%;} .table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: -3px;} +.panel th.c-id {width: 60px;} diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index a936d69271..1e0ab79cab 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -45,7 +45,7 @@ $lang->doclib->nameList['custom'] = '自定义文档库名称'; /* 字段列表。*/ $lang->doc->common = '文档'; -$lang->doc->id = '文档编号'; +$lang->doc->id = 'ID'; $lang->doc->product = '所属' . $lang->productCommon; $lang->doc->project = "所属{$lang->projectCommon}"; $lang->doc->execution = '所属' . $lang->execution->common; diff --git a/module/doc/model.php b/module/doc/model.php index 5ec0fb19ec..6db01f859b 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2737,7 +2737,7 @@ EOT; $libs = $this->getLibsByObject($type, $objectID, '', $appendLib); if($libID == 0 and !empty($libs)) $libID = reset($libs)->id; - if($this->app->tab == 'doc') $this->app->rawMethod = $type; + if($this->app->tab == 'doc') $this->app->rawMethod = $type == 'execution' ? 'project' : $type; $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); @@ -3018,7 +3018,7 @@ EOT; $libTree[$type][] = $annex; } - $libTree = $libTree[$type]; + $libTree = array_values($libTree[$type]); return $libTree; } } diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index 61908cc510..cd2aa67fe7 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -116,9 +116,7 @@ - - @@ -132,20 +130,33 @@ collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> - + {$type}) ? $doc->{$type} : 0;?> - From 219bc64db6599e6677aa843b20483704eff1bd14 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 21 Mar 2023 09:33:39 +0800 Subject: [PATCH 024/328] * Add doc page dropdown. --- module/doc/control.php | 21 +++++++++++---------- module/doc/model.php | 8 +++++--- module/doc/view/tablecontents.html.php | 1 + 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index d718c5bce4..9f7ca819b9 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1262,7 +1262,7 @@ class doc extends control { $this->session->set('createProjectLocate', $this->app->getURI(true), 'doc'); - list($libs, $libID, $object, $objectID) = $this->doc->setMenuByType($type, $objectID, $libID); + list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType($type, $objectID, $libID); $libID = (int)$libID; $moduleTree = $type == 'book' ? $this->doc->getBookStructure($libID) : $this->doc->getTreeMenu($type, $objectID, $libID); @@ -1283,15 +1283,16 @@ class doc extends control $pager = new pager($recTotal, $recPerPage, $pageID); $this->app->rawMethod = $rawMethod; - $this->view->title = $title; - $this->view->type = $type; - $this->view->browseType = $browseType; - $this->view->param = $queryID; - $this->view->users = $this->user->getPairs('noletter'); - $this->view->libTree = $libTree; - $this->view->moduleID = $moduleID; - $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, 0, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); - $this->view->pager = $pager; + $this->view->title = $title; + $this->view->type = $type; + $this->view->browseType = $browseType; + $this->view->param = $queryID; + $this->view->users = $this->user->getPairs('noletter'); + $this->view->libTree = $libTree; + $this->view->moduleID = $moduleID; + $this->view->objectDropdown = $objectDropdown; + $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, 0, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); + $this->view->pager = $pager; if($browseType == 'bySearch') { diff --git a/module/doc/model.php b/module/doc/model.php index 6db01f859b..0b8040d25a 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2711,7 +2711,8 @@ EOT; $objectID = $type == 'custom' or $type == 'book' ? 0 : $doclib->$type; } - $objects = $this->getOrderedObjects($type); + $objects = $this->getOrderedObjects($type); + $objectDropdown = ''; if($type == 'custom') { @@ -2739,7 +2740,8 @@ EOT; if($libID == 0 and !empty($libs)) $libID = reset($libs)->id; if($this->app->tab == 'doc') $this->app->rawMethod = $type == 'execution' ? 'project' : $type; - $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); + $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); + $objectDropdown = $this->select($type, $objects, $objectID, array()); if(empty($object)) { @@ -2752,7 +2754,7 @@ EOT; $tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc'; if($tab != 'doc') $this->loadModel($type)->setMenu($objectID); - return array($libs, $libID, $object, $objectID); + return array($libs, $libID, $object, $objectID, $objectDropdown); } /** diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index cd2aa67fe7..cbc68f0afb 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -16,6 +16,7 @@ doc);?>
doc->id;?> doc->title;?> doc->addedByAB;?> doc->addedDate;?>
- {$doc->id}";?> - createLink('doc', 'view', "docID=$doc->id&version=0", '', true), $doc->id, '', "title='{$doc->id}' data-app='{$this->app->tab}'");?> - + createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), $doc->id, '', "title='{$doc->id}' data-app='{$this->app->tab}'"); + } + else + { + echo " {$doc->id}"; + } + ?> - {$doc->title}";?> - createLink('doc', 'view', "docID=$doc->id&version=0", '', true), "  " . $doc->title, '', "title='{$doc->title}' class='iframe' data-width='90%'");?> - - + createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), "  " . $doc->title, '', "title='{$doc->title}' data-app='{$this->app->tab}'"); + } + else + { + echo " {$doc->title}"; + } + ?> + id&objectType=doc");?>" title="" class='btn btn-link ajaxCollect'> - + addedBy);?> addedDate, 'y-m-d');?>
+ + + + + + + + + + + + + + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> + collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> + + {$type}) ? $doc->{$type} : 0;?> + + + + + + + + + + +
doc->id;?>doc->title;?>doc->addedByAB;?>doc->addedDate;?>doc->editedBy;?>doc->editedDate;?>actions;?>
+ createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), $doc->id, '', "title='{$doc->id}' data-app='{$this->app->tab}'"); + } + else + { + echo " {$doc->id}"; + } + ?> + + createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), "  " . $doc->title, '', "title='{$doc->title}' data-app='{$this->app->tab}' class='text-primary'"); + } + else + { + echo " {$doc->title}"; + } + ?> + + id&objectType=doc");?>" title="" class='btn btn-link ajaxCollect'> + + addedBy);?>addedDate, 'y-m-d');?>editedBy);?>editedDate, 'y-m-d');?> + + id&comment=false", "", '', "title='{$lang->edit}' class='btn btn-link'", true, false)?> + id&confirm=no", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> + +
+ +

+ +
+ diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index 3e2a11a6f8..9e4d43ada1 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -11,7 +11,6 @@ */ ?> - doc);?> @@ -73,112 +72,23 @@
-
>
- -
-

- doc->noDoc;?> - "; - $html .= html::a($this->createLink('doc', 'createBasicInfo', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&type=html", '', true), " {$lang->doc->create}", '', "class='btn btn-info iframe'"); - $html .= ""; - $html .= "

'; - echo $html; - } - } - ?> -

-
- -
- - - - - - - - - - - - - - - collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> - collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> - - {$type}) ? $doc->{$type} : 0;?> - - - - - - - - - - -
doc->id;?>doc->title;?>doc->addedByAB;?>doc->addedDate;?>doc->editedBy;?>doc->editedDate;?>actions;?>
- createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), $doc->id, '', "title='{$doc->id}' data-app='{$this->app->tab}'"); - } - else - { - echo " {$doc->id}"; - } - ?> - - createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), "  " . $doc->title, '', "title='{$doc->title}' data-app='{$this->app->tab}' class='text-primary'"); - } - else - { - echo " {$doc->title}"; - } - ?> - - id&objectType=doc");?>" title="" class='btn btn-link ajaxCollect'> - - addedBy);?>addedDate, 'y-m-d');?>editedBy);?>editedDate, 'y-m-d');?> - - id&comment=false", "", '', "title='{$lang->edit}' class='btn btn-link'", true, false)?> - id&confirm=no", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> - -
- - - -
+ +
>
+
From 61a44bc7f4cc3218773832442166688ae2d60ec2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Mar 2023 16:24:34 +0800 Subject: [PATCH 034/328] * Code for finish task #87406. --- module/doc/control.php | 3 +++ module/doc/lang/de.php | 1 + module/doc/lang/en.php | 1 + module/doc/lang/fr.php | 1 + module/doc/lang/zh-cn.php | 1 + module/doc/view/tablecontents.html.php | 2 -- module/search/control.php | 2 +- 7 files changed, 8 insertions(+), 3 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 480f704f30..57f0792707 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1285,6 +1285,7 @@ class doc extends control $libType = zget($lib, 'type', ''); if($libType == 'api') { + $this->session->set('objectName', $this->lang->doc->api, 'admin'); $this->view->lib = $lib; $this->view->libs = $libs; $this->view->apiID = 0; @@ -1293,10 +1294,12 @@ class doc extends control } elseif($browseType == 'annex') { + $this->session->set('objectName', $this->lang->doc->files, 'admin'); //$this->view->files = $this->doc->getLibFiles($type, $objectID, 'id_desc', $pager); } else { + $this->session->set('objectName', $this->lang->doc->common, 'admin'); $this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $pager) : $this->doc->getDocs($libID, $moduleID, 'id_desc', $pager); } diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index a41fe145bf..fa52844ca1 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -136,6 +136,7 @@ $lang->doc->collect = 'Favorit hinzufügen'; $lang->doc->cancelCollection = 'Favorit entfernen'; $lang->doc->deleteFile = 'Delete File'; $lang->doc->menuTitle = 'Menu'; +$lang->doc->api = 'API'; $lang->doc->collectAction = 'Add Favorite'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 37c301d4f7..f0b5c1c01c 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -136,6 +136,7 @@ $lang->doc->collect = 'Add Favorite'; $lang->doc->cancelCollection = 'Remove Favorite'; $lang->doc->deleteFile = 'Delete File'; $lang->doc->menuTitle = 'Direcotory'; +$lang->doc->api = 'API'; $lang->doc->collectAction = 'Add Favorite'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index 05a492908b..0920f5eb17 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -136,6 +136,7 @@ $lang->doc->collect = 'Ajouter aux Favoris'; $lang->doc->cancelCollection = 'Retirer des Favoris'; $lang->doc->deleteFile = 'Supprimer Fichier'; $lang->doc->menuTitle = 'Menu'; +$lang->doc->api = 'API'; $lang->doc->collectAction = 'Add Favorite'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index fb888cc5c4..141c27bc1a 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -136,6 +136,7 @@ $lang->doc->collect = '收藏'; $lang->doc->cancelCollection = '取消收藏'; $lang->doc->deleteFile = '删除附件'; $lang->doc->menuTitle = '目录'; +$lang->doc->api = '接口'; $lang->doc->collectAction = '收藏文档'; diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index 9e4d43ada1..a96d245092 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -72,9 +72,7 @@
-
>
- search->initSession($module, $fields, $params); - if($module == 'trash' and $this->session->objectName) + if(($module == 'trash' or substr($module, -3) == 'Doc') and $this->session->objectName) { $space = common::checkNotCN() ? ' ' : ''; $this->lang->search->common = $this->lang->search->common . $space . $this->session->objectName; From a99b3fea8c1c5cf763b418d91f73149815e2b35e Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Mar 2023 16:57:46 +0800 Subject: [PATCH 035/328] * Modify module locate. --- module/doc/js/tablecontents.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index f7868273b1..86dd1d21ba 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -92,7 +92,7 @@ $(function() data: treeData, itemCreator: function($li, item) { - var libClass = ['lib', 'annex', 'api'].indexOf(item.type) !== -1 ? 'lib' : ''; + var libClass = ['lib', 'annex', 'api', 'execution'].indexOf(item.type) !== -1 ? 'lib' : ''; var hasChild = item.children ? !!item.children.length : false; var $item = ''; $item += '
' + item.name; @@ -120,14 +120,10 @@ $(function() if(isLib) { - if($(this).data('type') == 'annex') - { - linkParams += '&libID=&moduleID=0&browseType=annex'; - } - else - { - linkParams += '&libID=' + moduleID; - } + if($(this).data('type') == 'annex') return false; + + linkParams += '&libID=' + moduleID; + moduleID = 0; } else { From b5d3b6468aef98dfd3d6eccdc035ef1784b0d6b0 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Tue, 21 Mar 2023 17:16:34 +0800 Subject: [PATCH 036/328] * Code for task#99371 --- module/doc/css/tablecontents.css | 8 ++++++-- module/doc/js/tablecontents.js | 18 +++++++++++++++++- module/doc/view/tablecontents.html.php | 4 ++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index 44034927e2..9d0958049e 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -6,7 +6,7 @@ .h-full {height: 100%;} .w-full {width: 100%;} .overflow-x-auto {overflow-x: auto;} -main-content {padding-top: 0; padding-bottom: 0;} +.main-content {padding-top: 0; padding-bottom: 0;} .main-content #createDropdown {display: inline-block;} .main-content #createDropdown ul {position: absolute;} #pageNav .dropdown-menu {max-height: inherit;} @@ -54,7 +54,11 @@ li.drag-shadow ul {display: none!important;} .flex-center {display: flex; align-items: center; justify-content: space-between;} .tree li>.list-toggle {top: 4px;} -.spliter {flex: 0 0 15px;} +/* css for sidebar */ +.sidebar-toggle > .icon {position: absolute; top: 50%; left: -1px; width: 12px; height: 30px; margin-top: -10px; line-height: 30px; color: #fff; text-align: center; background: #7dcdfe; border-radius: 6px;} +.col-spliter:after {display: none;} + +.spliter {flex: 0 0 12px;} #mainContent .table-empty-tip > p, #createDocs {display: inline-block;} .createDropdown a.btn-primary, .createDropdown a.btn-info {border-right: 1px solid rgba(255,255,255,0.2);} diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 86dd1d21ba..cd2e86ad0e 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -309,4 +309,20 @@ $(function() } initSplitRow(); -}) + + $('#spliter').on('click', '.icon', function() + { + if($(this).hasClass('isHide')) + { + $(this).addClass('icon-angle-left'); + $(this).removeClass('icon-angle-right isHide'); + $('#sideBar').removeClass('hidden'); + } + else + { + $(this).removeClass('icon-angle-left'); + $(this).addClass('icon-angle-right isHide'); + $('#sideBar').addClass('hidden'); + } + }) +}); diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index a96d245092..a109b9d52f 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -67,10 +67,10 @@
-
- -
+
>
Date: Wed, 22 Mar 2023 10:44:26 +0800 Subject: [PATCH 044/328] * Add locate. --- module/doc/js/tablecontents.js | 53 +++++++++++++++----------- module/doc/view/tablecontents.html.php | 8 ++-- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 872b557474..1dd2a5ddae 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -70,10 +70,8 @@ $(function() { $('#modules').find('li.can-sort').each(function() { - var $li = $(this); - - var item = $li.data(); - '' == 'book' ? orders['sort[' + item.id + ']'] = $li.attr('data-order') || item.order : orders['orders[' + item.id + ']'] = $li.attr('data-order') || item.order; + var item = $(this).data(); + '' == 'book' ? orders['sort[' + item.id + ']'] = item.order || item.order : orders['orders[' + item.id + ']'] = item.order || item.order; }); link = createLink('tree', 'updateOrder'); @@ -140,11 +138,11 @@ $(function() function renderDropdown(option) { var libClass = '.libDorpdown'; - if(option.id != 'dropDownLibrary') libClass = '.moduleDorpdown'; + if(option.type != 'dropDownLibrary') libClass = '.moduleDorpdown'; if($(libClass).find('li').length == 0) return ''; - var dropdown = '
From cdd6b554d41d094de237b4ab1551e88f9405654a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 22 Mar 2023 10:47:42 +0800 Subject: [PATCH 045/328] * Change the link type document to text type. --- db/zentaopms299.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/zentaopms299.sql diff --git a/db/zentaopms299.sql b/db/zentaopms299.sql new file mode 100644 index 0000000000..686c7badcf --- /dev/null +++ b/db/zentaopms299.sql @@ -0,0 +1 @@ +UPDATE `zt_doc` SET `type` = 'text' WHERE `type` = 'url'; From db55553f004f3081b7e93abb064d4f4307381332 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 22 Mar 2023 11:08:18 +0800 Subject: [PATCH 046/328] * Adjust code . --- module/doc/css/tablecontents.css | 4 ++-- module/doc/js/tablecontents.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index 27d523d603..f2a4bf13c7 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -58,10 +58,10 @@ li.drag-shadow ul {display: none!important;} .tree li>.list-toggle {top: 4px;} /* css for sidebar */ -.sidebar-toggle > .icon {position: absolute; top: 50%; left: -1px; width: 12px; height: 30px; margin-top: -10px; line-height: 30px; color: #fff; text-align: center; background: #7dcdfe; border-radius: 6px;} +.sidebar-toggle > .icon {position: absolute; top: 50%; left: 6px; width: 12px; height: 30px; margin-top: -10px; line-height: 30px; color: #fff; text-align: center; background: #7dcdfe; border-radius: 6px; cursor: pointer;} .col-spliter:after {display: none;} -.spliter {flex: 0 0 12px; position: relative;} +.spliter {flex: 0 0 6px; margin-right: 6px;} .spliter-btn {height: 28px; width: 10px; background: #fff; position: absolute; top: 30%; left: -6px; border: 1px solid #D9D9D9; border-radius: 2px;} .spliter-btn > .spliter-inner {width: 4px; height: 12px; border-left: 1px solid #D9D9D9; border-right: 1px solid #D9D9D9;} diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 3dd9e6c86f..0792a62c7c 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -149,7 +149,7 @@ $(function() function refreshDropdown(option) { - $('#' + option.id).css({ + $('#' + option.type).css({ 'display': 'unset', 'left': option.left, 'top': option.top @@ -326,10 +326,11 @@ $(function() $(this).addClass('icon-angle-right isHide'); $('#sideBar').addClass('hidden'); } - }).on('mousemove', function() + }).on('mousemove', function(e) { if(!$('#sideBar.hidden').length) $(this).find('.spliter-btn').removeClass('hidden'); + $('.spliter-btn').css('top', e.pageY - 120); }).on('mouseout', function() { $(this).find('.spliter-btn').addClass('hidden'); From 8451e4b13eff9ff8d6331dcd541f72b0163bec63 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 22 Mar 2023 11:25:04 +0800 Subject: [PATCH 047/328] * Add locate params. --- module/doc/control.php | 1 + module/doc/js/tablecontents.js | 10 ++++++---- module/doc/view/tablecontents.html.php | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 85ddc9d1ed..febec329ea 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1317,6 +1317,7 @@ class doc extends control $this->view->libType = $libType; $this->view->pager = $pager; $this->view->objectID = $objectID; + $this->view->orderBy = $orderBy; $this->display(); } diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 0792a62c7c..e703620ccc 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -119,19 +119,21 @@ $(function() { var isLib = $(this).hasClass('lib'); var moduleID = $(this).data('id'); + var libID = 0; + var params = ''; if(isLib) { if($(this).data('type') == 'annex') return false; - linkParams += '&libID=' + moduleID; - moduleID = 0; + libID = moduleID; + moduleID = 0; } else { - var libID = $(this).closest('.lib').data('id'); - linkParams += '&libID=' + libID + '&moduleID=' + moduleID; + libID = $(this).closest('.lib').data('id'); } + linkParams = linkParams.replace('%s', '&libID=' + libID + '&moduleID=' + moduleID); location.href = createLink('doc', 'tableContents', linkParams); }); diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index 78537ecc67..4196ca4ad2 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -12,7 +12,7 @@ ?> - + doc);?> -doc->noticeAcl['lib']);?> - diff --git a/module/doc/view/editlib.html.php b/module/doc/view/editlib.html.php index 289003caa7..1307a44475 100644 --- a/module/doc/view/editlib.html.php +++ b/module/doc/view/editlib.html.php @@ -50,7 +50,8 @@ doclib->control;?> - doclib->aclList, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'", 'block')?> + type != 'api') echo html::radio('acl', $lang->doclib->aclList, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'", 'block')?> + type == 'api') echo html::radio('acl', $lang->api->aclList, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'", 'block')?> From d4a8dbb88bac5d41c6adb9d7aec030ecfc4283db Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 29 Mar 2023 09:16:48 +0800 Subject: [PATCH 162/328] * Fix bug of task #89149. --- module/doc/js/common.js | 2 +- module/doc/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/doc/js/common.js b/module/doc/js/common.js index b450211f45..be05ca5cf3 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -41,7 +41,7 @@ function toggleAcl(acl, type) var moduleID = $('#module').val(); if(moduleID.indexOf('_') >= 0) libID = moduleID.substr(0, moduleID.indexOf('_')); } - if(acl == 'default' && $('#libTypewiki').attr('checked') != 'checked') + if(acl == 'default' && ($('#libTypeapi').attr('checked') == 'checked' || libType == 'api')) { $('#whiteListBox').removeClass('hidden'); $('#groupBox').removeClass('hidden'); diff --git a/module/doc/model.php b/module/doc/model.php index 5860a5a231..e7ff1c4877 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -206,7 +206,7 @@ class docModel extends model $execution = $this->loadModel('execution')->getByID($lib->execution); $lib->project = $execution->project; } - if($this->post->libType) $lib->type = 'api'; + if($this->post->libType == 'api') $lib->type = 'api'; if($lib->acl == 'custom' or $lib->acl == 'private') { From 7616c67a7da55ec114e126fda7c80c063770801b Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 29 Mar 2023 09:19:49 +0800 Subject: [PATCH 163/328] * Modify param use cookie. --- config/filter.php | 4 ++++ module/api/control.php | 17 ++++++++++++----- module/api/js/index.js | 2 +- module/api/view/ajaxgetdropmenu.html.php | 19 +++++++++++++++---- module/api/view/apilist.html.php | 2 +- module/api/view/index.html.php | 5 ++--- 6 files changed, 35 insertions(+), 14 deletions(-) diff --git a/config/filter.php b/config/filter.php index ee20fa8909..bc4d3af91e 100755 --- a/config/filter.php +++ b/config/filter.php @@ -92,6 +92,7 @@ $filter->doc->objectlibs = new stdclass(); $filter->doc->tablecontents = new stdclass(); $filter->doc->showfiles = new stdclass(); $filter->doc->default = new stdclass(); +$filter->api->default = new stdClass(); $filter->api->index = new stdClass(); $filter->api->create = new stdClass(); $filter->api->edit = new stdClass(); @@ -225,6 +226,9 @@ $filter->doc->default->cookie['product'] = 'int'; $filter->doc->showfiles->cookie['docFilesViewType'] = 'code'; $filter->doc->tablecontents->cookie['preProductID'] = 'int'; $filter->doc->tablecontents->cookie['preBranch'] = 'reg::word'; + +$filter->api->default->cookie['objectType'] = 'string'; +$filter->api->default->cookie['objectID'] = 'int'; $filter->api->index->get['libID'] = 'int'; $filter->api->index->get['module'] = 'int'; $filter->api->index->get['apiID'] = 'int'; diff --git a/module/api/control.php b/module/api/control.php index 6d002c717f..edd00fc7ac 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -11,19 +11,23 @@ */ class api extends control { + public $objectType = 'nolink'; + public $objectID = 0; + public function __construct($moduleName = '', $methodName = '', $appName = '') { parent::__construct($moduleName, $methodName, $appName); $this->user = $this->loadModel('user'); $this->doc = $this->loadModel('doc'); $this->action = $this->loadModel('action'); + + if($this->cookie->objectType) $this->objectType = $this->cookie->objectType; + if($this->cookie->objectID) $this->objectID = $this->cookie->objectID; } /** * Api doc index page. * - * @param string $objectType - * @param int $objectID * @param int $libID * @param int $moduleID * @param int $apiID @@ -35,9 +39,11 @@ class api extends control * @access public * @return void */ - public function index($objectType = 'nolink', $objectID = 0, $libID = 0, $moduleID = 0, $apiID = 0, $version = 0, $release = 0, $appendLib = 0, $browseType = '', $param = 0) + public function index($libID = 0, $moduleID = 0, $apiID = 0, $version = 0, $release = 0, $appendLib = 0, $browseType = '', $param = 0) { - if(empty($objectType)) $objectType = 'nolink'; + $objectType = $this->objectType; + $objectID = $this->objectID; + /* Get all api doc libraries. */ $libs = $this->doc->getApiLibs($appendLib, $objectType, $objectID); if($libID == 0 and !empty($libs)) @@ -68,7 +74,7 @@ class api extends control /* Build the search form. */ $queryID = $browseType == 'bySearch' ? (int)$param : 0; - $actionURL = $this->createLink('api', 'index', "objectType=$objectType&objectID=$objectID&libID=$libID&moduleID=0&apiID=0&version=0&release=0&appendLib=0&browseType=bySearch¶m=myQueryID"); + $actionURL = $this->createLink('api', 'index', "libID=$libID&moduleID=0&apiID=0&version=0&release=0&appendLib=0&browseType=bySearch¶m=myQueryID"); $this->api->buildSearchForm($lib,$queryID, $actionURL); if($browseType == 'bySearch') @@ -87,6 +93,7 @@ class api extends control $this->view->browseType = $browseType; $this->view->objectType = $objectType; $this->view->objectID = $objectID; + $this->view->moduleID = $moduleID; $this->view->libTree = $this->api->getLibTree($libID, $libs, $objectID); $this->view->users = $this->user->getPairs('noclosed,noletter'); $this->view->objectDropdown = $this->generateLibsDropMenu($libs[$libID], $release); diff --git a/module/api/js/index.js b/module/api/js/index.js index 75ad3ae93d..1ed3fd1575 100644 --- a/module/api/js/index.js +++ b/module/api/js/index.js @@ -72,7 +72,7 @@ $(document).ready(function() { libID = $(this).closest('.lib').data('id'); } - linkParams = linkParams.replace('%s', '&libID=' + libID + '&moduleID=' + moduleID); + var linkParams = 'libID=' + libID + '&moduleID=' + moduleID; location.href = createLink('api', 'index', linkParams); }); }); diff --git a/module/api/view/ajaxgetdropmenu.html.php b/module/api/view/ajaxgetdropmenu.html.php index 17d05da9d8..d801ff6232 100644 --- a/module/api/view/ajaxgetdropmenu.html.php +++ b/module/api/view/ajaxgetdropmenu.html.php @@ -20,23 +20,26 @@ '; $closedObjectsHtml = '