Loading rxq/html.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ declare function max.html:getFooter($project){ declare function max.html:getNavbarForDocument($project, $doc, $selectedId){ let $xml := max.toc:getDocumentTOC($project, $doc) (:max.route:getRouteNavigationEntriesAsHTML($project, $routeId):) let $hasTarget := $xml//ul//li[@id=$selectedId] let $hasTarget := $xml//ul//li[@data-target=$selectedId] return if (count($xml//ul/li) > 1 and $hasTarget) then xslt:transform($xml, Loading ui/js/MaxTEI.js +3 −2 Original line number Diff line number Diff line Loading @@ -109,9 +109,10 @@ class MaxTEI extends AbstractMax { bindNavigationTool() { //local function : find next or previous nav link let nextOrPrevious = function (step) { let current = $("#navigation-tool").find('button').attr("id").replace("selected-", "");//remove 'selected' prefix let current = $("#navigation-tool").find('button').attr("data-target").replace("selected-", "");//remove 'selected' prefix let links = $('#dropdown-navigation').find('li'); let position = links.index(document.getElementById(current)); let position = links.index(document.querySelector('li[data-target='+current+']')); console.log(position); let nextOrPrevious = links.get(position + step); window.location.href = $(nextOrPrevious).find('a').attr("href"); }; Loading ui/xsl/tei/document_toc.xsl +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ <xsl:template match="tei:li"> <li> <xsl:attribute name="id"> <xsl:attribute name="data-target"> <xsl:value-of select="@id"/> </xsl:attribute> <xsl:apply-templates/> Loading ui/xsl/tei/nav_bar.xsl +2 −1 Original line number Diff line number Diff line Loading @@ -28,11 +28,12 @@ <button class="btn btn-default dropdown-toggle" type="button" data-target="selected-{$selectedId}" id="selected-{$selectedId}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <xsl:apply-templates select=".//li[@id = $selectedId]/a"/> <xsl:apply-templates select=".//li[@data-target = $selectedId]/a"/> </button> <ul id="dropdown-navigation" class="dropdown-menu" aria-labelledby="selected-{$selectedId}"> Loading Loading
rxq/html.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ declare function max.html:getFooter($project){ declare function max.html:getNavbarForDocument($project, $doc, $selectedId){ let $xml := max.toc:getDocumentTOC($project, $doc) (:max.route:getRouteNavigationEntriesAsHTML($project, $routeId):) let $hasTarget := $xml//ul//li[@id=$selectedId] let $hasTarget := $xml//ul//li[@data-target=$selectedId] return if (count($xml//ul/li) > 1 and $hasTarget) then xslt:transform($xml, Loading
ui/js/MaxTEI.js +3 −2 Original line number Diff line number Diff line Loading @@ -109,9 +109,10 @@ class MaxTEI extends AbstractMax { bindNavigationTool() { //local function : find next or previous nav link let nextOrPrevious = function (step) { let current = $("#navigation-tool").find('button').attr("id").replace("selected-", "");//remove 'selected' prefix let current = $("#navigation-tool").find('button').attr("data-target").replace("selected-", "");//remove 'selected' prefix let links = $('#dropdown-navigation').find('li'); let position = links.index(document.getElementById(current)); let position = links.index(document.querySelector('li[data-target='+current+']')); console.log(position); let nextOrPrevious = links.get(position + step); window.location.href = $(nextOrPrevious).find('a').attr("href"); }; Loading
ui/xsl/tei/document_toc.xsl +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ <xsl:template match="tei:li"> <li> <xsl:attribute name="id"> <xsl:attribute name="data-target"> <xsl:value-of select="@id"/> </xsl:attribute> <xsl:apply-templates/> Loading
ui/xsl/tei/nav_bar.xsl +2 −1 Original line number Diff line number Diff line Loading @@ -28,11 +28,12 @@ <button class="btn btn-default dropdown-toggle" type="button" data-target="selected-{$selectedId}" id="selected-{$selectedId}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <xsl:apply-templates select=".//li[@id = $selectedId]/a"/> <xsl:apply-templates select=".//li[@data-target = $selectedId]/a"/> </button> <ul id="dropdown-navigation" class="dropdown-menu" aria-labelledby="selected-{$selectedId}"> Loading