From 547349cf35f0d5cae9a8aa94da27e798628039bc Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 29 Mar 2023 14:57:50 +0800 Subject: [PATCH] * Modify page locate. --- module/api/view/apilist.html.php | 3 ++- module/doc/js/tablecontents.js | 7 ------- module/doc/view/tablecontents.html.php | 9 ++++++++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/module/api/view/apilist.html.php b/module/api/view/apilist.html.php index 5ecfc6cc9a..793ec33bf0 100644 --- a/module/api/view/apilist.html.php +++ b/module/api/view/apilist.html.php @@ -107,7 +107,8 @@
-

api->baseUrl . ': ' . $lib->baseUrl;?>

+ clientLang, 'zh') === 0 ? ':' : ': ';?> +

api->baseUrl . $delimiter . $lib->baseUrl;?>

    diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 85358a32dc..b693337805 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -322,12 +322,5 @@ $(function() }).on('keydown', '.file-tree input.input-tree', function(e) { if(e.keyCode == 13) $(this).trigger('blur'); - }).on('click', '#mainMenu .btn-toolbar a, .no-content-button a', function() - { - if(libType == 'api') - { - $.cookie('objectType', objectType, {expires: config.cookieLife, path: config.webRoot}); - $.cookie('objectID', objectID, {expires: config.cookieLife, path: config.webRoot}); - } }); }); diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index edb75fb6df..2076f84811 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -36,7 +36,14 @@ echo html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), ' ' . $this->lang->doc->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"'); } - if($libID and common::hasPriv('doc', 'create')) echo $this->doc->printCreateBtn($lib, $type, $objectID, $moduleID, $apiLibID); + if($libType == 'api') + { + if(common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID", '', true), ' ' . $lang->api->createApi, '', 'class="btn btn-primary iframe" data-width="95%"'); + } + elseif($libID and common::hasPriv('doc', 'create')) + { + echo $this->doc->printCreateBtn($lib, $type, $objectID, $moduleID, $apiLibID); + } ?>