diff --git a/module/common/model.php b/module/common/model.php index f63c8cb160..ac75910585 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1335,7 +1335,14 @@ EOD; $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->pre->$id}"); $link .= '#app=' . $app->openApp; - echo html::a($link, '', '', "id='prevPage' class='btn' title='{$title}'"); + if(isset($preAndNext->pre->objectType) and $preAndNext->pre->objectType == 'doc') + { + echo html::a('javascript:void(0)', '', '', "id='prevPage' class='btn' title='{$title}' data-url='{$link}'"); + } + else + { + echo html::a($link, '', '', "id='prevPage' class='btn' title='{$title}'"); + } } if(isset($preAndNext->next) and $preAndNext->next) { @@ -1344,7 +1351,14 @@ EOD; $title = '#' . $preAndNext->next->$id . ' ' . $title . ' ' . $lang->nextShortcutKey; $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->next->$id}"); $link .= '#app=' . $app->openApp; - echo html::a($link, '', '', "id='nextPage' class='btn' title='$title'"); + if(isset($preAndNext->next->objectType) and $preAndNext->next->objectType == 'doc') + { + echo html::a('javascript:void(0)', '', '', "id='nextPage' class='btn' title='$title' data-url='{$link}'"); + } + else + { + echo html::a($link, '', '', "id='nextPage' class='btn' title='$title'"); + } } echo ''; } diff --git a/module/doc/js/objectlibs.js b/module/doc/js/objectlibs.js index 6351a62f2e..c600222186 100644 --- a/module/doc/js/objectlibs.js +++ b/module/doc/js/objectlibs.js @@ -142,7 +142,7 @@ $(function() $('#outline li.has-list>i+ul').prev('i').remove(); /* Update doc content silently on switch doc version, story #40503 */ - $(document).on('click', '.doc-version-menu a', function(event) + $(document).on('click', '.doc-version-menu a, #mainActions .container a', function(event) { var $tmpDiv = $('
'); $tmpDiv.load($(this).data('url') + ' #mainContent', function() diff --git a/module/doc/model.php b/module/doc/model.php index 3cae0d0c09..1d63a6d7d5 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1693,6 +1693,8 @@ class docModel extends model $preDoc = false; foreach($docs as $doc) { + $doc->objectType = 'doc'; + /* Get next object. */ if($preDoc === true) {