123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2017
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rsext="xalan://com.cognos.reportserver.ext.RSExt" version="1.0" exclude-result-prefixes="xsl rsext">
- <xsl:param name="CVDisableDrill" select="''"/>
- <xsl:include href="V5environment.xsl"/>
- <xsl:include href="V5ReportEngine.xsl"/>
- <!-- Include needed for prompting -->
- <xsl:include href="../../ps/prompting/p_include_V5ParamSafe.xsl"/>
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="promptLocale" select="$contentLocale"/>
- <xsl:variable name="promptFormName" select="'formWarpRequest'"/>
- <xsl:template match="/Document">
- <!-- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved. -->
- <!-- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated). -->
- <xsl:call-template name="chartConfig"/>
- <!-- Add prompt control javascript and style sheets -->
- <xsl:call-template name="getPromptHeadIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- <xsl:apply-templates select="/Document/styleOptions"/>
- <xsl:call-template name="drillTargetsSetup"/>
- <xsl:call-template name="addSelectionController"/>
- <xsl:apply-templates select="META-DATA"/>
- <xsl:apply-templates select="CONTEXT-DATA"/>
- <xsl:apply-templates select="DATA"/>
- <xsl:call-template name="dropIndicators"/>
- <!--
- <textarea><htmlFragment><xsl:copy-of select="/"/></htmlFragment></textarea>
- -->
- </xsl:template>
- <xsl:template match="META-DATA">
- <xsl:text disable-output-escaping="yes">
- <script type="text/javascript">
- </xsl:text>
- <xsl:for-each select="Block">
- <xsl:text>oCVSC</xsl:text>
- <xsl:value-of select="$CognosViewerID"/>
- <xsl:text>.addMetaData(</xsl:text>
- <xsl:value-of select="." disable-output-escaping="yes"/>
- <xsl:text>);</xsl:text>
- </xsl:for-each>
- <xsl:text>oCVSC</xsl:text>
- <xsl:value-of select="$CognosViewerID"/>
- <xsl:text>.setupMetaDataArray(</xsl:text>
- <xsl:text>{</xsl:text>
- <xsl:for-each select="DA">
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@uid))" disable-output-escaping="yes"/>":[<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@value))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@vtype))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@dtype))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@drill))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@hun))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@level))" disable-output-escaping="yes"/>"]<xsl:text/>
- <xsl:if test="position()!=last()">
- <xsl:text>,</xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>});</xsl:text>
- <xsl:text disable-output-escaping="yes">
- </script>
- </xsl:text>
- </xsl:template>
- <xsl:template match="CONTEXT-DATA">
- <xsl:text disable-output-escaping="yes">
- <script type="text/javascript">
- </xsl:text>
- <xsl:for-each select="Block">
- <xsl:text>oCVSC</xsl:text>
- <xsl:value-of select="$CognosViewerID"/>
- <xsl:text>.addContextData(</xsl:text>
- <xsl:value-of select="." disable-output-escaping="yes"/>
- <xsl:text>);</xsl:text>
- </xsl:for-each>
- <xsl:text>oCVSC</xsl:text>
- <xsl:value-of select="$CognosViewerID"/>
- <xsl:text>.setupContextDataArray(</xsl:text>
- <xsl:text>{</xsl:text>
- <xsl:for-each select="CD">
- <xsl:value-of select="rsext:javascriptencode(string(@ctxId))"/>
- <xsl:text>:[</xsl:text>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@rdi))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@useValue))" disable-output-escaping="yes"/>", <xsl:text/>
- <xsl:choose>
- <xsl:when test="@mun">
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@mun))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@lun))" disable-output-escaping="yes"/>",<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>"","<xsl:value-of select="rsext:javascriptencode(string(@qmid))" disable-output-escaping="yes"/>",<xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@qry))" disable-output-escaping="yes"/>",<xsl:text/>
- <xsl:text/>"<xsl:value-of select="rsext:javascriptencode(string(@dun))" disable-output-escaping="yes"/>"]<xsl:text/>
- <xsl:if test="position()!=last()">
- <xsl:text>,</xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>});</xsl:text>
- <xsl:text disable-output-escaping="yes">
- </script>
- </xsl:text>
- </xsl:template>
- <xsl:template name="addDrillEvent">
- <xsl:param name="app"/>
- <xsl:choose>
- <xsl:when test="name(parent::node())='drillTargets'">
- <xsl:call-template name="addDrillHandler">
- <xsl:with-param name="app"><xsl:value-of select="$app"/></xsl:with-param>
- </xsl:call-template>
- <xsl:if test="parent::node()/../@isolated='true' or parent::node()/@isolated='true'">
- <xsl:attribute name="isolated">true</xsl:attribute>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="parent::node()/@drillUp = 'true' or parent::node()/@drillDown = 'true' or ./@drillDown='true' or ./@drillUp='true' or parent::node()/../@drillUp = 'true' or parent::node()/../@drillDown = 'true'">
- <xsl:variable name="isIsolated">
- <xsl:choose>
- <xsl:when test="parent::node()/@isolated='true' or ./@isolated='true'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="(parent::node()/@drillDown = 'true' or ./@drillDown='true' or parent::node()/../@drillDown = 'true') and $isIsolated='false'">
- <xsl:call-template name="addDrillHandler">
- <xsl:with-param name="app"><xsl:value-of select="$app"/></xsl:with-param>
- </xsl:call-template>
- <xsl:attribute name="style">text-decoration: underline; cursor: pointer;</xsl:attribute>
- </xsl:if>
- <xsl:if test="$isIsolated='true'">
- <xsl:attribute name="isolated">true</xsl:attribute>
- </xsl:if>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="drillTargetsSetup"/>
- <!--
- template : GenEventHandlers
- This template adds event handlers to the table cells you can select.
- -->
- <xsl:template name="GenEventHandlers">
- <xsl:if test="@layoutClass='listColumnBody' or @layoutClass='listColumnTitle' or @layoutClass='rowCell' or @layoutClass='crosstabFactCell' or @layoutClass='crosstabNodeMember' or @layoutClass='crosstabCorner' or name()='OCHART'">
- <xsl:if test="@tag != ''">
- <xsl:attribute name="tag"><xsl:value-of select="@tag"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@cid != ''">
- <xsl:attribute name="cid"><xsl:value-of select="@cid"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@uid != ''">
- <xsl:attribute name="uid"><xsl:value-of select="@uid"/></xsl:attribute>
- <xsl:attribute name="name">c<xsl:value-of select="$CognosViewerID"/><xsl:value-of select="@uid"/></xsl:attribute>
- <xsl:if test="$isIE">
- <xsl:attribute name="id">c<xsl:value-of select="$CognosViewerID"/><xsl:value-of select="@uid"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$isIE">
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="oncontextmenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.pageContextClicked(event); return false;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="oncontextmenu">CF_pageContextClicked(event); return false;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onContextMenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.pageContextClicked(event); event.preventDefault();</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onContextMenu">CF_pageContextClicked(event);event.preventDefault();</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:if test="@class">
- <xsl:attribute name="class"><xsl:text>cutQS</xsl:text><xsl:value-of select="@cid"/><xsl:text> </xsl:text><xsl:text>c</xsl:text><xsl:value-of select="$CognosViewerID"/><xsl:value-of select="@uid"/><xsl:text> </xsl:text><xsl:value-of select="@class" disable-output-escaping="yes"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="name() = 'OCHART'">
- <xsl:attribute name="rsvpChart">true</xsl:attribute>
- <xsl:if test="$isIE">
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onContextMenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.chartContextMenu(event);event.cancelBubble = true; event.returnValue = false;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onContextMenu">CF_chartContextMenu(event);event.cancelBubble = true; event.returnValue = false;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:if>
- <xsl:if test="@type != ''">
- <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@ctx != ''">
- <xsl:attribute name="ctx"><xsl:value-of select="@ctx"/></xsl:attribute>
- </xsl:if>
- </xsl:if>
- <xsl:if test="(name()='OCHART' and $isIE) or (name()='OMAP' and not($isIE))">
- <xsl:if test="$CVDisableDrill != 'true'">
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onmouseover">oCVQS.getDrillMgr().ddc(event);</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onmouseover">getReportFrame().goDrillManager.ddc(event);</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:if>
-
- </xsl:template>
-
- <!-- Chart generation code. Overridden here from rsvp.xsl -->
- <xsl:template match="*[local-name()='OCHART']" priority="1">
- <span>
- <xsl:attribute name="tabIndex">0</xsl:attribute>
- <xsl:attribute name="chartContainer">true</xsl:attribute>
- <xsl:call-template name="GenChartImage"/>
- </span>
- </xsl:template>
- <!--
- report title
- -->
- <xsl:template match="FORM[@class='ta' and @layoutClass='block']">
- <div id="reportTitle">
- <xsl:call-template name="GenCommonAttributes"/>
- <span id="reportTitleLink" onmousedown="goWindowManager.getFeatureManager().launchFeature('EditTitle')" >
- <xsl:apply-templates/>
- </span>
- </div>
- </xsl:template>
- <!--
- report subtitles
- -->
- <xsl:template match="FORM[@class='ts' and @layoutClass='block']">
- <div id="reportSubtitle">
- <xsl:call-template name="GenCommonAttributes"/>
- <span onmousedown="goWindowManager.getFeatureManager().launchFeature('EditTitle')" class="reportSubtitleStyle">
- <xsl:apply-templates/>
- </span>
- </div>
- </xsl:template>
- <!-- filterSubtitle icon and place holder-->
- <xsl:template match="FORM[@class='ft' and @layoutClass='block']">
- <div width="100%">
- <xsl:attribute name="id">reportFilter<xsl:value-of select="count(preceding-sibling::FORM[@class='ft' and @layoutClass='block'])"/></xsl:attribute>
- <xsl:call-template name="GenCommonAttributes"/>
- <span class="fi filterSubtitleStyle">
- <xsl:variable name="cancelEvent">
- <xsl:choose>
- <xsl:when test="$isIE">return false</xsl:when>
- <xsl:otherwise>event.preventDefault()</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="./WRAP/OIMG/@sort!=''">
- <xsl:attribute name="style">cursor:default;</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$isIE">
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="oncontextmenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'SORTICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@sort))"/>');return false;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="oncontextmenu">CF_titleAreaContextMenu(event, 'SORTICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@sort))"/>');return false;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onContextMenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'SORTICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@sort))"/>');event.preventDefault();</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onContextMenu">CF_titleAreaContextMenu(event, 'SORTICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@sort))"/>');event.preventDefault();</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="./WRAP/OIMG/@suppress!=''">
- <xsl:attribute name="style">cursor:default;</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$isIE">
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="oncontextmenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'SUPPRESSICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@suppress))"/>');return false;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="oncontextmenu">CF_titleAreaContextMenu(event, 'SUPPRESSICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@suppress))"/>');return false;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onContextMenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'SUPPRESSICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@suppress))"/>');event.preventDefault();</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onContextMenu">CF_titleAreaContextMenu(event, 'SUPPRESSICON', '<xsl:value-of select="rsext:javascriptencode(string(./WRAP/OIMG/@suppress))"/>');event.preventDefault();</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onclick">goWindowManager.getFeatureManager().launchFeature('FilterComplex'<xsl:text/>
- <xsl:if test="./OTI/@filter!=''">
- <!-- Pass along one filter ID to know if it is a summary filter or a detail filter -->
- <xsl:text/>, ['<xsl:value-of select="rsext:javascriptencode(string(./OTI/@filter))"/>']<xsl:text/>
- </xsl:if>
- <xsl:text/>);event.cancelBubble=true;</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="oncontextmenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'FILTERICON', <xsl:text/>
- <xsl:if test="./OTI/@filter!=''">
- <!-- Pass along one filter ID to know if it is a summary filter or a detail filter -->
- <xsl:text/>'<xsl:value-of select="rsext:javascriptencode(string(./OTI/@filter))"/>'<xsl:text/>
- </xsl:if>
- <xsl:text/>);<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="oncontextmenu">CF_titleAreaContextMenu(event, 'FILTERICON', <xsl:text/>
- <xsl:if test="./OTI/@filter!=''">
- <!-- Pass along one filter ID to know if it is a summary filter or a detail filter -->
- <xsl:text/>'<xsl:value-of select="rsext:javascriptencode(string(./OTI/@filter))"/>'<xsl:text/>
- </xsl:if>
- <xsl:text/>);<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="./WRAP/OIMG"/>
- </span>
- <xsl:for-each select="OTI">
- <xsl:call-template name="QSFilterLink"/>
- </xsl:for-each>
- </div>
- </xsl:template>
- <!-- filterSubtitle links -->
- <xsl:template name="QSFilterLink">
- <span>
- <xsl:call-template name="GenCommonAttributes"/>
- <xsl:variable name="cancelEvent">
- <xsl:choose>
- <xsl:when test="$isIE">return false</xsl:when>
- <xsl:otherwise>event.preventDefault()</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="./@filter">
- <xsl:attribute name="class">filterSubtitleStyle</xsl:attribute>
- <xsl:attribute name="onclick">goWindowManager.getFeatureManager().launchFeature('FilterSimple',['<xsl:value-of select="rsext:javascriptencode(string(./@filter))"/>']);event.cancelBubble=true;</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="oncontextmenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'FILTERLINK', '<xsl:value-of select="rsext:javascriptencode(string(./@filter))"/>');<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="oncontextmenu">CF_titleAreaContextMenu(event, 'FILTERLINK', '<xsl:value-of select="rsext:javascriptencode(string(./@filter))"/>');<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="./@sort">
- <xsl:attribute name="class">filterSubtitleStyle</xsl:attribute>
- <xsl:attribute name="onclick">goWindowManager.getFeatureManager().launchFeature('Sort', new Array('INCOMMINGVALUE', '<xsl:value-of select="rsext:javascriptencode(string(./@sort))"/>'));event.cancelBubble=true;</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="oncontextmenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'SORT', '<xsl:value-of select="rsext:javascriptencode(string(./@sort))"/>');<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="oncontextmenu">CF_titleAreaContextMenu(event, 'SORT', '<xsl:value-of select="rsext:javascriptencode(string(./@sort))"/>');<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="./@suppress">
- <xsl:attribute name="class">filterSubtitleStyle</xsl:attribute>
- <xsl:attribute name="onclick">goWindowManager.getFeatureManager().launchFeature('Suppress');</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="oncontextmenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.titleAreaContextMenu(event, 'SUPPRESS', '<xsl:value-of select="rsext:javascriptencode(string(./@suppress))"/>');<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="oncontextmenu">CF_titleAreaContextMenu(event, 'SUPPRESS', '<xsl:value-of select="rsext:javascriptencode(string(./@suppress))"/>');<xsl:value-of select="$cancelEvent"/>;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates/>
- </span>
- </xsl:template>
- <!-- filterSubtitleIcon -->
- <xsl:template match="OIMG[@class='fi']">
- <img>
- <xsl:call-template name="GenCommonAttributes"/>
- <xsl:if test="@src">
- <xsl:attribute name="src"><xsl:value-of select="@src" disable-output-escaping="yes"/></xsl:attribute>
- </xsl:if>
- <!-- Yes, this overwrites the src attribute. I cannot find a better way in the rendering engine
- to accomplish this. What happens is that if the image control is data driven, I will set the source
- attribute. This takes presedence over hard-coded src attribute
- -->
- <xsl:if test="@source">
- <xsl:attribute name="src"><xsl:value-of select="@source" disable-output-escaping="yes"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@URL">
- <xsl:attribute name="src"><xsl:value-of select="@URL" disable-output-escaping="yes"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </img>
- </xsl:template>
- <!--
- template : startPage
- -->
- <xsl:template name="startPage">
- <table id="defaultReport" class="startPageTable" cellpadding="0" cellspacing="0">
- <!-- <xsl:if test="$isIE"> -->
- <xsl:attribute name="ondragenter">if(cf.dragStartPageEnterColumn)cf.dragStartPageEnterColumn(event)</xsl:attribute>
- <xsl:attribute name="ondragover">if(cf.dragStartPageOverColumn)cf.dragStartPageOverColumn(event)</xsl:attribute>
- <xsl:attribute name="ondragleave">if(cf.dragStartPageLeaveColumn)cf.dragStartPageLeaveColumn(event)</xsl:attribute>
- <xsl:attribute name="ondrop">if(cf.dropColumn)cf.dropColumn(event,null);</xsl:attribute>
- <!-- </xsl:if> -->
- <tr id="defaultReportTRTop">
- <td id="defaultReportTDTop" name="startPageTable" style="height:20px;" class="startPageListColumnTitle">
- <span id="startPageDropList" class="startPageText" name="startPageText" style="font-weight:bold;"/>
- </td>
- </tr>
- <tr id="defaultReportTRBottom">
- <td id="defaultReportTDBottom" name="startPageTable" class="startPageListColumn">
- <table id="defaultReportInnerTable" style="border-collapse: collapse;" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td id="defaultReportInnerTD1">
- <xsl:choose>
- <xsl:when test="$isIE">
- <xsl:attribute name="style">padding:15px 0px 3px;text-align:center;width:100%;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="style">padding:15px 0px 10px;text-align:center;width:100%;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <span class="startPageText" name="startPageText" id="startPageDragDropLine1"/>
- </td>
- </tr>
- <!-- <xsl:if test="$isIE"> -->
- <tr>
- <td id="defaultReportInnerTD2" style="padding:3px 0px 10px;text-align:center;width:100%;">
- <span class="startPageText" name="startPageText" id="startPageDragDropLine2"/>
- </td>
- </tr>
- <!-- </xsl:if> -->
- <tr>
- <td id="defaultReportInnerTD3" name="startPageTable" style="padding:10px 0px;text-align:center;width:100%;">
- <img id="defaultReportImg">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/images/arrow_template.gif</xsl:attribute>
- </img>
- </td>
- </tr>
- <tr>
- <td id="defaultReportInnerTD4" style="padding:10px 0px 3px;text-align:center;width:100%;">
- <span class="startPageText" name="startPageText" id="startPageTipsLine1"/>
- </td>
- </tr>
- <tr>
- <td id="defaultReportInnerTD5" style="padding:3px 0px 15px;text-align:center;width:100%;">
- <span class="startPageText" name="startPageText" id="startPageTipsLine2"/>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </xsl:template>
- <xsl:template name="dropIndicators">
- <span id="dragDropIndicator" class="clsCaretInsert" style="position:absolute; z-index:98; display:none;">
- <!-- <xsl:if test="$isIE"> -->
- <xsl:attribute name="ondragenter">dragOver(event)</xsl:attribute>
- <xsl:attribute name="ondragleave">event.cancelBubble = true;</xsl:attribute>
- <xsl:attribute name="ondrop">if(cf.dropColumn)cf.dropColumn(event,null);</xsl:attribute>
- <!-- </xsl:if> -->
- <img style="width:100%;height:100%;">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/images/drop_caret.gif</xsl:attribute>
- </img>
- </span>
- <span id="xtabHorizDropZone" style="position:absolute; z-index:50; display:none;">
- <!-- <xsl:if test="$isIE"> -->
- <xsl:attribute name="ondragenter">dragOverXtabHorizDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondragover">dragOverXtabHorizDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondrop">if(cf&&cf.dropColumn)cf.dropColumn(event,'xtabHorizDropZone','pivot');</xsl:attribute>
- <!-- </xsl:if> -->
- <img style="width:100%;height:100%;">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/images/spacer.gif</xsl:attribute>
- </img>
- </span>
- <span id="xtabVertDropZone" style="position:absolute; z-index:50; display:none;">
- <!-- <xsl:if test="$isIE"> -->
- <xsl:attribute name="ondragenter">dragOverXtabVertDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondragover">dragOverXtabVertDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondrop">if(cf&&cf.dropColumn)cf.dropColumn(event,'xtabVertDropZone','none');</xsl:attribute>
- <!-- </xsl:if> -->
- <img style="width:100%;height:100%;">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/images/spacer.gif</xsl:attribute>
- </img>
- </span>
- <span id="xtabCornerDropZone" style="position:absolute; z-index:50; display:none;">
- <!-- <xsl:if test="$isIE"> -->
- <xsl:attribute name="ondragenter">dragOverXtabCornerDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondragover">dragOverXtabCornerDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondrop">if(cf&&cf.dropColumn)cf.dropColumn(event,'xtabCornerDropZone','none');</xsl:attribute>
- <!-- </xsl:if> -->
- <img style="width:100%;height:100%;">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/images/spacer.gif</xsl:attribute>
- </img>
- </span>
- <span id="lastSectionDropZone" style="position:absolute; z-index:50; display:none;">
- <!-- <xsl:if test="$isIE"> -->
- <xsl:attribute name="ondragenter">dragOverLastSectionDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondragover">dragOverLastSectionDropZone(event)</xsl:attribute>
- <xsl:attribute name="ondrop">if(cf&&cf.dropColumn)cf.dropColumn(event,'lastSectionDropZone','header');</xsl:attribute>
- <!-- </xsl:if> -->
- <img style="width:100%;height:100%;">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/images/spacer.gif</xsl:attribute>
- </img>
- </span>
- </xsl:template>
- <!-- used to add events to the main page for selection -->
- <xsl:template match="*[@layoutClass='page']" priority="1">
- <xsl:if test="$CognosViewerID=''">
- <script language="javascript" type="text/javascript">
- CF_setupSelectionArrays();
- </script>
- </xsl:if>
- <table id="rt{$CognosViewerID}" cellpadding="0" cellspacing="0" border="0">
- <xsl:attribute name="onclick">oCVSC<xsl:value-of select="$CognosViewerID"/>.pageClicked(event);goWindowManager.getApplicationManager().clearMenus();</xsl:attribute>
- <xsl:attribute name="onmousemove">oCVSC<xsl:value-of select="$CognosViewerID"/>.pageHover(event);</xsl:attribute>
- <xsl:attribute name="ondblclick">pageDoubleClicked(event);</xsl:attribute>
- <xsl:attribute name="onkeypress">oCVSC<xsl:value-of select="$CognosViewerID"/>.pageClicked(event);</xsl:attribute>
- <xsl:if test="$isNS6 != 'true'">
- <xsl:attribute name="onmouseup">oCV<xsl:value-of select="$CognosViewerID"/>.pcc(event, true);</xsl:attribute>
- </xsl:if>
- <!-- <xsl:if test="$isIE"> -->
- <xsl:attribute name="ondrop">if(cf.dropColumn) {cf.dropColumn(event,null);}</xsl:attribute>
- <!-- </xsl:if> -->
- <xsl:call-template name="GenCommonAttributes"/>
- <xsl:apply-templates select="*"/>
- </table>
- </xsl:template>
- <xsl:template match="*[@layoutClass='textItem']" priority="1">
- <span>
- <xsl:attribute name="tabIndex">0</xsl:attribute>
- <xsl:call-template name="addDrillEvent"><xsl:with-param name="app"><xsl:text>QS</xsl:text></xsl:with-param></xsl:call-template>
- <xsl:call-template name="GenCommonAttributes"/>
- <xsl:if test="$CVDisableDrill != 'true'">
- <xsl:choose>
- <xsl:when test="name(parent::node())='drillTargets'">
- <xsl:if test="parent::node()/../@isolated='true' or parent::node()/@isolated='true'">
- <xsl:attribute name="isolated">true</xsl:attribute>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="parent::node()/@drillUp = 'true' or parent::node()/@drillDown = 'true' or ./@drillDown='true' or ./@drillUp='true' or parent::node()/../@drillUp = 'true' or parent::node()/../@drillDown = 'true'">
- <xsl:variable name="isIsolated">
- <xsl:choose>
- <xsl:when test="parent::node()/@isolated='true' or ./@isolated='true'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="(parent::node()/@drillDown = 'true' or ./@drillDown='true' or parent::node()/../@drillDown = 'true') and $isIsolated='false'">
- <xsl:attribute name="class"><xsl:text>dl </xsl:text><xsl:value-of select="@layoutClass" disable-output-escaping="yes"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="$isIsolated='true'">
- <xsl:attribute name="isolated">true</xsl:attribute>
- </xsl:if>
- </xsl:if>
- </xsl:otherwise>
- <!--
- <xsl:when test="@ctx != ''">
- <xsl:attribute name="ctx"><xsl:value-of select="@ctx"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="ctx">NIL</xsl:attribute>
- </xsl:otherwise>
- -->
- </xsl:choose>
- </xsl:if>
- <xsl:if test="@ctx != ''">
- <xsl:attribute name="ctx"><xsl:value-of select="@ctx"/></xsl:attribute>
- </xsl:if>
- <xsl:value-of select="rsext:htmlencode(string(.))" disable-output-escaping="yes"/>
- </span>
- </xsl:template>
- <xsl:template match="OAREA" priority="1">
- <xsl:if test="./MEMBER or ./MEASURE">
- <xsl:attribute name="ctx">
- <xsl:for-each select="./*[name()='MEASURE']">
- <xsl:value-of select="./@ctx"/>
- <xsl:if test="position()!=last()">
- <xsl:text>:</xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:if test="./*[name()='MEMBER'] and ./*[name()='MEASURE']">
- <xsl:text>::</xsl:text>
- </xsl:if>
- <xsl:for-each select="./*[name()='MEMBER']">
- <xsl:value-of select="./@ctx"/>
- <xsl:if test="position()!=last()">
- <xsl:text>::</xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onclick">oCVQS.getDrillMgr().singleClickDrillEvent(event, 'QS');</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onclick">getReportFrame().goDrillManager.singleClickDrillEvent(event, 'QS');</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <!--For IE: show a drill cursor when the mouse is over the chart, and a normal pointer when outside-->
- <xsl:if test="$isIE='true'">
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onmouseover">oCVQS.getDrillMgr().ddc(event);</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onmouseover">getReportFrame().goDrillManager.ddc(event);</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:attribute name="class"><xsl:value-of select="@layoutClass" disable-output-escaping="yes"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="./@type='legendTitle'">
- <xsl:attribute name="isChartTitle">true</xsl:attribute>
- </xsl:if>
- <xsl:if test="./@type='ordinalAxisTitle'">
- <xsl:attribute name="isChartTitle">true</xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$isIE">
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onmousedown">if(event.button==2){oCVSC<xsl:value-of select="$CognosViewerID"/>.pageClicked(event);event.cancelBubble = true;event.returnValue = false;}</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onmousedown">if(event.button==2){CF_pageClicked(event);event.cancelBubble = true;event.returnValue = false;}</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onContextMenu">oCVSC<xsl:value-of select="$CognosViewerID"/>.pageContextClicked(event);event.preventDefault();</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onContextMenu">CF_pageContextClicked(event);event.preventDefault();</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="addSelectionController">
- <xsl:if test="$CognosViewerID!=''">
- <xsl:text disable-output-escaping="yes"><script type="text/javascript"></xsl:text>
- <xsl:text>if(typeof oCVSC</xsl:text><xsl:value-of select="$CognosViewerID"/><xsl:text> != "undefined")</xsl:text>
- <xsl:text>{</xsl:text>
- <xsl:if test="/Document/META-DATA or /Document/CONTEXT-DATA">
- <xsl:text>oCVSC</xsl:text><xsl:value-of select="$CognosViewerID"/><xsl:text>.setSelectionBasedFeaturesEnabled(true);</xsl:text>
- </xsl:if>
- <xsl:if test="/Document/META-DATA/@drillUpDown='true'">
- <xsl:text>oCVSC</xsl:text><xsl:value-of select="$CognosViewerID"/><xsl:text>.setDrillUpDownEnabled(true);</xsl:text>
- </xsl:if>
- <xsl:if test="/Document/META-DATA/@modelBasedDrillThru='true'">
- <xsl:text>oCVSC</xsl:text><xsl:value-of select="$CognosViewerID"/><xsl:text>.setModelDrillThroughEnabled(true);</xsl:text>
- </xsl:if>
- <xsl:text>}</xsl:text>
- <xsl:text disable-output-escaping="yes"></script></xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template name="addDrillHandler">
- <xsl:param name="app"/>
- <xsl:choose>
- <xsl:when test="$CognosViewerID!=''">
- <xsl:attribute name="onclick">oCVSC<xsl:value-of select="$CognosViewerID"/>.pageClicked(event);oCVQS.getDrillMgr().singleClickDrillEvent(event, 'QS');</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onclick">CF_pageClicked(event);getReportFrame().goDrillManager.singleClickDrillEvent(event, 'QS');</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
|