Commit 75bf5197 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

suite nettoyage jquery + un peu de clean dans les XSL et les output-prefixe

parent 579e0f9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ declare %private function max.html:buildTextOptionsMenu($projectId){
            <ul class="dropdown-menu" aria-labelledby="txt_options" id="options-list">
                {
                    for $cssClass in max.config:getCheckboxTextOptions($projectId)
                    return <li><a><input name="toggle_{$cssClass}"
                    return <li class="dropdown-item"><a><input name="toggle_{$cssClass}"
                    type="checkbox"
                    class="visibility_toggle"
                    id="toggle_{$cssClass}"
+0 −4
Original line number Diff line number Diff line
@@ -122,19 +122,15 @@ class MaxTEI extends AbstractMax {
    bindNavigationTool() {
        //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 current = document.getElementById("navigation-tool").querySelector('button').getAttribute("data-target").replace("selected-", "");//remove 'selected' prefix
            let newCurrent = current.replaceAll(".", "\\.")
            let links = document.getElementById('dropdown-navigation').querySelectorAll('li');
            console.log(links);
            let position = -1;
            links.forEach((link, index) => {
                if(link.dataset.target === newCurrent){
                    position = index;
                }
            })
            //links.indexOf(document.querySelector('li[data-target='+newCurrent+']'));
            //console.log(position);
            let nextOrPrevious = links[position + step];
            window.location.href = nextOrPrevious.querySelector('a').getAttribute("href");
        };

ui/lib/jquery.min.js

deleted120000 → 0
+0 −1
Original line number Diff line number Diff line
../../node_modules/jquery/dist/jquery.min.js
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
<!-- For conditions of distribution and use, see the accompanying legal.txt file. -->

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="#all">

    <xsl:param name="baseURI"/>
    <xsl:param name="selectedTarget"/>
+13 −4
Original line number Diff line number Diff line
<!-- For conditions of distribution and use, see the accompanying legal.txt file. -->

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:tei="http://www.tei-c.org/ns/1.0">
<xsl:stylesheet version="2.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:max="https://max.unicaen.fr"
                xmlns:tei="http://www.tei-c.org/ns/1.0"
                exclude-result-prefixes="tei max"

>

    <xsl:import href="document_title.xsl"/>


    <xsl:output
            method="xhtml"/>

    <xsl:param name="baseuri"/>
    <xsl:param name="project"/>
    <xsl:param name="selectedId"/>
@@ -30,10 +39,10 @@
                    type="button"
                    data-target="selected-{$selectedId}"
                    id="selected-{$selectedId}"
                    data-toggle="dropdown"
                    data-bs-toggle="dropdown"
                    aria-haspopup="true"
                    aria-expanded="true">
                <xsl:apply-templates select=".//li[@data-target = $selectedId]/a"/>
                <xsl:apply-templates exclude-result-prefixes="max" select=".//li[@data-target = $selectedId]/a"/>
            </button>

            <ul id="dropdown-navigation" class="dropdown-menu" aria-labelledby="selected-{$selectedId}">
Loading