Skip to content

Commit

Permalink
Merge pull request #289 from eduardomozart/patch-3
Browse files Browse the repository at this point in the history
Improve compatibility with Read the Dokus template
  • Loading branch information
Klap-in committed Feb 1, 2024
2 parents 3a7b842 + 77b8701 commit d5a8614
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/indexmenu.js
Expand Up @@ -316,10 +316,11 @@ dTree.prototype.node = function (node, nodeId) {
(node.hns) ? str += node.hns : str += node.dokuid;
str += '"' + ' title="' + node.name + '"' + jsfnc;
str += ' onclick="javascript: ' + this.treeName + '.s(' + nodeId + ');"';
str += ' data-wiki-id="' + node.dokuid + '"';
str += '>' + node.name + '</a>';
}
else if (node.pid !== this.root.id) {
str += '<a id="s' + this.treeName + nodeId + '" href="javascript: ' + this.treeName + '.o(' + nodeId + '); " class="node"' + jsfnc + '>' + node.name + '</a>';
str += '<a id="s' + this.treeName + nodeId + '" href="javascript: ' + this.treeName + '.o(' + nodeId + '); " data-wiki-id="' + node.dokuid + '" class="node"' + jsfnc + '>' + node.name + '</a>';
} else {
str += node.name;
}
Expand Down
2 changes: 1 addition & 1 deletion syntax/indexmenu.php
Expand Up @@ -851,7 +851,7 @@ public function formatIndexmenuItem($item)
if ($markCurrentPage) {
$ret .= '<span class="curid">';
}
$ret .= '<a href="' . wl($link, $more) . '" class="' . $tagid . '">'
$ret .= '<a href="' . wl($link, $more) . '" class="' . $tagid . '" data-wiki-id="'. $item['hns'] . '">'
. $item['title']
. '</a>';
if ($markCurrentPage) {
Expand Down

0 comments on commit d5a8614

Please sign in to comment.