Ignore:
Timestamp:
06/04/08 23:20:55 (4 years ago)
Author:
sam
Message:

modif preview flv ds block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_videoPrim/players/preview.flv.xsl

    r11129 r11142  
    6464                                        var vFlvUrl = vUriObjectMainStream.getUrlToLoadContent(); 
    6565                                        var vOpts = ""; 
    66                                          
    67                                         <xsl:variable name="vOptions" select="sm:flvViewer/sm:options/@list"/> 
     66                                        <xsl:variable name="vOptions" select="sm:options/@list"/> 
    6867                                        <xsl:choose> 
    6968                                                <xsl:when test="$vOptions"> 
     
    9392                                         
    9493                                        var vSwf = "<xsl:value-of select="resultatAgent('//', 'res:src=bs:players/playerFlv.swf;overidedst=content/_common/playerFlv.swf')"/>"; 
    95                                         <xsl:variable name="vOptionsMap" select="si($vOptions, java:com.scenari.s.fw.utils.HParamsQueryString.hParseQueryStringAsMap(string(sm:flvViewer/sm:options/@list)))"/> 
     94                                        <xsl:variable name="vOptionsMap" select="si($vOptions, java:com.scenari.s.fw.utils.HParamsQueryString.hParseQueryStringAsMap(string(sm:options/@list)))"/> 
    9695                                        <xsl:choose> 
    9796                                                <xsl:when test="$vOptions and java:containsKey($vOptionsMap, 'height')"> 
    9897                                        var vHeight = <xsl:value-of select="java:get($vOptionsMap, 'height')"/>; 
     98                                                <xsl:if test="not(parent::sm:previewBlock)"> 
    9999                                        window.frameElement.setAttribute("height", vHeight); 
     100                                                </xsl:if> 
     101                                                </xsl:when> 
     102                                                <xsl:when test="parent::sm:previewBlock"> 
     103                                        var vHeight = 320; 
    100104                                                </xsl:when> 
    101105                                                <xsl:otherwise> 
     
    106110                                                <xsl:when test="$vOptions and java:containsKey($vOptionsMap, 'width')"> 
    107111                                        var vWidth = <xsl:value-of select="java:get($vOptionsMap, 'width')"/>; 
     112                                                <xsl:if test="not(parent::sm:previewBlock)"> 
    108113                                        window.frameElement.setAttribute("width", vWidth); 
     114                                                </xsl:if> 
     115                                                </xsl:when> 
     116                                                <xsl:when test="parent::sm:previewBlock"> 
     117                                        var vWidth = 400; 
    109118                                                </xsl:when> 
    110119                                                <xsl:otherwise> 
     
    123132                                        vParam.setAttribute("value", 'flv=' + vFlvUrl); 
    124133                                        _Object.appendChild(vParam); 
    125                                         document.documentElement.appendChild(_Object); 
     134                                        <xsl:choose> 
     135                                                <xsl:when test="parent::sm:previewBlock"> 
     136                                                        document.getElementById("content").appendChild(_Object); 
     137                                                </xsl:when> 
     138                                                <xsl:otherwise> 
     139                                                        document.documentElement.appendChild(_Object); 
     140                                                </xsl:otherwise> 
     141                                        </xsl:choose> 
    126142                                         
    127143                                } catch(e){ut.debug(e);} 
Note: See TracChangeset for help on using the changeset viewer.