Changeset 12894


Ignore:
Timestamp:
02/27/09 11:53:25 (3 years ago)
Author:
sam
Message:

dataFormWebTransf & textWebTransf : ajout de @cropTo sur sm:fieldValueString et sm:urlText

Location:
trunk/Wsp_Modeling
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/es/content/data/dataFormXhtmlTransf/xml.xed.xml

    r12880 r12894  
    178178                 
    179179                <se:choice se:id="forField_choice" se:card="*" se:show="ifExist"> 
    180                         <element se:name="sm:fieldName" se:id="forField_fieldName" se:bind="element" forcefilled="true"> 
    181                                 <childs/> 
    182                         </element> 
     180                        <element se:name="sm:fieldName" se:id="forField_fieldName" se:bind="element" forcefilled="true"/> 
    183181                        <element se:name="sm:fieldValueString" se:id="forField_fieldValueString" se:bind="element" forcefilled="true"> 
    184                                 <childs/> 
     182                                <atts> 
     183                                        <attribute se:name="cropTo" se:bind="attribute"> 
     184                                                <wordsInput trim="true" notnull="true" validRegExp="^[0-9]+$" frenchPonct="false"/> 
     185                                        </attribute> 
     186                                </atts> 
    185187                        </element> 
    186188                        <element se:name="sm:fieldValueEnum" se:id="forField_fieldValueEnum" se:bind="element" forcefilled="true"> 
  • trunk/Wsp_Modeling/es/content/resources/textXhtmlTransf/xml.xed.xml

    r12890 r12894  
    366366                                                                                                        <se:choice se:card="*" se:show="ifExist"> 
    367367                                                                                                                <element se:name="sm:textLink" se:bind="element" forcefilled="true"/> 
    368                                                                                                                 <element se:name="sm:urlText" se:bind="element" forcefilled="true"/> 
     368                                                                                                                <element se:name="sm:urlText" se:bind="element" forcefilled="true"> 
     369                                                                                                                        <atts> 
     370                                                                                                                                <attribute se:name="cropTo" se:bind="attribute"> 
     371                                                                                                                                        <wordsInput trim="true" notnull="true" validRegExp="^[0-9]+$" frenchPonct="false"/> 
     372                                                                                                                                </attribute> 
     373                                                                                                                        </atts> 
     374                                                                                                                </element> 
    369375                                                                                                                <se:ref se:refid="elt_fixedString"/> 
    370376                                                                                                        </se:choice> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/_common/sm/textXhtmlTransf/content.xsl.xsl

    r12890 r12894  
    758758        <xsl0:template match="sm:callSubModel" mode="refItemLabel"><xsl:value-of select="resultatAgent(concat('@', getIdFromPath(@sc:refUri), '{getAxisSuffix(@axis)}/xhtmlContent'))" disable-output-escaping="yes"/></xsl0:template> 
    759759        <xsl0:template match="sm:subModelTitle" mode="refItemLabel"><xsl0:value-of select="@prefix"/><xsl:value-of select="resultatAgent(concat('@', getIdFromPath(@sc:refUri), '{getAxisSuffix(@axis)}/{si(@format, @format, 'fullTitleText')}'))"/><xsl0:value-of select="@suffix"/></xsl0:template> 
    760         <xsl0:template match="sm:urlText" mode="refItemLabel"><xsl:value-of select="@url"/></xsl0:template> 
     760        <xsl0:template match="sm:urlText" mode="refItemLabel"> 
     761                <xsl0:choose> 
     762                        <xsl0:when test="@cropTo"><xsl:value-of select="si(string-length(@url)>{@cropTo},concat(substring(@url,1,{@cropTo}),'…'),@url)"/></xsl0:when> 
     763                        <xsl0:otherwise><xsl:value-of select="@url"/></xsl0:otherwise> 
     764                </xsl0:choose> 
     765        </xsl0:template> 
    761766        <xsl0:template match="node()" mode="refItemLabel"/> 
    762767        <!-- Axis refItemHref --> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/bs.xml.xsl

    r11045 r12894  
    302302        <!-- --> 
    303303        <xsl0:template match="sm:fieldValueString" mode="content"> 
    304                 <xsl:value-of select="."/> 
     304                <xsl0:choose> 
     305                        <xsl0:when test="@cropTo"><xsl:value-of select="si(string-length(.)>{@cropTo},concat(substring(.,1,{@cropTo}),'…'),.)"/></xsl0:when> 
     306                        <xsl0:otherwise><xsl:value-of select="."/></xsl0:otherwise> 
     307                </xsl0:choose> 
    305308        </xsl0:template> 
    306309        <xsl0:template match="sm:fieldName" mode="content"> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/common.xsl.xsl

    r12321 r12894  
    101101        <xsl0:template match="sm:fieldValueString" mode="string"> 
    102102                <xsl0:choose> 
    103                                 <xsl0:when test="@field"><xsl:value-of select="sp:{si(@field, java:replaceAll(string(@field), '\s', ' | sp:'), '*')}"/></xsl0:when> 
    104                                 <xsl0:otherwise><xsl:value-of select="."/></xsl0:otherwise> 
     103                        <xsl0:when test="string-length(@cropTo)>0"> 
     104                                <xsl:variable name="vTxt"> 
     105                                        <xsl0:choose> 
     106                                                        <xsl0:when test="@field"><xsl:value-of select="sp:{si(@field, java:replaceAll(string(@field), '\s', ' | sp:'), '*')}"/></xsl0:when> 
     107                                                        <xsl0:otherwise><xsl:value-of select="."/></xsl0:otherwise> 
     108                                        </xsl0:choose> 
     109                                </xsl:variable>                  
     110                                <xsl:value-of select="si(string-length($vTxt)>{@cropTo},concat(substring($vTxt,1,{@cropTo}),'…'),$vTxt)"/></xsl0:when> 
     111                        <xsl0:otherwise> 
     112                                <xsl0:choose> 
     113                                                <xsl0:when test="@field"><xsl:value-of select="sp:{si(@field, java:replaceAll(string(@field), '\s', ' | sp:'), '*')}"/></xsl0:when> 
     114                                                <xsl0:otherwise><xsl:value-of select="."/></xsl0:otherwise> 
     115                                </xsl0:choose> 
     116                        </xsl0:otherwise> 
    105117                </xsl0:choose> 
    106118        </xsl0:template> 
Note: See TracChangeset for help on using the changeset viewer.