Show
Ignore:
Timestamp:
18.10.2007 14:56:29 (2 years ago)
Author:
sam
Message:

* passage à 3.4.002
* binaryXhtmlTransf :

  • ajout sm:WFreeBlock
  • ajout sm:WFlash
  • sur sm:WImage & sm:WFlash : implémentation de sm:size permetant de borner width et height de l'elt html en partant des dim de la res publié
  • ajout de sm:chooseOnBinary permetant d'ajouter des conditionnalités de génération en fonction de caractéristiques d'une resource transformé (dims seuls pour le moment)
  • sm:WLink :
    • ajout de sm:WImage à sm:link
    • si sm:link/sm:position/sm:centerScreen alors par défaut, pour les res de type image et flash, le popup prend les dimensions de la resource qu'il affiche.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/_common/sm/web/sm_WLink.xml.xsl

    r9780 r9844  
    5151        <!-- linkOptions        --> 
    5252        <xsl0:template name="linkOptions"> 
    53                 <xsl0:choose> 
    54                         <xsl0:when test="sm:link"><xsl0:for-each select="sm:link"><xsl0:call-template name="xLinkOptions"/></xsl0:for-each></xsl0:when> 
    55                         <xsl0:otherwise><xsl0:call-template name="xLinkOptions"/></xsl0:otherwise> 
     53                <xsl0:param name="pWidthDefault"/> 
     54                <xsl0:param name="pHeightDefault"/> 
     55                <xsl0:choose> 
     56                        <xsl0:when test="sm:link"> 
     57                                <xsl0:for-each select="sm:link"> 
     58                                        <xsl0:call-template name="xLinkOptions"> 
     59                                                <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> 
     60                                                <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> 
     61                                        </xsl0:call-template> 
     62                                </xsl0:for-each> 
     63                        </xsl0:when> 
     64                        <xsl0:otherwise> 
     65                                <xsl0:call-template name="xLinkOptions"> 
     66                                        <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> 
     67                                        <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> 
     68                                </xsl0:call-template> 
     69                        </xsl0:otherwise> 
     70                </xsl0:choose> 
     71        </xsl0:template> 
     72 
     73        <!-- linkOptionsXsl - production xsl (xsl0: et xsl:) --> 
     74        <xsl0:template name="linkOptionsXsl"> 
     75                <xsl0:param name="pWidthDefault"/> 
     76                <xsl0:param name="pHeightDefault"/> 
     77                <xsl0:choose> 
     78                        <xsl0:when test="sm:link"> 
     79                                <xsl0:for-each select="sm:link"> 
     80                                        <xsl0:call-template name="xLinkOptionsXsl"> 
     81                                                <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> 
     82                                                <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> 
     83                                        </xsl0:call-template> 
     84                                </xsl0:for-each> 
     85                        </xsl0:when> 
     86                        <xsl0:otherwise> 
     87                                <xsl0:call-template name="xLinkOptionsXsl"> 
     88                                        <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> 
     89                                        <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> 
     90                                </xsl0:call-template> 
     91                        </xsl0:otherwise> 
    5692                </xsl0:choose> 
    5793        </xsl0:template> 
     
    116152        <!-- xLinkOptions       --> 
    117153        <xsl0:template name="xLinkOptions"> 
     154                <xsl0:param name="pWidthDefault"/> 
     155                <xsl0:param name="pHeightDefault"/> 
    118156                <xsl0:choose> 
    119157                        <xsl0:when test="@target='subWindow'"> 
     
    133171                                <xsl0:value-of select="si(sm:position/sm:free/@top, concat('top=', sm:position/sm:free/@top, ','), '')"/> 
    134172                                <xsl0:value-of select="si(sm:position/sm:free/@left, concat('left=', sm:position/sm:free/@left, ','), '')"/> 
    135                                 <xsl0:value-of select="si(sm:position/sm:centerScreen, concat('width=', sm:position/sm:centerScreen/@width, ',height=', sm:position/sm:centerScreen/@height, ',left=&quot;', '+(screen.availWidth-', sm:position/sm:centerScreen/@width, ')/2+&quot;,top=&quot;', '+(screen.availHeight-', sm:position/sm:centerScreen/@height, ')/2+&quot;,'),'')"/> 
     173                                <xsl0:if test="boolean(sm:position/sm:centerScreen)"> 
     174                                        <xsl0:variable name="vWidth" select="si(boolean(sm:position/sm:centerScreen/@width), sm:position/sm:centerScreen/@width, si(string-length($pWidthDefault)=0, '800', $pWidthDefault))"/> 
     175                                        <xsl0:variable name="vHeight" select="si(boolean(sm:position/sm:centerScreen/@height), sm:position/sm:centerScreen/@height, si(string-length($pHeightDefault)=0, '600', $pHeightDefault))"/> 
     176                                        <xsl0:value-of select="concat('width=', $vWidth, ',height=', $vHeight, ',left=&quot;', '+(screen.availWidth-', $vWidth, ')/2+&quot;,top=&quot;', '+(screen.availHeight-', $vHeight, ')/2+&quot;,')"/> 
     177                                </xsl0:if> 
     178                                <xsl0:value-of select="si(sm:position/sm:maximized, concat('top=0,left=0,width=', ',width=&quot;', '+screen.availWidth', '+&quot;,height=&quot;', '+screen.availHeight', '+&quot;,'),'')"/> 
     179                                <xsl0:value-of select="si(sm:windowFeatures/@scrollbars, concat('scrollbars=', sm:windowFeatures/@scrollbars, ','), '')"/> 
     180                                <xsl0:value-of select="si(sm:windowFeatures/@resizable, concat('resizable=', sm:windowFeatures/@resizable, ','), '')"/> 
     181                                <xsl0:value-of select="si(sm:windowFeatures/@toolbar, concat('toolbar=', sm:windowFeatures/@toolbar, ','), '')"/> 
     182                                <xsl0:value-of select="si(sm:windowFeatures/@menubar, concat('menubar=', sm:windowFeatures/@menubar, ','), '')"/> 
     183                                <xsl0:value-of select="si(sm:windowFeatures/@location, concat('location=', sm:windowFeatures/@location, ','), '')"/> 
     184                                <xsl0:value-of select="si(sm:windowFeatures/@extraOptions, concat(sm:windowFeatures/@extraOptions, ','), '')"/> 
     185                        </xsl0:otherwise> 
     186                </xsl0:choose> 
     187        </xsl0:template> 
     188         
     189        <!-- xLinkOptionsXsl    --> 
     190        <xsl0:template name="xLinkOptionsXsl"> 
     191                <xsl0:param name="pWidthDefault"/> 
     192                <xsl0:param name="pHeightDefault"/> 
     193                <xsl0:choose> 
     194                        <xsl0:when test="@target='subWindow'"> 
     195                                <xsl0:value-of select="si(sm:position/sm:free/@width,concat('WIDTH:',sm:position/sm:free/@width,','),'')"/> 
     196                                <xsl0:value-of select="si(sm:position/sm:free/@height,concat('HEIGHT:',sm:position/sm:free/@height,','),'')"/> 
     197                                <xsl0:value-of select="si(sm:position/sm:free/@top,concat('TOP:',sm:position/sm:free/@top,','),'')"/> 
     198                                <xsl0:value-of select="si(sm:position/sm:free/@left,concat('LEFT:',sm:position/sm:free/@left,','),'')"/> 
     199                                <xsl0:value-of select="si(sm:position/sm:centerScreen,concat('CENTERSCREEN:true,WIDTH:',sm:position/sm:centerScreen/@width,',WIDTH:',sm:position/sm:centerScreen/@width,','),'')"/> 
     200                                <xsl0:value-of select="si(sm:position/sm:maximized,'MAXIMIZED:true,','')"/> 
     201                                <xsl0:value-of select="si(sm:windowFeatures/@scrollbars='no','SCROLLBARS:false,','SCROLLBARS:true,')"/> 
     202                                <xsl0:value-of select="si(sm:windowFeatures/@resizable='yes','RESIZEABLE:true,','RESIZEABLE:false,')"/> 
     203                                <xsl0:value-of select="si(sm:windowFeatures/@extraOptions, concat(sm:windowFeatures/@extraOptions, ','), '')"/> 
     204                        </xsl0:when> 
     205                        <xsl0:otherwise> 
     206                                <xsl0:value-of select="si(sm:position/sm:free/@width, concat('width=', sm:position/sm:free/@width, ','), '')"/> 
     207                                <xsl0:value-of select="si(sm:position/sm:free/@height, concat('height=', sm:position/sm:free/@height, ','), '')"/> 
     208                                <xsl0:value-of select="si(sm:position/sm:free/@top, concat('top=', sm:position/sm:free/@top, ','), '')"/> 
     209                                <xsl0:value-of select="si(sm:position/sm:free/@left, concat('left=', sm:position/sm:free/@left, ','), '')"/> 
     210                                <xsl0:if test="boolean(sm:position/sm:centerScreen)"> 
     211                                        <xsl0:variable name="vWidth" select="si(boolean(sm:position/sm:centerScreen/@width), sm:position/sm:centerScreen/@width, $pWidthDefault)"/> 
     212                                        <xsl0:variable name="vHeight" select="si(boolean(sm:position/sm:centerScreen/@height), sm:position/sm:centerScreen/@height, $pHeightDefault)"/> 
     213                                        <xsl:variable name="vWidth"><xsl0:copy-of select="$vWidth"/></xsl:variable> 
     214                                        <xsl:variable name="vHeight"><xsl0:copy-of select="$vHeight"/></xsl:variable> 
     215                                        <xsl:value-of select="concat('width=', si($vWidth,$vWidth,'800'), ',height=', si($vHeight,$vHeight,'600'), ',left=&quot;', '+(screen.availWidth-', si($vWidth,$vWidth,'800'), ')/2+&quot;,top=&quot;', '+(screen.availHeight-', si($vHeight,$vHeight,'600'), ')/2+&quot;,')"/> 
     216                                </xsl0:if> 
    136217                                <xsl0:value-of select="si(sm:position/sm:maximized, concat('top=0,left=0,width=', ',width=&quot;', '+screen.availWidth', '+&quot;,height=&quot;', '+screen.availHeight', '+&quot;,'),'')"/> 
    137218                                <xsl0:value-of select="si(sm:windowFeatures/@scrollbars, concat('scrollbars=', sm:windowFeatures/@scrollbars, ','), '')"/> 
     
    189270                        <xsl0:when test="@target='subWindow'"> 
    190271                                <xsl0:attribute name="href">#</xsl0:attribute> 
    191                                 <xsl:variable name="vOptions"><xsl0:value-of select="$pOptions"/><xsl0:copy-of select="$pExtraOptions"/></xsl:variable> 
     272                                <xsl:variable name="vOptions"><xsl0:copy-of select="$pOptions"/><xsl0:copy-of select="$pExtraOptions"/></xsl:variable> 
    192273                                <xsl:attribute name="onclick">scDynUiMgr.displaySubWindow(this,&quot;<xsl0:copy-of select="$pUrl"/>&quot;,&quot;<xsl0:value-of select="si(@windowName, @windowName, 'subWindow')"/>&quot;,{<xsl:value-of select="si(string-length($vOptions)&gt;0, substring($vOptions,0,string-length($vOptions)), '')"/>});return(false);</xsl:attribute> 
    193274                        </xsl0:when> 
    194                         <xsl0:when test="$pOptions!=''"> 
    195                                 <xsl:variable name="vOptions"><xsl0:value-of select="$pOptions"/><xsl0:copy-of select="$pExtraOptions"/></xsl:variable> 
     275                        <xsl0:when test="boolean($pOptions)"> 
     276                                <xsl:variable name="vOptions"><xsl0:copy-of select="$pOptions"/><xsl0:copy-of select="$pExtraOptions"/></xsl:variable> 
    196277                                <xsl:attribute name="href">javascript:window.open(&quot;<xsl0:copy-of select="$pUrl"/>&quot;,<xsl0:choose> 
    197278                                        <xsl0:when test="@target='newWindow'">&quot;_blank&quot;</xsl0:when>