Commit 82b93634 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

suppression de routes /focus +scroll js et de ces mêmes scroll js pour les...

suppression de routes /focus +scroll js et de ces mêmes scroll js pour les notes de bas de page. Remplacé par l'utilisation d'ancres HTML.
parent d2faca1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ Les entrées de cette liste déroulante sont par défaut identiques aux entrées
de consultation.
La surcharge de cette transformation se fait en rédigeant une XSL placée dans **editions/[projectId]/xsl/text_hook.xsl**.

Aussi, les XSL des [plugins](../plugins) activés respectant la convention de nommage **plugins/NOM_PLUGIN/NOM_PLUGIN.xsl** sont automatiquement appliquées.
Aussi, les XSL des [plugins](../plugins) activés respectant la convention de nommage **plugins-enabled/NOM_PLUGIN/NOM_PLUGIN.xsl** sont automatiquement appliquées.


## Barre de navigation
+0 −35
Original line number Diff line number Diff line
@@ -170,41 +170,6 @@ function max:HighlightedSearchToHTMLPage($project, $routeDoc, $id, $targetId, $s

};

(:
Auto focus/scroll fragment ($idFocus) in a full document
:)
declare
%rest:GET
%output:method("html")
%output:html-version("5.0")
%output:indent("no")
%output:encoding("UTF-8")
%rest:path("/{$project}/{$routeDoc=.*\.xml}/focus/{$idFocus}")
function max:focusOnIdToHTML($project, $routeDoc, $idFocus){
    copy $c := max:getFullDocument($project, $routeDoc)
    modify (
        replace value of node $c//*[@*:id = $idFocus]/@*:id with "scrollfocus"
    )
    return $c
};

(:
Auto focus/scroll fragment ($idFocus) in a main fragment ($idPart)
:)
declare
%rest:GET
%output:method("html")
%output:html-version("5.0")
%output:indent("no")
%output:encoding("UTF-8")
%rest:path("/{$project}/{$routeDoc=.*\.xml}/focus/{$idPart}/{$idFocus}")
function max:focusOnPartAndIdToHTMLPage($project, $routeDoc, $idPart, $idFocus){
    copy $c := max:fragmentToHTMLPage($project, $routeDoc, $idPart)
    modify (
        replace value of node $c//*[@*:id = $idFocus]/@*:id with "scrollfocus"
    )
    return $c
};

(:Call the check plugin method (on a specified project:)
declare
+8 −1
Original line number Diff line number Diff line
@@ -22,7 +22,14 @@
}

.note{
  background-color: rgba(255,136,34,0.4);
  font-variant-position: super;
}

.note:before{
    content: '(';
}
.note:after{
    content: ')';
}

#bas_de_page{
+7 −0
Original line number Diff line number Diff line
:root{
  --header-height: 80px;
  --footer-height: 80px;
  --anchor-padding: 125px;
}


@@ -209,3 +210,9 @@ ul.dropdown-menu {
    max-height: 700px;
    padding: 5px;
}

#text :target {
    padding-top: var(--anchor-padding);
    margin-top: calc(-1 * var(--anchor-padding));
    font-weight: bold;
}
 No newline at end of file
+0 −18
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ class Max {
            if (this.isWithNotes()) {
                //ajout d'une colonne de notes + placement
                this.manageMarginNotes();
                this.bindNotesClick();
            }

            this.bindNavigationTool();
@@ -29,10 +28,6 @@ class Max {
            if ($("#bas_de_page .footnote").length > 0)
                $("#bas_de_page").show();
        }
        if ($("#scrollfocus").length === 1) {
            this.scrollToID("scrollfocus");
        }

    }

    getProjectID() {
@@ -58,7 +53,6 @@ class Max {

    scrollToID(id) {
        this.scrollToElement($("#" + id.replace(".", "\\.")));
        //document.getElementById(id).scrollIntoView(false);
    }

    scrollToElement(element, delay) {
@@ -119,18 +113,6 @@ class Max {

    }

    /*
      Branchements 'onClick' notes de bas de page
    */
    bindNotesClick() {
        let _this = this;
        $(window.NOTE_TO_TXT_CLASS).click(function (event) {
            event.preventDefault();
            let target = $(this).attr("href").replace('#', '');
            _this.scrollToID(target);
        });
    }

    /*Branchements 'onClick' sur les flèches de la barre de navigation*/
    bindNavigationTool() {
        //local function : find next or previous nav link