From 006dfcc733aca1e784c347e474f605879c4bccfa Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 7 Jan 2021 13:15:36 +0800 Subject: [PATCH] * Fix doc button. --- module/doc/view/browse.html.php | 6 +++--- module/doc/view/objectlibs.html.php | 2 +- module/doc/view/objectlibsbylist.html.php | 2 +- module/index/js/index.js | 10 ++++++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index ad65207a33..0753a50ee5 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -57,7 +57,7 @@ var browseType = ''; @@ -75,7 +75,7 @@ var browseType = ''; doc->noDoc;?> - createLink('doc', 'create', "libID={$libID}&moduleID=$moduleID"), " " . $lang->doc->create, '', "class='btn btn-info'");?> + createLink('doc', 'create', "libID={$libID}&moduleID=$moduleID"), " " . $lang->doc->create, '', "class='btn btn-info' data-group=$from");?> doc->noEditedDoc;?> @@ -168,7 +168,7 @@ var browseType = ''; id&objectType=doc");?>" title="" class='btn btn-link ajaxCollect'> - id", "", '', "title='{$lang->edit}' class='btn btn-link'")?> + id", "", '', "title='{$lang->edit}' class='btn btn-link' data-group=$from")?> id", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?> diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index ab224bd850..540787c152 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -48,7 +48,7 @@
- + >
collector, $this->app->user->account) !== false ? " " : '') . $lib->name;?>
allCount . $lang->doc->item;?>
diff --git a/module/doc/view/objectlibsbylist.html.php b/module/doc/view/objectlibsbylist.html.php index e47b0ed9f7..a508769d2b 100644 --- a/module/doc/view/objectlibsbylist.html.php +++ b/module/doc/view/objectlibsbylist.html.php @@ -29,7 +29,7 @@ id");?> id");?> - name);?> + name, '', "data-group=$from");?> allCount . $lang->doc->item;?> diff --git a/module/index/js/index.js b/module/index/js/index.js index ad8a34a046..cd9915ffbf 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -67,12 +67,14 @@ var methodLowerCase = methodName.toLowerCase(); if(moduleName === 'doc') { - if(link.prj && ['browse', 'create', 'showfiles', 'objectlibs'].includes(methodLowerCase)) + if(link.prj) { - var from = $.cookie('from'); - if(from === 'project') return 'project'; - if(from === 'product') return 'product'; + if(methodLowerCase === 'objectlibs' && (link.params.from || link.params.$3) == 'product') return 'product'; + + return 'project'; } + + if(methodLowerCase === 'browse' && (link.params.from || link.params.$5) == 'product') return 'product'; return 'doc'; } if(moduleName === 'custom' && ['estimate', 'browsestoryconcept', 'configurescrum'].includes(methodLowerCase))