Changeset 9844

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.
Location:
trunk
Files:
3 added
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/Bui_Conf/defaultAppDef.about.xml

    r9715 r9844  
    1313        <copyright>Copyright (c) 2006-2007 contributors. All rights reserved.</copyright> 
    1414        <!-- <id/> NOTE : app dépendant --> 
    15         <version developmentStage="alpha" major="3" medium="4" minor="001"/><!-- developmentStage=[pre-alpha, alpha, beta, rc, final] --> 
     15        <version developmentStage="alpha" major="3" medium="4" minor="002"/><!-- developmentStage=[pre-alpha, alpha, beta, rc, final] --> 
    1616        <!--<profile name=""/> valeur par défaut : ${app.name}${app.version(major)}${app.version(medium)}--> 
    1717        <!-- <server port="" univers=""/>  NOTE : app dépendant --> 
  • trunk/Wsp_Modeling/es/content/resources/binaryXhtmlTransf/xml.xed.xml

    r9749 r9844  
    176176                                <alternativeAlone se:bind="choice" se:card="?"> 
    177177                                        <se:ref se:refid="sm:freeTransform" se:refurl="chrome://sm_modeling/content/xEdition/core.xed.xml"/> 
    178                                         <element se:name="sm:imageTransform" se:bind="element" se:card="?" tooltipTag="&resources.binary.imageTransform;"> 
     178                                        <element se:name="sm:imageTransform" se:id="sm:imageTransform" se:bind="element" se:card="?" tooltipTag="&resources.binary.imageTransform;"> 
    179179                                                <atts> 
    180180                                                        <attribute se:name="scale" se:bind="attribute" tooltiptext="&resources.binary.imageTransform.scale;"> 
     
    205205                </element> 
    206206 
     207<!-- LIB : sm:size --> 
     208                <element se:name="sm:size" se:id="sm:size" se:bind="element" se:card="?" se:show="ifExist" forcefilled="true" insert="collapsed"> 
     209                        <atts> 
     210<!-- TODO                               <attribute se:bind="attribute" se:name="source"> 
     211                                        <choiceInput> 
     212                                                <ciItem label="fromPublishedBinary"/> 
     213                                                <ciItem label="fromProperties"/> 
     214                                        </choiceInput> 
     215                                </attribute> 
     216 -->                            <se:ref se:name="scale" se:refid="att_sizeTemplate"/> 
     217                                <attribute se:name="minWidth" se:id="att_sizeTemplate" se:bind="attribute"> 
     218                                        <wordsInput trim="true"/> 
     219                                </attribute> 
     220                                <se:ref se:name="maxWidth" se:refid="att_sizeTemplate"/> 
     221                                <se:ref se:name="minHeight" se:refid="att_sizeTemplate"/> 
     222                                <se:ref se:name="maxHeight" se:refid="att_sizeTemplate"/> 
     223                        </atts> 
     224                </element> 
     225 
    207226<!-- LIB : sm:longDesc --> 
    208                 <element se:id="sm:longDesc" se:name="sm:longDesc" se:bind="element" se:card="?" forcefilled="true" se:show="ifExist"> 
     227                <element se:id="sm:longDesc" se:name="sm:longDesc" se:bind="element" se:card="?" forcefilled="true" se:show="ifExist" insert="collapsed"> 
    209228                        <childs> 
    210229                                <element se:name="sm:link" se:bind="element" forcefilled="true" tooltipTag="&common.widgets.wLink.link;"> 
     
    329348                                                <childs> 
    330349                                                        <se:choice se:id="content_choice" se:card="*" se:show="ifExist"> 
    331 <!--                                                            <element se:id="sm:choose" se:name="sm:choose" se:bind="element" forcefilled="true"> 
     350 
     351<!-- ==== sm:choose ===============  
     352                                                                <element se:id="sm:choose" se:name="sm:choose" se:bind="element" forcefilled="true"> 
    332353                                                                        <childs> 
    333354                                                                                <element se:name="sm:when" se:bind="element" se:card="+"> 
     
    350371                                                                        </childs> 
    351372                                                                </element> --> 
     373 
     374<!-- ==== sm:chooseOnBinary =============== -->                                                          
     375                                                                <element se:id="sm:chooseOnBinary" se:name="sm:chooseOnBinary" se:bind="element" forcefilled="true"> 
     376                                                                        <childs> 
     377                                                                                <element se:name="sm:binary" se:bind="element" forcefilled="true"> 
     378                                                                                        <atts> 
     379                                                                                                <attribute se:name="outputType" se:bind="attribute" se:mandat="true"> 
     380                                                                                                        <choiceInput notnull="true"> 
     381                                                                                                                <ciItem label="image"/> 
     382                                                                                                                <ciItem label="flash"/> 
     383                                                                                                        </choiceInput> 
     384                                                                                                </attribute> 
     385                                                                                        </atts> 
     386                                                                                        <childs> 
     387                                                                                                <alternativeAlone se:bind="choice" se:card="?"> 
     388                                                                                                        <se:ref se:refid="sm:swfTransform" se:refurl="chrome://sm_modeling/content/xEdition/core.xed.xml"/> 
     389                                                                                                        <se:ref se:refid="sm:imageTransform"/> 
     390                                                                                                </alternativeAlone> 
     391                                                                                        </childs> 
     392                                                                                </element> 
     393                                                                                <element se:name="sm:when" se:bind="element" se:card="+"> 
     394                                                                                        <atts> 
     395                                                                                                <se:ref se:name="widthOver" se:refid="att_sizeTemplate"/> 
     396                                                                                                <se:ref se:name="heightOver" se:refid="att_sizeTemplate"/> 
     397<!-- TODO: Il manque cette info ds les props                                                                                            <se:ref se:name="fileSizeOver" se:refid="att_sizeTemplate"/> --> 
     398                                                                                        </atts> 
     399                                                                                        <childs> 
     400                                                                                                <se:ref se:refid="content_choice"/> 
     401                                                                                                <insert se:bind="current"/> 
     402                                                                                        </childs> 
     403                                                                                </element> 
     404                                                                                <element se:name="sm:otherwise" se:bind="element" se:card="?" insert="true"> 
     405                                                                                        <childs> 
     406                                                                                                <se:ref se:refid="content_choice"/> 
     407                                                                                                <insert se:bind="current"/> 
     408                                                                                        </childs> 
     409                                                                                </element> 
     410                                                                        </childs> 
     411                                                                </element> 
     412 
     413<!-- ==== sm:callBinaryMeta =============== -->                                                          
    352414                                                                <se:ref se:refid="sm:callBinaryMeta"/> 
     415 
     416<!-- ==== sm:callModel =============== -->                                                               
    353417                                                                <se:ref se:refid="sm:callModel"/> 
    354                                                                 <se:ref se:name="sm:WAudio" se:refid="sm:WVideoAudio" tooltipTag="&resources.binary.wAudio;"/> 
     418 
     419<!-- ==== sm:WAudio =============== -->                                                          
     420                                                                <se:ref se:name="sm:WAudio" se:refid="sm:WAudioVideo" tooltipTag="&resources.binary.wAudio;"/> 
     421 
     422<!-- ==== sm:WCaptionBlock =============== -->                                                           
    355423                                                                <element  se:name="sm:WCaptionBlock"  se:id="sm:WCaptionBlock" se:bind="element" insert="true"> 
    356424                                                                        <atts> 
     
    386454                                                                        </childs> 
    387455                                                                </element> 
     456 
     457<!-- ==== sm:WFlash =============== -->                                                          
     458                                                                <element se:name="sm:WFlash" se:id="sm:WFlash" se:bind="element" insert="true"> 
     459                                                                        <atts> 
     460                                                                                <se:ref se:refid="atts_Class"/> 
     461                                                                        </atts> 
     462                                                                        <childs> 
     463                                                                                <element se:name="sm:binaryUrl" se:bind="element" forcefilled="true" tooltipTag="&resources.binary.binaryUrl;"> 
     464                                                                                        <childs> 
     465                                                                                                <se:ref se:refid="sm:swfTransform" se:refurl="chrome://sm_modeling/content/xEdition/core.xed.xml"/> 
     466                                                                                        </childs> 
     467                                                                                </element> 
     468                                                                                <insert4all se:bind="current"> 
     469                                                                                        <se:ref se:refid="sm:size"/> 
     470                                                                                </insert4all> 
     471                                                                                <element se:name="sm:param" se:id="sm:param" se:bind="element" se:card="*" se:show="ifExist" insert="true" tooltipTag="&resources.binary.wObject.param;"> 
     472                                                                                        <atts> 
     473                                                                                                <attribute se:name="name" se:bind="attribute" se:mandat="true"> 
     474                                                                                                        <wordsInput trim="true" notnull="true"/> 
     475                                                                                                </attribute> 
     476                                                                                                <attribute se:name="type" se:bind="attribute" tooltiptext="&resources.binary.wObject.param.type;"> 
     477                                                                                                        <choiceInput> 
     478                                                                                                                <ciItem label="tag"/> 
     479                                                                                                                <ciItem label="url"/> 
     480                                                                                                        </choiceInput> 
     481                                                                                                </attribute> 
     482                                                                                        </atts> 
     483                                                                                        <childs> 
     484                                                                                                <alternativeAlone se:bind="choice"> 
     485                                                                                                        <element se:name="sm:fixedValue" se:bind="element" se:card="?"> 
     486                                                                                                                <atts> 
     487                                                                                                                        <attribute se:name="value" se:bind="attribute"> 
     488                                                                                                                                <wordsInput trim="false"/> 
     489                                                                                                                        </attribute> 
     490                                                                                                                </atts> 
     491                                                                                                        </element> 
     492                                                                                                        <se:ref se:refid="sm:binaryUrl"/> 
     493                                                                                                </alternativeAlone> 
     494                                                                                        </childs> 
     495                                                                                </element> 
     496                                                                                <insert se:bind="current"/> 
     497                                                                                <element se:id="sm:defaultStyle" se:name="sm:defaultStyle" se:bind="element" se:card="?"> 
     498                                                                                        <childs> 
     499                                                                                                <textnode se:bind="text"> 
     500                                                                                                        <textpanelInput filterspaces="false"/> 
     501                                                                                                </textnode> 
     502                                                                                        </childs> 
     503                                                                                </element> 
     504                                                                        </childs> 
     505                                                                </element> 
     506 
     507<!-- ==== sm:WIFrame =============== -->                                                                 
    388508                                                                <element se:name="sm:WIFrame" se:id="sm:WIFrame" se:bind="element" insert="true" tooltipTag="&common.widgets.wIFrame;"> 
    389509                                                                        <atts> 
     
    413533                                                                                        <se:ref se:refid="sm:callBinaryMeta" insert="collapsed"/> 
    414534                                                                                        <se:ref se:refid="sm:callModel" insert="collapsed"/> 
     535                                                                                        <se:ref name="sm:WAudio" se:refid="sm:WAudioVideo" insert="collapsed"/> 
     536                                                                                        <se:ref se:refid="sm:WFlash" insert="collapsed"/> 
     537                                                                                        <se:ref se:refid="sm:WImage" insert="collapsed"/> 
    415538                                                                                        <se:ref se:refid="sm:WObject" insert="collapsed"/> 
    416                                                                                         <se:ref se:name="sm:WVideo" se:refid="sm:WVideoAudio" insert="collapsed"/> 
    417                                                                                         <se:ref se:name="sm:WAudio" se:refid="sm:WVideoAudio" insert="collapsed"/> 
     539                                                                                        <se:ref name="sm:WVideo" se:refid="sm:WAudioVideo" insert="collapsed"/> 
    418540                                                                                        <se:ref se:refid="sm:binaryUrl" insert="collapsed"/> 
    419541                                                                                        <se:ref se:refid="sm:externalUrl" insert="collapsed"/> 
    420542                                                                                </alternative> 
    421543                                                                                <insert4all se:bind="current"> 
    422                                                                                         <se:ref se:name="sm:width" se:refid="sm:mesurement"/> 
    423                                                                                         <se:ref se:name="sm:height" se:refid="sm:mesurement"/> 
    424544                                                                                        <se:ref se:refid="sm:longDesc"/> 
    425545                                                                                </insert4all> 
     
    427547                                                                        </childs> 
    428548                                                                </element> 
     549 
     550<!-- ==== sm:WImage =============== -->                                                          
    429551                                                                <element se:name="sm:WImage" se:id="sm:WImage" se:bind="element" insert="true" tooltipTag="&common.widgets.wImage;"> 
    430552                                                                        <atts> 
     
    434556                                                                                <se:ref se:refid="sm:binaryUrl" se:show="always"/> 
    435557                                                                                <insert4all se:bind="current"> 
    436                                                                                         <element se:name="sm:width" se:id="img_mesurement" se:bind="element" se:card="?" se:show="ifExist" forcefilled="true"> 
    437                                                                                                 <childs> 
    438                                                                                                         <alternativeAlone se:bind="choice" > 
    439                                                                                                                 <se:ref se:refid="mes_fixedValue"/> 
    440                                                                                                                 <element se:name="sm:fromPublishedImage" se:bind="element" se:card="1"/> 
    441                                                                                                         </alternativeAlone> 
    442                                                                                                 </childs> 
    443                                                                                         </element> 
    444                                                                                         <se:ref se:name="sm:height" se:refid="img_mesurement"/> 
     558                                                                                        <se:ref se:refid="sm:size"/> 
    445559                                                                                        <se:ref se:refid="sm:longDesc"/> 
    446560                                                                                </insert4all> 
     
    454568                                                                        </childs> 
    455569                                                                </element> 
     570 
     571<!-- ==== sm:WLink =============== -->                                                           
    456572                                                                <element se:id="sm:WLink" se:name="sm:WLink" se:bind="element" insert="true" se:card="*" se:show="ifExit" tooltipTag="&common.widgets.wLink;"> 
    457573                                                                        <atts> 
     
    496612                                                                        </childs> 
    497613                                                                </element> 
     614 
     615<!-- ==== sm:WObject =============== -->                                                                 
    498616                                                                <element se:name="sm:WObject" se:id="sm:WObject" se:bind="element" insert="true" tooltipTag="&resources.binary.wObject;"> 
    499617                                                                        <atts> 
     
    556674                                                                        </childs> 
    557675                                                                </element> 
     676 
     677<!-- ==== sm:WSimpleBlock =============== -->                                                            
    558678                                                                <element se:name="sm:WSimpleBlock" se:id="sm:WSimpleBlock" se:bind="element" insert="true"> 
    559679                                                                        <atts> 
     
    567687                                                                        </childs> 
    568688                                                                </element> 
     689 
     690<!-- ==== sm:WTooltip =============== -->                                                                
    569691                                                                <element se:name="sm:WTooltip" se:id="sm:WTooltip" se:bind="element" insert="true"> 
    570692                                                                        <atts> 
     
    595717                                                                                                                        <se:ref se:refid="sm:callBinaryMeta"/> 
    596718                                                                                                                        <se:ref se:refid="sm:callModel"/> 
    597                                                                                                                         <se:ref se:name="sm:WAudio" se:refid="sm:WVideoAudio" se:card="?"/> 
     719                                                                                                                        <se:ref se:name="sm:WAudio" se:refid="sm:WAudioVideo" se:card="?"/> 
    598720                                                                                                                        <se:ref se:refid="sm:WCaptionBlock"/> 
    599721                                                                                                                        <se:ref se:refid="sm:WIFrame"/> 
     
    603725                                                                                                                        <se:ref se:refid="sm:WSimpleBlock"/> 
    604726                                                                                                                        <se:ref se:refid="sm:WTooltip"/> 
    605                                                                                                                         <se:ref se:name="sm:WVideo" se:refid="sm:WVideoAudio" se:card="?"/> 
     727                                                                                                                        <se:ref se:name="sm:WVideo" se:refid="sm:WAudioVideo" se:card="?"/> 
    606728                                                                                                                </se:choice> 
    607729                                                                                                                <insert se:bind="current"/> 
     
    613735                                                                        </childs> 
    614736                                                                </element> 
    615                                                                 <element se:name="sm:WVideo" se:id="sm:WVideoAudio" se:bind="element" insert="true" tooltipTag="&resources.binary.wVideo;"> 
     737 
     738<!-- ==== sm:WVideo =============== -->                                                          
     739                                                                <element se:name="sm:WVideo" se:id="sm:WAudioVideo" se:bind="element" insert="true" tooltipTag="&resources.binary.wVideo;"> 
    616740                                                                        <atts> 
    617741                                                                                <se:ref se:refid="atts_Class"/> 
     
    676800                                                                        </childs> 
    677801                                                                </element> 
    678                                                                 <element se:name="sm:Widget" se:bind="element" forcefilled="true"> 
     802 
     803<!-- ==== sm:Widget =============== -->                                                          
     804                                                                <element se:name="sm:Widget" se:id="sm:Widget" se:bind="element" forcefilled="true"> 
    679805                                                                        <atts> 
    680806                                                                                <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#UiWidget.*"/> 
     
    709835                                                                                </se:choice> 
    710836                                                                                <insert se:bind="current"/> 
     837                                                                        </childs> 
     838                                                                </element> 
     839                                                                 
     840<!-- ==== sm:WFreeBlock =============== -->                                                              
     841                                                                <element se:id="sm:WFreeBlock" se:name="sm:WFreeBlock" se:bind="element" forcefilled="true"> 
     842                                                                        <childs> 
     843                                                                                <se:choice se:id="choiceFreeBlock" se:card="*" se:show="ifExist" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.w3.org/1999/xhtml"> 
     844                                                                                        <se:ref se:refid="sm:chooseOnBinary"/> 
     845                                                                                        <se:ref se:refid="sm:callBinaryMeta"/> 
     846                                                                                        <se:ref se:refid="sm:callModel"/> 
     847                                                                                        <se:ref se:refid="sm:title"/> 
     848                                                                                        <se:ref se:name="sm:WAudio" se:refid="sm:WAudioVideo" se:card="?"/> 
     849                                                                                        <se:ref se:refid="sm:WCaptionBlock"/> 
     850                                                                                        <se:ref se:refid="sm:WFlash"/> 
     851                                                                                        <se:ref se:refid="sm:WIFrame"/> 
     852                                                                                        <se:ref se:refid="sm:WImage"/> 
     853                                                                                        <se:ref se:refid="sm:WLink"/> 
     854                                                                                        <se:ref se:refid="sm:WObject"/> 
     855                                                                                        <se:ref se:refid="sm:WSimpleBlock"/> 
     856                                                                                        <se:ref se:refid="sm:WTooltip"/> 
     857                                                                                        <se:ref se:name="sm:WVideo" se:refid="sm:WAudioVideo" se:card="?"/> 
     858                                                                                        <se:ref se:refid="sm:Widget"/> 
     859                                                                                        <xul:element se:name="img" se:bind="element" forcefilled="true"> 
     860                                                                                                <xul:atts> 
     861                                                                                                        <xul:ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#Image\b.*"/> 
     862                                                                                                        <xul:attribute se:bind="attribute" se:name="alt"> 
     863                                                                                                                <xul:wordsInput/> 
     864                                                                                                        </xul:attribute> 
     865                                                                                                        <xul:attribute se:bind="attribute" se:name="title"> 
     866                                                                                                                <xul:wordsInput/> 
     867                                                                                                        </xul:attribute> 
     868                                                                                                        <xul:attribute se:bind="attribute" se:name="class"> 
     869                                                                                                                <xul:wordsInput/> 
     870                                                                                                        </xul:attribute> 
     871                                                                                                        <xul:attribute se:bind="attribute" se:show="ifExist"> 
     872                                                                                                                <xul:wordsInput/> 
     873                                                                                                        </xul:attribute> 
     874                                                                                                </xul:atts> 
     875                                                                                        </xul:element> 
     876                                                                                        <xul:genelt forcefilled="true" se:bind="element"> 
     877                                                                                                <xul:atts> 
     878                                                                                                        <xul:attribute se:bind="attribute" se:name="class"> 
     879                                                                                                                <xul:wordsInput/> 
     880                                                                                                        </xul:attribute> 
     881                                                                                                        <xul:attribute se:bind="attribute" se:show="ifExist"> 
     882                                                                                                                <xul:wordsInput/> 
     883                                                                                                        </xul:attribute> 
     884                                                                                                </xul:atts> 
     885                                                                                                <xul:childs> 
     886                                                                                                        <se:ref se:refid="choiceFreeBlock"/> 
     887                                                                                                        <xul:insert se:bind="current"/> 
     888                                                                                                </xul:childs> 
     889                                                                                        </xul:genelt> 
     890                                                                                        <xul:textnode se:bind="text" se:show="ifExist"> 
     891                                                                                                <xul:textpanelInput removable="true" filterspaces="false"/> 
     892                                                                                        </xul:textnode> 
     893                                                                                </se:choice> 
     894                                                                                <insert se:bind="current"/> 
     895                                                                                <se:ref se:refid="sm:defaultStyle"/> 
    711896                                                                        </childs> 
    712897                                                                </element> 
  • trunk/Wsp_Modeling/es/content/xEdition/core.xed.xml

    r9527 r9844  
    180180                                                <fpItem value="wav2mp3"/> 
    181181                                                <fpItem value="zip"/> 
     182                                        </fixedProvider> 
     183                                </attribute> 
     184                                <attribute se:name="options" se:bind="attribute" tooltiptext="Options de la transformation"> 
     185                                        <wordsInput trim="true" frenchPonct="false"></wordsInput> 
     186                                </attribute> 
     187                        </atts> 
     188                </element> 
     189        <!--** 
     190                 *  FreeTransform : saisie d'une transformation avec une liste des code réduite à *2swf 
     191                 *--> 
     192                <element se:name="sm:freeTransform" se:id="sm:swfTransform" se:bind="element" se:card="?" tooltiptext="Transformation libre. (si aucune transformation n'est spécifiée, le fichier binaire original est utilisé tel quel)"> 
     193                        <atts> 
     194                                <attribute se:bind="attribute" se:name="code" se:mandat="true" tooltiptext="Code de la transformation (ex: 'odf2swf')"> 
     195                                        <wordsInput notnull="true" trim="true" filterRegExp="^[a-zA-Z0-9]+$" autocompleteProviderXPath="../xul:fixedProvider"/> 
     196                                        <fixedProvider> 
     197                                                <fpItem value="mml2swf"/> 
     198                                                <fpItem value="odf2swf"/> 
     199                                                <fpItem value="odg2swf"/> 
     200                                                <fpItem value="odgFull2swf"/> 
     201                                                <fpItem value="odpFull2swf"/> 
    182202                                        </fixedProvider> 
    183203                                </attribute> 
  • trunk/Wsp_Modeling/es/content/xEdition/smWLink.xed.xml

    r9709 r9844  
    7373                                                <element se:name="sm:centerScreen" se:bind="element" se:card="1"> 
    7474                                                        <atts> 
    75                                                                 <se:ref se:name="width" se:refid="lnk_attNum" se:mandat="true"/> 
    76                                                                 <se:ref se:name="height" se:refid="lnk_attNum" se:mandat="true"/> 
     75                                                                <se:ref se:name="width" se:refid="lnk_attNum"/> 
     76                                                                <se:ref se:name="height" se:refid="lnk_attNum"/> 
    7777                                                        </atts> 
    7878                                                </element> 
  • 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> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_binaryXhtmlTransf/bs.xml.xsl

    r9828 r9844  
    9898                                        <xsl:param name="vAgent"/> 
    9999                                        <xsl:variable name="vIdNodePrefixMeta" select="getIdNode(.)"/> 
    100                                          
     100                                        <xsl0:apply-templates mode="sizeVars"/> 
    101101                                        <xsl:template match="*"> 
    102102                                                <xsl0:apply-templates mode="content"/> 
     
    108108                <xsl0:apply-templates mode="agents"/> 
    109109        </xsl0:template> 
     110 
    110111                 
    111112        <!-- Root avec sm:binaryUrl --> 
     
    126127        <xsl0:template match="*"/> 
    127128 
    128         <!-- ##### mode binaryUrlNav : retourne des urls ou des valeurs de paramètres. ##### --> 
     129        <!-- ##### mode sizeVars : Pose deux variables (vInfosRes & vSize) par sm:size (mutualisation des calculs de size) ##### --> 
     130        <xsl0:template match="sm:WFlash[sm:size]|sm:WImage[sm:size]" mode="sizeVars"> 
     131                <xsl0:choose> 
     132                        <xsl0:when test="local-name(.) = 'WImage'"> 
     133                                <xsl:variable name="vResInfo_{generate-id(.)}" select="parseXml(resultatAgent('//', concat('get:dest:', resultatAgent('//genResUri_{generate-id(sm:binaryUrl)}'), '?transform=img2props&amp;unit=px')))"/> 
     134                                <xsl:variable name="vResWebSize_{generate-id(.)}" select="java:com.scenari.s.co.transform.img.ImgUtil.getSize($vResInfo_{generate-id(.)}/props/p[@cd='width'], $vResInfo_{generate-id(.)}/props/p[@cd='height'], '{sm:size/@scale}', '{sm:size/@minWidth}', '{sm:size/@minHeight}', '{sm:size/@maxWidth}', '{sm:size/@maxHeight}')"/> 
     135                        </xsl0:when> 
     136                        <xsl0:when test="local-name(.) = 'WFlash'"> 
     137                                <xsl:variable name="vResInfo_{generate-id(.)}" select="parseXml(resultatAgent('//', concat('get:dest:', resultatAgent('//genResUri_{generate-id(sm:binaryUrl)}'), '?transform=swf2props')))"/> 
     138                                <xsl:variable name="vResWebSize_{generate-id(.)}" select="java:com.scenari.s.co.transform.img.ImgUtil.getSize(($vResInfo_{generate-id(.)}/swfHeader/@x2 - $vResInfo_{generate-id(.)}/swfHeader/@x1) div 20, ($vResInfo_{generate-id(.)}/swfHeader/@y2 - $vResInfo_{generate-id(.)}/swfHeader/@y1) div 20, '{sm:size/@scale}', '{sm:size/@minWidth}', '{sm:size/@minHeight}', '{sm:size/@maxWidth}', '{sm:size/@maxHeight}')"/> 
     139                        </xsl0:when> 
     140                </xsl0:choose> 
     141        </xsl0:template> 
     142        <xsl0:template match="text()|@*" mode="sizeVars"/> 
     143         
     144        <!-- ##### mode binaryUrlNav : retourne des urls ou des valeurs de paramètres. ##### --> 
    129145        <xsl0:template match="sm:binaryUrl" mode="binaryUrlNav">[![agent=//url_<xsl0:value-of select="generate-id(.)"/>]!]</xsl0:template> 
    130146        <xsl0:template match="node()" mode="binaryUrlNav"/> 
     
    143159        <xsl0:template match="sm:binaryUrl" mode="pathNavXsl"><xsl:value-of select="resultatAgent('//url_{generate-id(.)}')"/></xsl0:template> 
    144160        <xsl0:template match="sm:fixedValue" mode="pathNavXsl"><xsl0:value-of select="@value"/></xsl0:template> 
    145         <xsl0:template match="sm:WObject|sm:WVideo|sm:WAudio" mode="pathNavXsl"><xsl:value-of select="resultatAgent('//page_{generate-id(.)}','act:')"/></xsl0:template> 
     161        <xsl0:template match="sm:WFlash|sm:WObject|sm:WVideo|sm:WAudio" mode="pathNavXsl"><xsl:value-of select="resultatAgent('//page_{generate-id(.)}','act:')"/></xsl0:template> 
    146162        <xsl0:template match="sm:callBinaryMeta" mode="pathNavXsl"><xsl:value-of select="resultatAgent('//callMeta_{generate-id(.)}')"/></xsl0:template> 
    147163        <xsl0:template match="sm:callModel" mode="pathNavXsl"><xsl:value-of select="resultatAgent('//callModel_{generate-id(.)}')"/></xsl0:template> 
     
    159175                                        <xsl0:choose> 
    160176                                                <xsl0:when test="sm:freeTransform | sm:imageTransform"> 
    161                                                         <source type="xpath-dynamique">resultatAgent('//', concat( 'res:src=src:', java:hGetUri(srcFileAgent())<xsl0:call-template name="optsTransform"/>))</source> 
     177                                                        <source type="xpath-dynamique">resultatAgent('//', concat( 'res:src=src:', java:hGetUri(srcFileAgent()), '<xsl0:call-template name="optsTransform"/>'))</source> 
    162178                                                </xsl0:when> 
    163179                                                <xsl0:otherwise> 
     
    179195                                </xsl0:when> 
    180196                                <xsl0:when test="../self::sm:WVideo/sm:pluginType[@value='flashPlayer']"> 
    181                                         <source type="xpath-dynamique">java:com.scenari.m.ge.generateur.GeneratorBase.buildRelativeUrl(resultatAgent('//flashPlayerVideo'), resultatAgent('//', concat( 'res:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent())<xsl0:call-template name="optsTransform"/>)))</source> 
     197                                        <source type="xpath-dynamique">java:com.scenari.m.ge.generateur.GeneratorBase.buildRelativeUrl(resultatAgent('//flashPlayerVideo'), resultatAgent('//', concat( 'res:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), '<xsl0:call-template name="optsTransform"/>')))</source> 
    182198                                </xsl0:when> 
    183199                                <xsl0:otherwise> 
    184                                         <source type="xpath-dynamique">resultatAgent('//', concat( 'res:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent())<xsl0:call-template name="optsTransform"/>))</source> 
     200                                        <source type="xpath-dynamique">resultatAgent('//', concat( 'res:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), '<xsl0:call-template name="optsTransform"/>'))</source> 
    185201                                </xsl0:otherwise> 
    186202                        </xsl0:choose> 
    187203                </valeur> 
    188204                <valeur code="genResUri_{generate-id(.)}"> 
    189                         <source type="xpath-dynamique">resultatAgent('//', concat( 'resUri:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent())<xsl0:call-template name="optsTransform"/>))</source> 
     205                        <source type="xpath-dynamique">resultatAgent('//', concat( 'resUri:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), '<xsl0:call-template name="optsTransform"/>'))</source> 
     206                </valeur> 
     207        </xsl0:template> 
     208        <xsl0:template match="sm:binary" mode="agents"> 
     209                <valeur code="getResUri_{generate-id(.)}"> 
     210                        <source type="xpath-dynamique">concat( 'get:src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), '<xsl0:call-template name="optsTransform"><xsl0:with-param name="pPrefix" select="'?'"/></xsl0:call-template>')</source> 
     211                </valeur> 
     212                <valeur code="resUriHasTransf_{generate-id(.)}"> 
     213                        <source> 
     214                                <xsl0:choose> 
     215                                        <xsl0:when test="sm:freeTransform/@code">&amp;</xsl0:when> 
     216                                        <xsl0:when test="sm:imageTransform/@outputType or sm:imageTransform/@scale or sm:imageTransform/@minWidth or sm:imageTransform/@maxWidth or sm:imageTransform/@minHeight or sm:imageTransform/@maxHeight">&amp;</xsl0:when> 
     217                                        <xsl0:otherwise>?</xsl0:otherwise> 
     218                                </xsl0:choose> 
     219                        </source> 
    190220                </valeur> 
    191221        </xsl0:template> 
    192222        <xsl0:template name="optsTransform"> 
     223                <xsl0:param name="pPrefix" select="';'"/> 
    193224                <xsl0:choose> 
    194225                        <xsl0:when test="sm:freeTransform"> 
    195                                 <xsl0:if test="sm:freeTransform/@code">, ';transform=<xsl0:value-of select="sm:freeTransform/@code"/><xsl0:if test="sm:freeTransform/@options">&amp;<xsl0:value-of select="sm:freeTransform/@options"/></xsl0:if>'</xsl0:if> 
     226                                <xsl0:if test="sm:freeTransform/@code"><xsl0:value-of select="$pPrefix"/>transform=<xsl0:value-of select="sm:freeTransform/@code"/><xsl0:if test="sm:freeTransform/@options">&amp;<xsl0:value-of select="sm:freeTransform/@options"/></xsl0:if></xsl0:if> 
    196227                        </xsl0:when> 
    197228                        <xsl0:when test="sm:imageTransform"> 
    198                                 <xsl0:if test="sm:imageTransform/@outputType or sm:imageTransform/@scale or sm:imageTransform/@minWidth or sm:imageTransform/@maxWidth or sm:imageTransform/@minHeight or sm:imageTransform/@maxHeight"><xsl0:text>, ';transform=image</xsl0:text> 
     229                                <xsl0:if test="sm:imageTransform/@outputType or sm:imageTransform/@scale or sm:imageTransform/@minWidth or sm:imageTransform/@maxWidth or sm:imageTransform/@minHeight or sm:imageTransform/@maxHeight"><xsl0:value-of select="$pPrefix"/><xsl0:text>transform=image</xsl0:text> 
    199230                                        <xsl0:if test="sm:imageTransform/@scale">&amp;scale=<xsl0:value-of select="sm:imageTransform/@scale"/></xsl0:if> 
    200231                                        <xsl0:if test="sm:imageTransform/@minWidth">&amp;minWidth=<xsl0:value-of select="sm:imageTransform/@minWidth"/></xsl0:if> 
     
    202233                                        <xsl0:if test="sm:imageTransform/@minHeight">&amp;minHeight=<xsl0:value-of select="sm:imageTransform/@minHeight"/></xsl0:if> 
    203234                                        <xsl0:if test="sm:imageTransform/@maxHeight">&amp;maxHeight=<xsl0:value-of select="sm:imageTransform/@maxHeight"/></xsl0:if> 
    204                                         <xsl0:text>&amp;type=</xsl0:text><xsl0:value-of select="si(sm:imageTransform/@outputType, sm:imageTransform/@outputType, 'PNG')"/><xsl0:text>'</xsl0:text> 
     235                                        <xsl0:text>&amp;type=</xsl0:text><xsl0:value-of select="si(sm:imageTransform/@outputType, sm:imageTransform/@outputType, 'PNG')"/><xsl0:text></xsl0:text> 
    205236                                </xsl0:if> 
    206237                        </xsl0:when> 
     
    213244                <xsl0:apply-templates mode="agents"/> 
    214245        </xsl0:template> 
    215         <xsl0:template match="sm:link/sm:WObject|sm:link/sm:WVideo|sm:link/sm:WAudio|sm:WIFrame/sm:WObject|sm:WIFrame/sm:WVideo|sm:WIFrame/sm:WAudio" mode="agents"> 
     246        <xsl0:template match="sm:link/sm:WImage|sm:link/sm:WFlash|sm:link/sm:WObject|sm:link/sm:WVideo|sm:link/sm:WAudio|sm:WIFrame/sm:WImage|sm:WIFrame/sm:WFlash|sm:WIFrame/sm:WObject|sm:WIFrame/sm:WVideo|sm:WIFrame/sm:WAudio" mode="agents"> 
    216247                <affichage code="page_{generate-id(.)}"> 
    217248                        <urlPage type="xpath-dynamique">concat(java:hGetName(srcFileAgent()), '.html')</urlPage> 
     
    229260                                                <xsl:param name="vDialog"/> 
    230261                                                <xsl:param name="vAgent"/> 
     262                                                <xsl0:apply-templates mode="sizeVars" select="."/> 
    231263                                                <xsl:template match="*"> 
    232264                                                        <html style="margin:0px;padding:0px;height:100%;"> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_binaryXhtmlTransf/styles/buildStyle.xsl

    r7173 r9844  
    143143        </xsl:template> 
    144144         
     145        <!-- sm:WFlash ===================================================================== --> 
     146        <xsl:template match="sm:WFlash"> 
     147                <xsl:call-template name="setBlockDefault"> 
     148                        <xsl:with-param name="vSuffixBlock" select="'f'"/> 
     149                </xsl:call-template> 
     150        </xsl:template> 
     151         
    145152        <!-- sm:WCaptionBlock ===================================================================== --> 
    146153        <xsl:template match="sm:WCaptionBlock"> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_binaryXhtmlTransf/styles/buildStylePreview.xsl

    r7173 r9844  
    209209        </xsl:template> 
    210210         
     211        <!-- sm:Flash ===================================================================== --> 
     212        <xsl:template match="sm:Flash"> 
     213                <xsl:if test="@internalClass"> 
     214                        <xsl:variable name="vIdBlock" select="concat($vPrefixClass, '_', @internalClass, '_f_preview')"/> 
     215                        <xsl:if test="setEntryBuffer('checkBlock', $vIdBlock)"> 
     216                                <div class="uistyleBlock" id="{$vIdBlock}"> 
     217                                        <div>Le style de l'objet flash est d�ni par: .<xsl:value-of select="$vPrefixClass"/>_<xsl:value-of select="@internalClass"/></div> 
     218                                        <div class="{$vPrefixClass}_{@internalClass}">Exemple d'objet flash</div> 
     219                                </div> 
     220                        </xsl:if> 
     221                </xsl:if> 
     222                <xsl:if test="@commonClass and setEntryBuffer('checkBlock', concat(@commonClass, '_preview'))"> 
     223                        <div class="uistyleBlockCommon" id="{@commonClass}"> 
     224                                <div>Style de la classe commune de l'objet flash est d�ni par: .<xsl:value-of select="@commonClass"/></div> 
     225                                <div class="{@commonClass}">Exemple d'objet flash</div> 
     226                        </div> 
     227                </xsl:if> 
     228                <xsl:apply-templates/> 
     229        </xsl:template> 
     230 
    211231        <!-- sm:WObject|sm:WVideo|sm:WAudio ===================================================================== --> 
    212232        <xsl:template match="sm:WObject|sm:WVideo|sm:WAudio"> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_binaryXhtmlTransf/widgets.xsl.xsl

    r9762 r9844  
    4747        xmlns:java="http://xml.apache.org/xslt/java"  
    4848        xmlns:xalan="http://xml.apache.org/xalan" 
    49         exclude-result-prefixes="sm sc sp xsl java xalan"> 
     49        xmlns:xhtml="http://www.w3.org/1999/xhtml" 
     50        exclude-result-prefixes="sm sc sp xsl java xalan xhtml"> 
    5051         
    5152        <xsl0:import href="bsco:sm/web/sm_WLink.xml.xsl"/> 
     
    7172        <xsl0:template name="sizeAtts"> 
    7273                <xsl0:choose> 
    73                         <xsl0:when test="boolean(*/sm:fromPublishedImage)"> 
    74                                 <xsl:variable name="vInfosRes" select="parseXml(resultatAgent('//', concat('get:dest:', resultatAgent('//genResUri_{generate-id(sm:binaryUrl)}'), '?transform=img2props&amp;unit=px')))"/> 
    75                         </xsl0:when> 
    76                         <xsl0:when test="boolean(*/sm:fromPublishedObject/@type='flash')"> 
    77                                 <xsl:variable name="vInfosRes" select="parseXml(resultatAgent('//', concat('get:dest:', resultatAgent('//genResUri_{generate-id(sm:binaryUrl)}'), '?transform=swf2props')))"/> 
    78                         </xsl0:when> 
    79                 </xsl0:choose> 
    80                 <xsl0:call-template name="sizeAttWidth"/> 
    81                 <xsl0:call-template name="sizeAttHeight"/> 
     74                        <xsl0:when test="boolean(sm:size)"> 
     75                                <xsl:attribute name="width"><xsl:value-of select="java:getWidth($vResWebSize_{generate-id(.)})"/></xsl:attribute> 
     76                                <xsl:attribute name="height"><xsl:value-of select="java:getHeight($vResWebSize_{generate-id(.)})"/></xsl:attribute> 
     77                        </xsl0:when> 
     78                        <xsl0:otherwise> 
     79                                <xsl0:call-template name="sizeAttWidth"/> 
     80                                <xsl0:call-template name="sizeAttHeight"/> 
     81                        </xsl0:otherwise> 
     82                </xsl0:choose>   
    8283        </xsl0:template> 
    8384        <xsl0:template name="sizeAttWidth"> 
     
    9495                <xsl0:choose> 
    9596                        <xsl0:when test="boolean(sm:width/sm:fixedValue)"><xsl0:value-of select="sm:width/sm:fixedValue/@value"/></xsl0:when> 
    96                         <xsl0:when test="boolean(sm:width/sm:fromPublishedImage)"><xsl:value-of select="$vInfosRes/props/p[@cd='width']"/></xsl0:when> 
    97                         <xsl0:when test="boolean(sm:width/sm:fromPublishedObject/@type='flash')"><xsl:value-of select="($vInfosRes/swfHeader/@x2 - $vInfosRes/swfHeader/@x1) div 20"/></xsl0:when> 
    9897                </xsl0:choose> 
    9998        </xsl0:template> 
     
    101100                <xsl0:choose> 
    102101                        <xsl0:when test="boolean(sm:height/sm:fixedValue)"><xsl0:value-of select="sm:height/sm:fixedValue/@value"/></xsl0:when> 
    103                         <xsl0:when test="boolean(sm:height/sm:fromPublishedImage)"><xsl:value-of select="$vInfosRes/props/p[@cd='height']"/></xsl0:when> 
    104                         <xsl0:when test="boolean(sm:height/sm:fromPublishedObject/@type='flash')"><xsl:value-of select="($vInfosRes/swfHeader/@y2 - $vInfosRes/swfHeader/@y1) div 20"/></xsl0:when> 
    105102                </xsl0:choose> 
    106103        </xsl0:template> 
     
    131128        </xsl0:template> 
    132129 --> 
     130 
     131        <!-- chooseOnBinary --> 
     132        <xsl0:template match="sm:chooseOnBinary" mode="content"> 
     133                <xsl:variable name="vResType_{generate-id(sm:binary)}" select="'{si(sm:binary/@outputType, sm:binary/@outputType, 'unknown')}'"/> 
     134                <xsl:variable name="vResInfo_{generate-id(sm:binary)}" select="si($vResType_{generate-id(sm:binary)} = 'image' or $vResType_{generate-id(sm:binary)} = 'flash', parseXml(resultatAgent('//', concat(resultatAgent('//getResUri_{generate-id(sm:binary)}'), resultatAgent('//resUriHasTransf_{generate-id(sm:binary)}'), si($vResType_{generate-id(sm:binary)} = 'image', 'transform=img2props&amp;unit=px', 'transform=swf2props')))))"/> 
     135                <xsl0:if test="sm:when[@widthOver]"> 
     136                        <xsl:variable name="vResInfoWidth_{generate-id(sm:binary)}" select="si($vResType_{generate-id(sm:binary)} = 'image', $vResInfo_{generate-id(sm:binary)}/props/p[@cd='width'], si($vResType_{generate-id(sm:binary)} = 'flash', ($vResInfo_{generate-id(sm:binary)}/swfHeader/@x2 - $vResInfo_{generate-id(sm:binary)}/swfHeader/@x1) div 20, '0'))"/> 
     137                </xsl0:if> 
     138                <xsl0:if test="sm:when[@heightOver]"> 
     139                        <xsl:variable name="vResInfoHeight_{generate-id(sm:binary)}" select="si($vResType_{generate-id(sm:binary)} = 'image', $vResInfo_{generate-id(sm:binary)}/props/p[@cd='height'], si($vResType_{generate-id(sm:binary)} = 'flash', ($vResInfo_{generate-id(sm:binary)}/swfHeader/@y2 - $vResInfo_{generate-id(sm:binary)}/swfHeader/@y1) div 20, '0'))"/> 
     140                </xsl0:if> 
     141                <xsl:choose> 
     142                        <xsl0:apply-templates mode="content"/> 
     143                </xsl:choose> 
     144        </xsl0:template> 
     145        <xsl0:template match="sm:when" mode="content"> 
     146                <xsl:when test="{concat(si(@widthOver, concat('$vResInfoWidth_', generate-id(../sm:binary), '&gt;', @widthOver, ' or ')), si(@heightOver, concat('$vResInfoHeight_', generate-id(../sm:binary), '&gt;', @heightOver, ' or ')), 'false()')}"> 
     147                        <xsl0:apply-templates mode="content"/> 
     148                </xsl:when> 
     149        </xsl0:template> 
     150        <xsl0:template match="sm:otherwise" mode="content"> 
     151                <xsl:otherwise> 
     152                        <xsl0:apply-templates mode="content"/> 
     153                </xsl:otherwise> 
     154        </xsl0:template> 
    133155 
    134156        <!-- WObject --> 
     
    141163                        <xsl0:apply-templates select="sm:param[count(@type)=0 or @type!='url']" mode="content"/> 
    142164                        <embed pluginspage="{sm:pluginspage/@value}" src="{{resultatAgent('//url_{generate-id(sm:binaryUrl)}')}}{$vUrlParams}"> 
     165                                <xsl0:call-template name="classAtt"/> 
     166                                <xsl0:apply-templates select="sm:param[count(@type)=0 or @type!='url']" mode="contentEmbedAtts"/> 
     167                                <xsl0:call-template name="sizeAtts"/> 
     168                        </embed> 
     169                </object> 
     170        </xsl0:template> 
     171 
     172        <!-- WFlash --> 
     173        <xsl0:template match="sm:WFlash" mode="content"> 
     174                <xsl0:variable name="vUrlParams"><xsl0:apply-templates select="sm:param[@type='url']" mode="urlInlineParams"/></xsl0:variable> 
     175                <object codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> 
     176                        <xsl0:call-template name="classAtt"/> 
     177                        <xsl0:call-template name="sizeAtts"/> 
     178                        <param name="src" value="{{resultatAgent('//url_{generate-id(sm:binaryUrl)}')}}{$vUrlParams}"/> 
     179                        <xsl0:apply-templates select="sm:param[count(@type)=0 or @type!='url']" mode="content"/> 
     180                        <embed pluginspage="http://www.macromedia.com/go/getflash/" type="application/x-shockwave-flash" src="{{resultatAgent('//url_{generate-id(sm:binaryUrl)}')}}{$vUrlParams}"> 
    143181                                <xsl0:call-template name="classAtt"/> 
    144182                                <xsl0:apply-templates select="sm:param[count(@type)=0 or @type!='url']" mode="contentEmbedAtts"/> 
     
    516554        </xsl0:template> 
    517555 
    518         <!-- Common WObject,WVideo,WAudio templates --> 
     556        <!-- Common WFlash,WObject,WVideo,WAudio templates --> 
    519557        <xsl0:template match="sm:param" mode="content"> 
    520558                <param name="{@name}"> 
     
    572610        <xsl0:template match="sm:WLink" mode="content"> 
    573611                <xsl0:variable name="vOptions"> 
    574                         <xsl0:call-template name="linkOptions"/><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
     612                        <xsl0:call-template name="linkOptionsXsl"><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
     613                                <xsl0:with-param name="pWidthDefault"> 
     614                                        <xsl0:choose> 
     615                                                <xsl0:when test="sm:link/sm:WImage[sm:size]"> 
     616                                                        <xsl:value-of select="round(java:getWidth($vResWebSize_{generate-id(sm:link/sm:WImage)}))"/> 
     617                                                </xsl0:when> 
     618                                                <xsl0:when test="sm:link/sm:WFlash[sm:size]"> 
     619                                                        <xsl:value-of select="round(java:getWidth($vResWebSize_{generate-id(sm:link/sm:WFlash)}))"/> 
     620                                                </xsl0:when> 
     621                                        </xsl0:choose> 
     622                                </xsl0:with-param> 
     623                                <xsl0:with-param name="pHeightDefault"> 
     624                                        <xsl0:choose> 
     625                                                <xsl0:when test="sm:link/sm:WImage[sm:size]"> 
     626                                                        <xsl:value-of select="round(java:getHeight($vResWebSize_{generate-id(sm:link/sm:WImage)}))"/> 
     627                                                </xsl0:when> 
     628                                                <xsl0:when test="sm:link/sm:WFlash[sm:size]"> 
     629                                                        <xsl:value-of select="round(java:getHeight($vResWebSize_{generate-id(sm:link/sm:WFlash)}))"/> 
     630                                                </xsl0:when> 
     631                                        </xsl0:choose> 
     632                                </xsl0:with-param> 
     633                        </xsl0:call-template> 
    575634                </xsl0:variable> 
    576635                <a> 
     
    578637                        <xsl0:call-template name="linkHrefXsl"><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
    579638                                <xsl0:with-param name="pUrl"><xsl0:apply-templates select="sm:link/*" mode="pathNavXsl"/></xsl0:with-param> 
    580                                 <xsl0:with-param name="pOptions"><xsl0:value-of select="$vOptions"/></xsl0:with-param> 
     639                                <xsl0:with-param name="pOptions" select="$vOptions"/> 
    581640                                <xsl0:with-param name="pExtraOptions"><xsl0:if test="sm:link/@target='subWindow'">SUBWINTI:'<xsl:value-of select="chaineProtegeJs(si(resultatAgent('//fullTitleText')!='', resultatAgent('//fullTitleText'), java:hGetName(srcFileAgent()) ))"/>',</xsl0:if></xsl0:with-param> 
    582641                        </xsl0:call-template> 
     
    675734        </xsl0:template> 
    676735 
     736        <!-- sm:WFreeBlock --> 
     737        <xsl0:template match="sm:WFreeBlock" mode="content"> 
     738                <xsl0:apply-templates mode="content"/> 
     739        </xsl0:template> 
     740        <xsl0:template match="sm:WFreeBlock/sm:title" mode="content"> 
     741                <xsl0:apply-templates select="." mode="contentTitleIn"/> 
     742        </xsl0:template> 
     743        <xsl0:template match="xhtml:*/sm:title" mode="content"> 
     744                <xsl0:apply-templates select="." mode="contentTitleIn"/> 
     745        </xsl0:template> 
     746        <xsl0:template match="xhtml:*" mode="content"> 
     747                <xsl0:element name="{local-name()}"> 
     748                        <xsl0:apply-templates select="@*" mode="freeAtts"/> 
     749                        <xsl0:apply-templates select="node()" mode="content"/> 
     750                </xsl0:element > 
     751        </xsl0:template> 
     752        <xsl0:template match="xhtml:img" mode="content"> 
     753                <img src="[![agent=//;arguments=pubres:{resultatAgent('//', concat('res:src=wsp:', @sc:refUri, ';mutabledst=', resultatAgent('//agentGenerator', 'destPathLibInSiteFolder'), '/', extractFileNameFromPath(@sc:refUri) ))}]!]" alt="{@alt}"> 
     754                        <xsl0:apply-templates select="@*" mode="freeAtts"/> 
     755                </img> 
     756        </xsl0:template> 
     757        <xsl0:template match="sm:WFreeBlock//text()" mode="content"> 
     758                <xsl0:if test="string-length(normalize-space(.)) &gt; 0"><xsl0:value-of select="."/></xsl0:if> 
     759        </xsl0:template> 
     760        <xsl0:template match="@*" mode="freeAtts"> 
     761                <xsl0:copy/> 
     762        </xsl0:template> 
     763        <xsl0:template match="@sc:*" mode="freeAtts"/> 
     764 
    677765        <!-- sm:Widget --> 
    678766        <xsl0:template match="sm:Widget" mode="content"><xsl:value-of select="resultatAgent(concat('widget_{generate-id(.)}_',generate-id()))" disable-output-escaping="yes"/></xsl0:template>