123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2014
- 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:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- xmlns:flt="http://developer.cognos.com/schemas/uic/presentation/filters/"
- xmlns:itrv="http://developer.cognos.com/schemas/uic/presentation/intervals/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:out="dummy-uri"
- exclude-result-prefixes="xsl itrv flt xts uic">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <xsl:template match="itrv:Date">
- <xsl:variable name="mode">
- <xsl:choose>
- <xsl:when test="@mode"><xsl:value-of select="@mode"/></xsl:when>
- <xsl:otherwise>editBox</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <out:call-template name="getSelectDate">
- <out:with-param name="promptLocale" select="$promptLocale"/>
- <out:with-param name="promptTimeZone" select="$timeZone"/>
- <out:with-param name="promptFormName" select="'_THIS_pform'"/>
- <out:with-param name="promptRequired" select="'false'"/>
- <out:with-param name="promptStartOfWeek" select="'Sunday'"/>
- <out:with-param name="promptCalendar" select="'Gregorian'"/>
- <out:with-param name="promptParameter" select="{@promptParameter}"/>
- <out:with-param name="promptSelectDateUI" select="'{$mode}'"/>
- <out:with-param name="promptInputOrder" select="'YMD'"/>
- <xsl:if test="@firstDate != ''">
- <out:with-param name="promptFirstDate" select="{@firstDate}"/>
- </xsl:if>
- <xsl:if test="@popupIndex != ''">
- <out:with-param name="popupZindex" select="{@popupIndex}"/>
- </xsl:if>
- <out:with-param name="promptDefaultDate" select="{@date}"/>
- <out:with-param name="promptDateTime" select="'true'"/>
- <out:with-param name="promptMultiSelect" select="'false'"/>
- <out:with-param name="promptId" select="{@promptID}"/>
- <out:with-param name="suppressDisabled" select="'true'"/>
- <out:with-param name="promptBrowserMode" select="$promptBrowserMode"/>
- <out:with-param name="promptSelectUI" select="'{$mode}'"/>
- </out:call-template>
- </xsl:template>
- <xsl:template match="itrv:Time">
- <out:call-template name="getSelectTime">
- <out:with-param name="promptLocale" select="$promptLocale"/>
- <out:with-param name="promptFormName" select="'_THIS_pform'"/>
- <out:with-param name="promptRequired" select="'false'"/>
- <out:with-param name="promptDefaultValue" select="{@time}"/>
- <out:with-param name="promptParameter" select="{@promptParameter}"/>
- <out:with-param name="promptShowSeconds" select="'false'"/>
- <out:with-param name="promptInline" select="'false'"/>
- <out:with-param name="promptTimeZone" select="$timeZone"/>
- <out:with-param name="promptHourFormat" select="'hh'"/>
- <out:with-param name="promptMinuteFormat" select="'mm'"/>
- <out:with-param name="promptSecondFormat" select="'ss'"/>
- <out:with-param name="promptMode" select="@mode"/>
- <out:with-param name="promptMultiSelect" select="'false'"/>
- <out:with-param name="promptId" select="{@promptID}"/>
- <out:with-param name="suppressDisabled" select="'true'"/>
- <out:with-param name="promptBrowserMode" select="$promptBrowserMode"/>
- <out:with-param name="promptSelectUI" select="'editBox'"/>
- </out:call-template>
- </xsl:template>
- <xsl:template match="itrv:promptControls">
- <out:variable name="skin" select="key('user-param', 'skin')"/>
- <out:include href="p_include.xsl"/>
- <out:variable name="promptLocale" select="$productLocale"/>
- <out:variable name="promptFormName" select="@form"/>
- <out:variable name="promptBrowserMode">
- <out:choose>
- <out:when test="$browser = 'ie' ">IE5</out:when>
- <out:when test="$browser = 'moz' ">NS6</out:when>
- <out:when test="$browser = 'safari' ">safari</out:when>
- <out:otherwise>NS4</out:otherwise>
- </out:choose>
- </out:variable>
- </xsl:template>
-
- <xsl:template match="itrv:promptControlsScript">
- <script>
- var m_datetime_msg_array = new Array();
- m_datetime_msg_array['MSG_ERR_INCOMPATIBLE_DATES'] = "<xts:string id="IDS_FLT_MSG_INCOMPATIBLE_DATES" encode="javascript"/>";
- m_datetime_msg_array['MSG_ERR_INVALID_END_DATE'] = "<xts:string id="IDS_FLT_MSG_INVALID_END_DATE" encode="javascript"/>";
- m_datetime_msg_array['MSG_ERR_INVALID_END_TIME'] = "<xts:string id="IDS_FLT_MSG_INVALID_END_TIME" encode="javascript"/>";
- m_datetime_msg_array['MSG_ERR_INVALID_START_DATE'] = "<xts:string id="IDS_FLT_MSG_INVALID_START_DATE" encode="javascript"/>";
- m_datetime_msg_array['MSG_ERR_INVALID_START_TIME'] = "<xts:string id="IDS_FLT_MSG_INVALID_START_TIME" encode="javascript"/>";
- m_datetime_msg_array['MSG_ERR_INVALID_DATE'] = "<xts:string id="IDS_FLT_MSG_INVALID_DATE" encode="javascript"/>";
- m_datetime_msg_array['MSG_ERR_INVALID_TIME'] = "<xts:string id="IDS_FLT_MSG_INVALID_TIME" encode="javascript"/>";
-
- function getFormattedSummary(dFrom, tFrom, dTo, tTo) {
- return '<xts:string id="IDS_FLT_PERIOD_SUMMARY" encode="javascript"><xts:param name="from">' + dFrom + ' ' + tFrom + '</xts:param><xts:param name="to">' + dTo + ' ' + tTo + '</xts:param></xts:string>';
- }
- </script>
- <!-- bring in our js file -->
- <library type="text/javascript" href="$WEB$/ps/cogadmin/js/datetime.js"/>
- <!-- create some hidden inputs needed by our js file -->
- <input name="_THIS_hidden_date_periodFrom" id="_THIS_hidden_date_periodFrom" type="hidden" value=""/>
- <input name="_THIS_hidden_time_periodFrom" id="_THIS_hidden_time_periodFrom" type="hidden" value=""/>
- <input name="_THIS_hidden_date_periodTo" id="_THIS_hidden_date_periodTo" type="hidden" value=""/>
- <input name="_THIS_hidden_time_periodTo" id="_THIS_hidden_time_periodTo" type="hidden" value=""/>
- <xts:transform src="/cogadmin/transforms/switchScriptToLibrary.xslt" processor="XSLT">
- <root>
- <out:call-template name="getPromptCommonIncludes">
- <out:with-param name="promptBrowserMode" select="$promptBrowserMode"/>
- </out:call-template>
- <out:call-template name="getselectDateTimeIncludes">
- <out:with-param name="promptLocale" select="$promptLocale"/>
- <out:with-param name="promptContentLocale" select="$contentLocale"/>
- <out:with-param name="promptBrowserMode" select="$promptBrowserMode"/>
- </out:call-template>
- </root>
- </xts:transform>
- </xsl:template>
-
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|