Ignore:
Timestamp:
07/25/07 22:28:40 (5 years ago)
Author:
sam
Message:
  • mutualisation elts bs sm:tooltip et sm:link
  • sm:link/@target='subWindow' début.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_openUiTemplate/template.wm.xsl

    r9247 r9401  
    4949                exclude-result-prefixes="sm sc xsl java xhtml" 
    5050                version="1.0"> 
     51 
     52        <xsl0:import href="bsco:sm/web/sm_WLink.xml.xsl"/> 
     53 
    5154        <xsl0:output indent="no"/> 
    5255         
     
    6063                <!-- Parcours des transformers pour les inclusions --> 
    6164                <xsl0:value-of select="execute( 
    62                                 initBuffer('checkBlock', java:java.util.HashSet.new()),  
    63                                 resultatAgent('//agentGenerator', 'fillBuffersPostXslFragmentXhtml:xhtml') 
    64                         )"/> 
     65                    initBuffer('checkBlock', java:java.util.HashSet.new()),  
     66                    resultatAgent('//agentGenerator', 'fillBuffersPostXslFragmentXhtml:xhtml'), 
     67                    si(.//sm:link[@target='subWindow'], resultatAgent('//agentGenerator', 'fillBufferDynUiLibrary')) 
     68                   )"/>                  
    6569                <xsl0:variable name="pathFillBuffer" select="concat('templatesCalled/', resultatDialogue('.../codeTemplate'), '/fillBuffers')"/> 
    6670                <!-- Parcours tous les transformer pour trouver ceux qui exploitent ce template --> 
     
    202206        <xsl0:template match="sm:WLink"> 
    203207                <xsl0:variable name="vOptions"> 
    204                         <xsl0:value-of select="si(sm:link/sm:position/sm:free/@width, concat('width=', sm:link/sm:position/sm:free/@width, ','), '')"/> 
    205                         <xsl0:value-of select="si(sm:link/sm:position/sm:free/@height, concat('height=', sm:link/sm:position/sm:free/@height, ','), '')"/> 
    206                         <xsl0:value-of select="si(sm:link/sm:position/sm:free/@top, concat('top=', sm:link/sm:position/sm:free/@top, ','), '')"/> 
    207                         <xsl0:value-of select="si(sm:link/sm:position/sm:free/@left, concat('left=', sm:link/sm:position/sm:free/@left, ','), '')"/> 
    208                         <xsl0:value-of select="si(sm:link/sm:position/sm:centerScreen, concat('width=', sm:link/sm:position/sm:centerScreen/@width, ',height=', sm:link/sm:position/sm:centerScreen/@height, ',left=&quot;', '+(screen.availWidth-', sm:link/sm:position/sm:centerScreen/@width, ')/2+&quot;,top=&quot;', '+(screen.availHeight-', sm:link/sm:position/sm:centerScreen/@height, ')/2+&quot;,'),'')"/> 
    209                         <xsl0:value-of select="si(sm:link/sm:position/sm:maximized, concat('top=0,left=0,width=', ',width=&quot;', '+screen.availWidth', '+&quot;,height=&quot;', '+screen.availHeight', '+&quot;,'),'')"/> 
    210                         <xsl0:value-of select="si(sm:link/sm:windowFeatures/@scrollbars, concat('scrollbars=', sm:link/sm:windowFeatures/@scrollbars, ','), '')"/> 
    211                         <xsl0:value-of select="si(sm:link/sm:windowFeatures/@resizable, concat('resizable=', sm:link/sm:windowFeatures/@resizable, ','), '')"/> 
    212                         <xsl0:value-of select="si(sm:link/sm:windowFeatures/@toolbar, concat('toolbar=', sm:link/sm:windowFeatures/@toolbar, ','), '')"/> 
    213                         <xsl0:value-of select="si(sm:link/sm:windowFeatures/@menubar, concat('menubar=', sm:link/sm:windowFeatures/@menubar, ','), '')"/> 
    214                         <xsl0:value-of select="si(sm:link/sm:windowFeatures/@location, concat('location=', sm:link/sm:windowFeatures/@location, ','), '')"/> 
    215                         <xsl0:value-of select="si(sm:link/sm:windowFeatures/@extraOptions, concat(sm:link/sm:windowFeatures/@extraOptions, ','), '')"/> 
     208                        <xsl0:call-template name="linkOptions"/><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
    216209                </xsl0:variable> 
    217210                <a> 
    218                         <xsl0:choose> 
    219                                 <xsl0:when test="$vOptions!=''"> 
    220                                         <xsl0:attribute name="href">javascript:window.open('<xsl0:choose> 
    221                                                         <xsl0:when test="sm:link/sm:fixedURL"><xsl0:value-of select="sm:link/sm:fixedURL/@url"/></xsl0:when> 
    222                                                 </xsl0:choose>',<xsl0:choose> 
    223                                                         <xsl0:when test="sm:link/@target='newWindow'">'_blank'</xsl0:when> 
    224                                                         <xsl0:when test="sm:link/@target='sameWindow'">'_self'</xsl0:when> 
    225                                                         <xsl0:when test="sm:link/@target='namedWindow'">'<xsl0:value-of select="si(sm:link/@windowName, sm:link/@windowName, '_blank')"/>'</xsl0:when> 
    226                                                         <xsl0:otherwise>'_self'</xsl0:otherwise> 
    227                                                 </xsl0:choose>,'<xsl0:value-of select="substring($vOptions,0,string-length($vOptions))"/>')?void(0):void(0)</xsl0:attribute> 
    228                                 </xsl0:when> 
    229                                 <xsl0:otherwise> 
    230                                         <xsl0:attribute name="href"><xsl0:choose> 
    231                                                 <xsl0:when test="sm:link/sm:fixedURL"><xsl0:value-of select="sm:link/sm:fixedURL/@url"/></xsl0:when> 
    232                                                 <xsl0:when test="sm:link/sm:next">$vDialog.hGetResultat('act:cdaction=GoToNext')</xsl0:when> 
    233                                                 <xsl0:when test="sm:link/sm:previous">$vDialog.hGetResultat('act:cdaction=GoToPrec')</xsl0:when> 
    234                                                 <xsl0:otherwise>$vGeneratorUtils.resultatDialog('/@@','act:')</xsl0:otherwise> <!-- GoToHome --> 
    235                                         </xsl0:choose></xsl0:attribute> 
    236                                         <xsl0:attribute name="target"> 
    237                                                 <xsl0:choose> 
    238                                                         <xsl0:when test="sm:link/@target='newWindow'">_blank</xsl0:when> 
    239                                                         <xsl0:when test="sm:link/@target='sameWindow'">_self</xsl0:when> 
    240                                                         <xsl0:when test="sm:link/@target='namedWindow'"><xsl0:value-of select="si(sm:link/@windowName, sm:link/@windowName, '_blank')"/></xsl0:when> 
    241                                                         <xsl0:otherwise>_self</xsl0:otherwise> 
    242                                                 </xsl0:choose> 
    243                                         </xsl0:attribute> 
    244                                 </xsl0:otherwise> 
    245                         </xsl0:choose> 
     211                        <xsl0:call-template name="linkHref"><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
     212                                <xsl0:with-param name="pUrl"><xsl0:apply-templates mode="wlinkUrl" select="sm:link/*"/></xsl0:with-param> 
     213                                <xsl0:with-param name="pOptions"><xsl0:value-of select="$vOptions"/></xsl0:with-param> 
     214                        </xsl0:call-template> 
    246215                        <xsl0:call-template name="classAtt"/> 
    247216                        <xsl0:call-template name="idAtt"/> 
     
    254223                        </xsl0:choose></a> 
    255224        </xsl0:template> 
     225        <xsl0:template match="sm:fixedURL" mode="wlinkUrl"><xsl0:value-of select="@url"/></xsl0:template> 
     226        <xsl0:template match="*|text()|@*" mode="wlinkUrl"/> 
    256227 
    257228        <!-- sm:WButton ===================================================================== --> 
Note: See TracChangeset for help on using the changeset viewer.