Commit 5a9d0f71 authored by Anne Goloubkoff-Duponchel's avatar Anne Goloubkoff-Duponchel
Browse files

correctifs pour barre de nav

parent 85dd83dd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -249,8 +249,8 @@ declare function max.html:getNavbarForDocument($project, $doc, $selectedId){
                'selectedId' : $selectedId,
                'project' : $project,
                'baseuri' : max.config:getBaseURI(),
                'prevArrow' : $selectedId != string(($xml//ul//li/@id)[1]),
                'nextArrow' : $selectedId != string(($xml//ul//li/@id)[last()])
                'prevArrow' : $selectedId != string(($xml//ul//li/@data-target)[1]),
                'nextArrow' : $selectedId != string(($xml//ul//li/@data-target)[last()])
                }
        )/*[1]
    else ()
+2 −1
Original line number Diff line number Diff line
@@ -110,8 +110,9 @@ class MaxTEI extends AbstractMax {
        //local function : find next or previous nav link
        let nextOrPrevious = function (step) {
            let current = $("#navigation-tool").find('button').attr("data-target").replace("selected-", "");//remove 'selected' prefix
            let newCurrent = current.replaceAll(".", "\\.")
            let links = $('#dropdown-navigation').find('li');
            let position = links.index(document.querySelector('li[data-target='+current+']'));
            let position = links.index(document.querySelector('li[data-target='+newCurrent+']'));
            console.log(position);
            let nextOrPrevious = links.get(position + step);
            window.location.href = $(nextOrPrevious).find('a').attr("href");