123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- <?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 version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:qsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:out="dummy-uri"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <xsl:template match="qsdlg:buttons">
- <table cellspacing="0" cellpadding="1" border="0">
- <tr>
- <xsl:apply-templates/>
- </tr>
- </table>
- </xsl:template>
- <xsl:template match="qsdlg:button">
- <dp:button>
- <a href="{./qsdlg:href}">
- <span class="commandButtonActive">
- <xts:string id="{./qsdlg:text}"/>
- </span>
- </a>
- </dp:button>
- </xsl:template>
- <xsl:template match="qsdlg:defaultOKButton">
- <dp:footer>
- <df:button df:id="IDS_OK" df:style="href" id="executeButton" onkeypress="javascript:executeCancel(event)" df:href="javascript:executeCancel(null)" df:defaultKey="active"/>
- </dp:footer>
- </xsl:template>
- <xsl:template match="qsdlg:defaultOKUpgradeModelButton">
- <dp:footer>
- <df:button df:id="IDS_OK" df:style="href" id="executeButton" df:href="javascript:getConfigFrame().upgradeModelCancel()" df:defaultKey="active"/>
- </dp:footer>
- </xsl:template>
- <xsl:template match="qsdlg:defaultOKCloseLinkButton">
- <dp:footer>
- <df:button df:id="IDS_OK" df:style="href" id="executeButton" onkeypress="javascript:getConfigFrame().defaultCloseLinkButton(event)" df:href="javascript:getConfigFrame().defaultCloseLinkButton(null)" df:defaultKey="active"/>
- </dp:footer>
- </xsl:template>
- <xsl:template match="qsdlg:promptOKCloseLinkButton">
- <dp:footer>
- <df:button df:id="IDS_OK" df:style="href" id="executeButton" onkeypress="javascript:getConfigFrame().promptCloseLinkButton(event)" df:href="javascript:getConfigFrame().promptCloseLinkButton(null)" df:defaultKey="active"/>
- </dp:footer>
- </xsl:template>
- <xsl:template match="qsdlg:defaultFormatNumButtons">
- <dp:footer>
- <span id="formatOK">
- <df:button df:id="IDS_OK" df:style="href" id="executeButton" onkeypress="javascript:executeOk(event)" df:href="javascript:executeOk(null)" df:defaultKey="active"/>
- </span>
- <df:button df:id="IDS_CANCEL" df:style="href" onkeypress="javascript:executeCancel(event)" df:href="javascript:executeCancel(null)"/>
- </dp:footer>
- </xsl:template>
- <xsl:template match="qsdlg:defaultButtons">
- <dp:footer>
- <xsl:choose>
- <xsl:when test="@preventActive">
- <df:button df:id="IDS_OK" df:style="href" id="executeButton" onkeypress="javascript:executeOk(event)" df:href="javascript:executeOk(null)"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_OK" df:style="href" id="executeButton" onkeypress="javascript:executeOk(event)" df:href="javascript:executeOk(null)" df:defaultKey="active"/>
- </xsl:otherwise>
- </xsl:choose>
- <df:button df:id="IDS_CANCEL" df:style="href" onkeypress="javascript:executeCancel(event)" df:href="javascript:executeCancel(null)"/>
- </dp:footer>
- </xsl:template>
- <xsl:template match="qsdlg:option">
- <xsl:variable name="paramSel" select="ancestor::node()[@selectedParam]/@selectedParam"/>
- <option value="{./qsdlg:value}">
- <!-- Add a <xsl:if> to set "selected" value if it's the selected option -->
- <xsl:if test="$paramSel">
- <xsl:element name="xsl:if">
- <xsl:attribute name="test"><xsl:value-of select="$paramSel"/>='<xsl:value-of select="./qsdlg:value"/>'</xsl:attribute>
- <xsl:element name="xsl:attribute">
- <xsl:attribute name="name">selected</xsl:attribute>
- </xsl:element>
- </xsl:element>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="./qsdlg:label">
- <xts:string id="{./qsdlg:label}"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./qsdlg:value"/>
- </xsl:otherwise>
- </xsl:choose>
- </option>
- </xsl:template>
- <xsl:template match="qsdlg:promptBox">
- <span nocOnly="disabled">
- <dp:choice>
- <!-- add a xsl:attribute to the generated XSL -->
- <xsl:element name="xsl:attribute">
- <xsl:attribute name="name">style</xsl:attribute>border:1px solid #999999;</xsl:element>
- <dp:section1>
- <input type="checkbox" name="promptBox" id="promptBox"/>
- </dp:section1>
- <dp:section2>
- <div style="padding:3px;">
- <label for="promptBox"><xts:string id="DIALOG_PROMPT"/></label>
- </div>
- </dp:section2>
- </dp:choice>
- </span>
- </xsl:template>
- <xsl:template match="qsdlg:conditionBox">
- <out:choose>
- <out:when test="/root/system/param[@name='enableFilterNOT']='true'">
- <dp:input>
- <dp:section1>
- <xts:string id="FILTER_CONDITION"/>
- </dp:section1>
- <dp:section2>
- <select name="oExcludeSelectedValues">
- <option value="false"><xts:string id="FILTER_SHOW_ONLY"/></option>
- <option value="true"><xts:string id="FILTER_DO_NOT_SHOW"/></option>
- </select>
- </dp:section2>
- </dp:input>
- </out:when>
- <out:otherwise>
- <dp:input>
- <dp:section1>
- <xts:string id="FILTER_SHOW_ONLY_WITH_COLON"/>
- </dp:section1>
- <dp:section2/>
- </dp:input>
- </out:otherwise>
- </out:choose>
- </xsl:template>
- <xsl:template match="qsdlg:nullOptions">
- <div id="QsdlgHiddenNullOptions" style="padding-left:6px; padding-top:2px; display:none;">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr onclick="showNullOptions(true)">
- <td class="formText">
- <a href="#"><xts:string id="MISSINGVALUES_LINK"/></a>
- </td>
- <td align="left">
- <img border="0" width="3" height="1">
- <out:attribute name="src"><out:value-of select="$webRoot"/>/common/images/spacer.gif</out:attribute>
- </img>
- </td>
- <td>
- <img border="0">
- <out:attribute name="src"><out:value-of select="$qsdlgskin"/>/prompting/images/prompt_option_expand.gif</out:attribute>
- </img>
- </td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" style="padding-top:2px;">
- <tr>
- <td class="formText">
- <span id="nullOptionText"></span>
- </td>
- </tr>
- </table>
- </div>
- <div id="QsdlgVisibleNullOptions" style="padding-left:6px; padding-top:2px; display:none;">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr onclick="showNullOptions(false)">
- <td class="formText">
- <a href="#"><xts:string id="MISSINGVALUES_LINK"/></a>
- </td>
- <td align="left">
- <img border="0" width="3" height="1">
- <out:attribute name="src"><out:value-of select="$webRoot"/>/common/images/spacer.gif</out:attribute>
- </img>
- </td>
- <td>
- <img border="0">
- <out:attribute name="src"><out:value-of select="$qsdlgskin"/>/prompting/images/prompt_option_collapse.gif</out:attribute>
- </img>
- </td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="dialogHeaderText" style="padding-top:2px;">
- <xts:string id="MISSINGVALUES_HINT"/>
- </td>
- </tr>
- <tr>
- <td class="formText" style="padding-top:2px;">
- <select name="QsdlgNullOptions" class="clsNullOptions" onchange="updateNullOptionText()">
- <option value=""><xts:string id="MISSINGVALUES_OPTION_DEFAULT"/></option>
- <option value="include"><xts:string id="MISSINGVALUES_OPTION_INCLUDE_NULL"/></option>
- <option value="exclude"><xts:string id="MISSINGVALUES_OPTION_REMOVE_NULL"/></option>
- <option value="only"><xts:string id="MISSINGVALUES_OPTION_NULL_ONLY"/></option>
- </select>
- </td>
- </tr>
- </table>
- </div>
- </xsl:template>
- <!-- Default variables for all dialogs-->
- <xsl:template match="qsdlg:variables">
- <out:variable name="skin" select="/root/user/param[@name='skin']"/>
- <out:variable name="qsdlgskin" select="concat($webRoot, '/skins/' , $skin)"/>
- </xsl:template>
- <!-- Prompt Control Variables -->
- <xsl:template match="qsdlg:promptVariables">
- <out:variable name="cnLocale" select="/root/env/param[@name='contentLocale']"/>
- <out:variable name="prLocale" select="/root/env/param[@name='productLocale']"/>
- <out:variable name="promptLocale">
- <out:choose>
- <out:when test="$cnLocale != '' and (substring($cnLocale,1,2)= $prLocale)">
- <out:value-of select="$cnLocale"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$prLocale"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="promptFormName" select="'f'"/>
- </xsl:template>
-
- <!-- Load prompting toolkit files. -->
- <xsl:template match ="qsdlg:promptInit">
- <out:call-template name="getPromptIncludes">
- <out:with-param name="skinFolder" select="concat($webRoot,'/skins/', $skin)"/>
- <out:with-param name="webRootURI" select="$webRoot"/>
- </out:call-template>
- </xsl:template>
- <!-- Color Swatch -->
- <xsl:template match="qsdlg:colorSwatch">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <input type="hidden" name="{./@id}" value=""/>
- <table border="0" cellpadding="0" cellspacing="1" class="colorSwatch" style="width:50px;height:20px;margin-right:3px;">
- <tr>
- <td id="selectColorSwatch{./@id}" height="100%" width="100%" class="color_default">
- <img width="1" height="1">
- <out:attribute name="src"><out:value-of select="$webRoot"/>/common/images/spacer.gif</out:attribute>
- </img>
- </td>
- </tr>
- </table>
- </td>
- <td>
- <div id="selectColor{./@id}"/>
- <script>
- var <xsl:value-of select="./@jsObjId"/> = new CColorPicker('<xsl:value-of select="xtsext:javascriptencode(string(./@id))"/>', '<xsl:value-of select="xtsext:javascriptencode(string(./@jsObjId))"/>', '<xsl:value-of select="xtsext:javascriptencode(string(./@fct))"/>', null, null, '<xsl:value-of select="xtsext:javascriptencode(string(./@type))"/>', null, false);
- </script>
- </td>
- </tr>
- </table>
- </xsl:template>
- <!--
- Shows a checkbox to use the filter against the individual records in the data source.
- Checked by default.
- -->
- <xsl:template match="qsdlg:filterBasedOnDSBox">
- <div id="displayBasedOn" style="display:none;">
- <dp:choice noSpace="true">
- <!-- add a xsl:attribute to the generated XSL -->
- <dp:section1>
- <input type="checkbox" id="filterBasedOnDS" name="filterBasedOnDS" checked="true" onchange="updateBasedOn()"/>
- </dp:section1>
- <dp:section2>
- <label for="filterBasedOnDS"><xts:string id="FILTER_ON_DATASOURCE"/></label>
- </dp:section2>
- <dp:section3>
- <div id="filterBasedOnInfoMessage" style="display:none;">
- <xts:string id="FILTER_ON_DATASOURCE_INFO_MESSAGE"/>
- </div>
- </dp:section3>
- </dp:choice>
- </div>
- </xsl:template>
- <!--
- Adds in the header before calling the template to show the drop down list
- for the operation selection in the type in filter dialogs
- -->
- <xsl:template match="qsdlg:filterTypeInOperationSelectWithTitle">
- <out:if test="/root/env/param[@name='xxShowTypeInDropDown']='true'">
- <dp:input>
- <dp:section1>
- <xts:string id="FILTER_TYPE_IN_OPERATION_WITH_COLON"/>
- </dp:section1>
- <dp:section2>
- <xsl:call-template name="filterTypeInOperationSelect">
- <xsl:with-param name="selectedOption"><xsl:value-of select="@selectedOption"/></xsl:with-param>
- </xsl:call-template>
- </dp:section2>
- </dp:input>
- </out:if>
- </xsl:template>
- <!--
- Shows the type in filter drop down select choices picker
- -->
- <xsl:template name="filterTypeInOperationSelect" match="qsdlg:filterTypeInOperationSelect">
- <xsl:param name="selectedOption"/>
- <xsl:variable name="realSelectedOption">
- <xsl:choose>
- <xsl:when test="$selectedOption!=''">
- <xsl:value-of select="$selectedOption"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@selectedOption"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <out:if test="/root/env/param[@name='xxShowTypeInDropDown']='true'">
- <select name="operation" id="operation" onchange="javascript:changeDialog(this)">
- <option value="filterTypeInExactlyMatches">
- <xsl:if test="$realSelectedOption='filterTypeInExactlyMatches'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="FILTER_TYPE_IN_EXACTLY_MATCHES"/>
- </option>
- <option value="filterTypeInStartsWith">
- <xsl:if test="$realSelectedOption='filterTypeInStartsWith'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="FILTER_TYPE_IN_STARTS_WITH"/>
- </option>
- <option value="filterTypeInEndsWith">
- <xsl:if test="$realSelectedOption='filterTypeInEndsWith'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="FILTER_TYPE_IN_ENDS_WITH"/>
- </option>
- <option value="filterTypeInContains">
- <xsl:if test="$realSelectedOption='filterTypeInContains'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="FILTER_TYPE_IN_CONTAINS"/>
- </option>
- <option value="filterTypeInMatchesSQLPattern">
- <xsl:if test="$realSelectedOption='filterTypeInMatchesSQLPattern'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="FILTER_TYPE_IN_MATCHES_SQL_PATTERN"/>
- </option>
- <!-- Fix for bug COGCQ00202676
- Do not allow advanced type-in functions for non-string data items.
- These are not supported.
- -->
- <out:if test="/root/env/param[@name='xxFilterIsString']='true'">
- <option value="filterTypeInRange">
- <xsl:if test="$realSelectedOption='filterTypeInRange'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="FILTER_TYPE_IN_IS_IN_RANGE"/>
- </option>
- </out:if>
- </select>
- </out:if>
- </xsl:template>
- <!--
- Shows the date drop down select choices picker
- -->
- <xsl:template match="qsdlg:filterDateRangeSelect">
- <out:if test="/root/env/param[@name='xxShowTypeInDropDown']='true'">
- <dp:input>
- <dp:section1>
- <xts:string id="FILTER_TYPE_IN_OPERATION_WITH_COLON"/>
- </dp:section1>
- <dp:section2>
- <select name="operation" id="operation" onchange="javascript:changeDateRangeDialog(this);">
- <option value="filterDateRange">
- <xsl:if test="@selectedOption='filterDateRange'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="COND_STYLE_HEADER_RANGE"/>
- </option>
- <option value="filterDaysBeforeToday">
- <xsl:if test="@selectedOption='filterDaysBeforeToday'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="FILTER_LAST_NUMBER_OF_DAYS"/>
- </option>
- </select>
- </dp:section2>
- </dp:input>
- </out:if>
- </xsl:template>
- <!--
- * - This next template is required to copy all other elements into the result.
- -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|