From 321d069c9663c0d259aaaa9a106c238c23082d44 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 17 Oct 2018 17:01:10 +0800 Subject: [PATCH] * Adjust code for book of doc module. --- module/doc/css/common.css | 2 ++ module/doc/model.php | 2 +- module/doc/view/alllibs.html.php | 6 ++---- module/doc/view/alllibsbylist.html.php | 9 ++------- module/doc/view/bookside.html.php | 0 module/doc/view/browse.html.php | 9 ++++++--- module/doc/view/browsebygrid.html.php | 7 ++++--- module/doc/view/objectlibs.html.php | 4 +--- module/doc/view/objectlibsbylist.html.php | 4 +--- module/doc/view/side.html.php | 10 +++++++--- 10 files changed, 26 insertions(+), 27 deletions(-) create mode 100644 module/doc/view/bookside.html.php diff --git a/module/doc/css/common.css b/module/doc/css/common.css index 32daee4258..191bff0055 100644 --- a/module/doc/css/common.css +++ b/module/doc/css/common.css @@ -71,3 +71,5 @@ td.c-name a{color: #0c60e1} td.c-name a:visited{color: #082999} .main-col .panel-heading a:visited{color: #082999} + +.panel-title.font-normal .btn-group{margin-left: 20px;} diff --git a/module/doc/model.php b/module/doc/model.php index dfd615e8f8..d0ee604637 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -65,7 +65,7 @@ class docModel extends model $selectHtml .=''; $currentLib = 0; - if(strpos('product,project,custom', $type) !== false) + if(in_array($type, array_keys($this->lang->doc->libTypeList))) { if($type == 'product') $currentLib = $productID; if($type == 'project') $currentLib = $projectID; diff --git a/module/doc/view/alllibs.html.php b/module/doc/view/alllibs.html.php index 51f5b0171a..b0305765d1 100644 --- a/module/doc/view/alllibs.html.php +++ b/module/doc/view/alllibs.html.php @@ -23,15 +23,13 @@
- doc->libTypeList[$type];?> + doclib->tabList, $type);?> -
- +
diff --git a/module/doc/view/alllibsbylist.html.php b/module/doc/view/alllibsbylist.html.php index 795f134b2b..967a2fa46e 100644 --- a/module/doc/view/alllibsbylist.html.php +++ b/module/doc/view/alllibsbylist.html.php @@ -2,18 +2,13 @@
- - doc->custom;?> - productCommon;?> - projectCommon;?> + doclib->tabList, $type);?> -
- +
diff --git a/module/doc/view/bookside.html.php b/module/doc/view/bookside.html.php new file mode 100644 index 0000000000..e69de29bb2 diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 8c86d2bf2c..baf370eece 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -37,12 +37,15 @@ var browseType = ''; - -
diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index c01089fd16..8f9f3788f0 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -1,8 +1,6 @@ doc->getLimitLibs('product'); -$sideLibs['project'] = $this->doc->getLimitLibs('project'); -$sideLibs['custom'] = $this->doc->getLimitLibs('custom'); +foreach($lang->doclib->tabList as $libType => $typeName) $sideLibs[$libType] = $this->doc->getLimitLibs($libType); $allModules = $this->loadModel('tree')->getDocStructure(); $sideSubLibs = array(); @@ -119,6 +117,10 @@ if(!isset($type)) $type = 'product'; ?>
  • > createLink('doc', 'browse', "libID=$sideLibID"), " " . $sideLibName, '', "class='text-ellipsis' title='{$sideLibName}'");?> + + + +
      parent != 0) continue;?> @@ -128,6 +130,8 @@ if(!isset($type)) $type = 'product';
    + +