Commit 7cac61d1 authored by Anne Goloubkoff-Duponchel's avatar Anne Goloubkoff-Duponchel Committed by Jerome Chauveau
Browse files

modification du test dans le js

parent b2427903
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@ class SideTocPlugin extends Plugin{

  run(){
    console.log("plugin side toc running");
    if(document.getElementById('text') && document.getElementById(fragmentId)){
    // if(document.getElementById('text') && document.getElementById(fragmentId)){
    if(document.getElementById('text') && fragmentId){
        this.highlightTreeNode('details_'+fragmentId)
    }
   }
+13 −7
Original line number Diff line number Diff line
@@ -15,12 +15,12 @@ declare function local:buildEADDocumentTOC($projectId, $docPath){
    return
        <nav>
            {
                for $c in $target/*:ead/*:archdesc
                for $c in $target/*:ead/*:archdesc/*:dsc
                return
                    <details id="details_{$c/@id}">
                    <details id="details_{$c/@id}" open="">
                        <summary>
                        <a href="{$baseURI}{$projectId}/{$docPath}/{$c/@id}.html">
                            {$c/@id}
                        <a href="{$baseURI}{$projectId}/{$docPath}/{$c/ancestor::*:archdesc/@id}.html">
                            {$c/ancestor::*:archdesc/*:did/node()}
                            {$c/*:did/node()}
                            </a>
                        </summary>
@@ -31,9 +31,9 @@ declare function local:buildEADDocumentTOC($projectId, $docPath){
};

declare function local:childrenToc($component, $projectId, $docPath){
    for $c in $component/*
    for $c in $component/child::*:c
    return
        if(local-name($c) = 'c')
       if($c/*:c)
        then
        <details  id="details_{$c/@id}">
            <summary>
@@ -44,7 +44,13 @@ declare function local:childrenToc($component, $projectId, $docPath){
            </summary>
            {local:childrenToc($c, $projectId, $docPath)}
        </details>
        else local:childrenToc($c, $projectId, $docPath)
        (: else local:childrenToc($c, $projectId, $docPath) :)
         else (
          <div class="detail" id="details_{$c/@id}">
          <a href="{$baseURI}{$projectId}/{$docPath}/{$c/@id}.html">
                    {$c/*:did/node()}
                </a>
              </div>)
};

local:buildEADDocumentTOC($project, $doc)
+8 −4
Original line number Diff line number Diff line
@@ -184,18 +184,22 @@ img {
 * Affichage de l'arborescence
 */

summary {
summary, div.detail {
    border: 1px dotted transparent;
    /*margin-bottom: 0.3em;*/
    cursor: context-menu;
    padding: 0;
}

summary:hover {
div.detail {
    margin: 0px 0px 0px 30px;
}

summary:hover, div.detail:hover {
    border: 1px dotted black;
}

summary a {
summary a, div.detail a {
    font-size: 0.8em;
    text-decoration: none;
    color: var(--ead-link-color);
@@ -211,7 +215,7 @@ summary a {
    margin-left: 2em;
}

.side-toc details.selected_details {
.side-toc details.selected_details, .side-toc div.selected_details {
    background-color: var(--ead-selected-bg-color);
    padding: 0.5em;
    border: var(--ead-box-border);
+10 −12
Original line number Diff line number Diff line
@@ -23,18 +23,16 @@
        </nav>
    </xsl:template>
    <xsl:template match="details">
        <xsl:choose>
            <xsl:when test="details">
                <details id="{@id}">
        <details>
        <xsl:copy-of select="@*"/>
            <xsl:apply-templates/>
        </details>
            </xsl:when>
            <xsl:otherwise>
                <details open="">
    </xsl:template>
    <xsl:template match="div[@class='detail']">
        <div>
            <xsl:copy-of select="@*"/>
            <xsl:apply-templates/>
                </details>
            </xsl:otherwise>
        </xsl:choose>
        </div>
    </xsl:template>
    <xsl:template match="summary">
        <summary>