Changeset 31791

Show
Ignore:
Timestamp:
12.07.2017 14:27:27 (4 months ago)
Author:
kjdon
Message:

we have a separate template for displayign the text for editing. We need to display the text as is, otherwise we are not editing the right thing

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl

    r31769 r31791  
    9393        <br /><br /> 
    9494        <div id="text{@nodeID}" class="sectionText"><!-- *** --> 
    95             <xsl:if test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]"> 
     95          <xsl:choose> 
     96            <xsl:when test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]"> 
    9697                        <xsl:attribute name="contenteditable"> 
    9798                    <xsl:text>true</xsl:text> 
    9899                </xsl:attribute> 
    99                 </xsl:if> 
     100            <xsl:call-template name="documentNodeTextForEditing"/> 
     101                </xsl:when> 
     102            <xsl:otherwise> 
    100103            <xsl:attribute name="style"> 
    101104                <xsl:choose> 
     
    108111                </xsl:choose> 
    109112            </xsl:attribute> 
    110  
    111113            <xsl:call-template name="documentNodeText"/> 
     114 
     115            </xsl:otherwise> 
     116          </xsl:choose> 
    112117        </div> 
    113118    </xsl:template> 
     
    622627    </xsl:template> 
    623628 
     629    <!-- The default template for displaying the document node text in 
     630    editing mode --> 
     631    <!-- equivalent to gsf:text --> 
     632    <xsl:template name="documentNodeTextForEditing"> 
     633      <!-- Section text --> 
     634      <xsl:for-each select="nodeContent"> 
     635        <xsl:for-each select="node()"> 
     636          <xsl:choose> 
     637        <xsl:when test="not(name())"> 
     638          <xsl:value-of select="." disable-output-escaping="yes"/> 
     639        </xsl:when> 
     640        <xsl:otherwise> 
     641          <xsl:apply-templates/> 
     642        </xsl:otherwise> 
     643          </xsl:choose> 
     644        </xsl:for-each> 
     645      </xsl:for-each> 
     646    </xsl:template> 
    624647    <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin --> 
    625648    <xsl:template name="documentNodeFlashXML">