Skip to content

Commit d5a8614

Browse files
authored
Merge pull request #289 from eduardomozart/patch-3
Improve compatibility with Read the Dokus template
2 parents 3a7b842 + 77b8701 commit d5a8614

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scripts/indexmenu.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,11 @@ dTree.prototype.node = function (node, nodeId) {
316316
(node.hns) ? str += node.hns : str += node.dokuid;
317317
str += '"' + ' title="' + node.name + '"' + jsfnc;
318318
str += ' onclick="javascript: ' + this.treeName + '.s(' + nodeId + ');"';
319+
str += ' data-wiki-id="' + node.dokuid + '"';
319320
str += '>' + node.name + '</a>';
320321
}
321322
else if (node.pid !== this.root.id) {
322-
str += '<a id="s' + this.treeName + nodeId + '" href="javascript: ' + this.treeName + '.o(' + nodeId + '); " class="node"' + jsfnc + '>' + node.name + '</a>';
323+
str += '<a id="s' + this.treeName + nodeId + '" href="javascript: ' + this.treeName + '.o(' + nodeId + '); " data-wiki-id="' + node.dokuid + '" class="node"' + jsfnc + '>' + node.name + '</a>';
323324
} else {
324325
str += node.name;
325326
}

syntax/indexmenu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ public function formatIndexmenuItem($item)
851851
if ($markCurrentPage) {
852852
$ret .= '<span class="curid">';
853853
}
854-
$ret .= '<a href="' . wl($link, $more) . '" class="' . $tagid . '">'
854+
$ret .= '<a href="' . wl($link, $more) . '" class="' . $tagid . '" data-wiki-id="'. $item['hns'] . '">'
855855
. $item['title']
856856
. '</a>';
857857
if ($markCurrentPage) {

0 commit comments

Comments
 (0)