Commit d3db0042 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

remplacement des tooltips(pour note de base de page) jquery par tootlips bootstrap

parent d470d15e
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ class MaxTEI extends AbstractMax {
            }

            this.bindNavigationTool();
            this.bindTooltips();
            this.runPlugins();
            this.textOptions();

@@ -149,31 +148,6 @@ class MaxTEI extends AbstractMax {
        }
    }

    bindTooltips() {
        try {
            $('[data-toggle="tooltip"]').each(function () {
                let noteNumber = $(this).attr('id').substr(5);
                //clones bottom page note
                let noteContent = $("#wrap_bdp_" + noteNumber).clone();
                //removes note call (</a>)
                noteContent.find(window.NOTE_TO_TXT_CLASS).remove();
                //tooltip mapping
                $(this).tooltip(
                    {
                        html: true, // allows html content
                        title: noteContent.html(),
                        delay: {
                            "show": 0,//instantatly shown
                            "hide": 3000 //displayed during 3seconds
                        }
                    }
                );
            });
        } catch (e) {
            console.log('tooltips error ' + e);
        }
    }


    isWithNotes() {
        return document.querySelectorAll('.appel_note_marge').length > 0
+4 −1
Original line number Diff line number Diff line
@@ -78,7 +78,10 @@
            <xsl:attribute name="id">appel<xsl:value-of select="$numeroNote"/></xsl:attribute>
            <xsl:attribute name="href">#bdp<xsl:value-of select="$numeroNote"/></xsl:attribute>
            <!-- tooltiping -->
            <xsl:attribute name="data-toggle">tooltip</xsl:attribute>
            <xsl:attribute name="data-bs-toggle">tooltip</xsl:attribute>
            <xsl:attribute name="title">
                <xsl:apply-templates></xsl:apply-templates>
            </xsl:attribute>
            <!-- Contenu: numéro de la note -->
            <xsl:value-of select="$numeroNote"/>
        </a>