123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699 |
- <?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).
- -->
- <!--
- Used for datetime and interval difference
- -->
- <xts:morphlet resolverBase="prompting" version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio">
- <xts:block id="page" type="exec" mode="output" processor="XSLT" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <!-- get the new theme stuff -->
- <!-- apply the following logicsheets in order -->
- <xts:logicsheet path="qs/logicsheets/calc_theme.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="qs/logicsheets/dialogs.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:clcdlg="test_calculationDlg"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
- xmlns:qsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="clcdlg xsl xts lyt pf dp df cp cf dbg qsdlg xtsext">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- Default variables (like skin) and prompt variables -->
- <qsdlg:variables/>
- <qsdlg:promptVariables/>
- <!-- Prompt Control XSL include -->
- <xsl:include href="p_include.xsl"/>
- <!-- add any theme variables -->
- <df:variables/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <dp:page>
- <dp:script>
- <xsl:call-template name="getPromptCommonIncludes"/>
- <xsl:call-template name="getselectDateIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- <xsl:call-template name="getselectTimeIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- <xsl:call-template name="getintervalFieldIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- <xsl:call-template name="gettextBoxIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- <link href="{$qsdlgskin}/qs/QSRVDialog.css" type="text/css" rel="stylesheet"/>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/layout.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/rv/cvConstants.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/rv/common.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/rv/cvui.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/framework/notification/CObserver.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CDialogManager.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CWindowManager.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript"><!--
- var goDialogManager = new CDialogManager();
- <clcdlg:jvs/>
- var cf = getConfigFrame();
- var calcType = cf.dlgGlobalGetParm('xxCalcType');
- var calcParentIds = new Array();
- var substVarValue = null;
- function execute()
- {
- var calc = document.f.calcList.options[document.f.calcList.selectedIndex].value;
- var before_col_id = cf.dlgGlobalGetParm('xxInsBeforeColid');
- var calcFormat = "none", first = "", second = "", calcExpr = "", calcOp;
- var calcType = 53;
- var usageType = 0;
- var listSeparator = goDialogManager.getMiniQueryManager().getListSeparator();
- if (document.f.first[0].checked)
- {
- for (var i = 0; i < cf.dlgGlobalSize('xxColInfo'); i++)
- {
- if (i == 0)
- {
- var expr = cf.dlgGlobalGetParmAt('xxColInfo', i);
- first = expr[1];
- }
- if (cf.dlgGlobalSize('xxColInfo') == 1)
- {
- if (!document.f.inputValueRadio || (document.f.inputValueRadio[0].checked || (document.f.inputValueRadio[1].checked && substVarValue == null)))
- {
- if (cf.dlgGlobalGetParm('xxCalcType') == 'date' || cf.dlgGlobalGetParm('xxCalcType') == 'datetime')
- {
- if(pickerControldateTop.isValid())
- second = pickerControldateTop.sGetValue();
- else return;
- }
- if (cf.dlgGlobalGetParm('xxCalcType') == 'datetime')
- second += " ";
- if (cf.dlgGlobalGetParm('xxCalcType') == 'time' || cf.dlgGlobalGetParm('xxCalcType') == 'datetime')
- {
- if(timePickertimeTop.isValid())
- second += timePickertimeTop.sGetValue();
- else return;
- }
- if (cf.dlgGlobalGetParm('xxCalcType') == 'interval')
- {
- if(intervalControlintervalFrom.isValid())
- second = intervalControlintervalFrom.sGetValue();
- else return;
- }
- }
- else
- second = substVarValue;
- }
- else if (i == 1)
- {
- var expr = cf.dlgGlobalGetParmAt('xxColInfo', i);
- second = expr[1];
- }
- }
- }
- else
- {
- for (var i = 0; i < cf.dlgGlobalSize('xxColInfo'); i++)
- {
- if (i == 0)
- {
- var expr = cf.dlgGlobalGetParmAt('xxColInfo', i);
- second = expr[1];
- }
- if (cf.dlgGlobalSize('xxColInfo') == 1)
- {
- if (!document.f.inputValueRadio || (document.f.inputValueRadio[0].checked || (document.f.inputValueRadio[1].checked && substVarValue == null)))
- {
- if (cf.dlgGlobalGetParm('xxCalcType') == 'date' || cf.dlgGlobalGetParm('xxCalcType') == 'datetime')
- {
- if(pickerControldateTop.isValid())
- first = pickerControldateTop.sGetValue();
- else return;
- }
- if (cf.dlgGlobalGetParm('xxCalcType') == 'datetime')
- first += " ";
- if (cf.dlgGlobalGetParm('xxCalcType') == 'time' || cf.dlgGlobalGetParm('xxCalcType') == 'datetime')
- {
- if(timePickertimeTop.isValid())
- first += timePickertimeTop.sGetValue();
- else return;
- }
- if (cf.dlgGlobalGetParm('xxCalcType') == 'interval')
- {
- if(intervalControlintervalFrom.isValid())
- first = intervalControlintervalFrom.sGetFormatValue();
- else return;
- }
- }
- else
- first = substVarValue;
- }
- else if (i == 1)
- {
- var expr = cf.dlgGlobalGetParmAt('xxColInfo', i);
- first = expr[1];
- }
- }
- }
- switch (calc)
- {
- case "daysBetween":
- calcExpr = "_days_between(" + first + listSeparator + " " + second + ")";
- calcOp = "daysBetween";
- calcType = -1;
- usageType = 2;
- break;
- case "monthsBetween":
- calcExpr = "_months_between(" + first + listSeparator + " " + second + ")";
- calcOp = "monthsBetween";
- calcType = -1;
- usageType = 2;
- break;
- case "yearsBetween":
- calcExpr = "_years_between(" + first + listSeparator + " " + second + ")";
- calcOp = "yearsBetween";
- calcType = -1;
- usageType = 2;
- break;
- default:
- calcExpr = "(" + first + ") - (" + second + ")";
- calcOp = "difference";
- break;
- }
- var tempCalcType = cf.dlgGlobalGetParm('xxCalcType');
- if (tempCalcType == 'date')
- calcOp += "Date";
- else if (tempCalcType == 'time')
- calcOp += "Time";
- else if (tempCalcType == 'interval')
- calcOp = "differenceInterval";
- else
- calcOp += "DateTime";
- if (calcExpr != "")
- {
- var calcName = getCalcName();
- getConfigFrame().addCalcColumn(before_col_id, calcExpr, calcExpr, calcName, "none", calcOp, "none", calcFormat, calcType, usageType, "none", -1, "none", calcParentIds);
- }
- }
- function generateName (withQuotes)
- {
- var calc = document.f.calcList.options[document.f.calcList.selectedIndex].value;
- var first = "", second = "", calcName = "";
- if (document.f && document.f.first)
- {
- if (document.f.first[0].checked)
- {
- for (var i = 0; i < cf.dlgGlobalSize('xxColInfo'); i++)
- {
- if (i == 0)
- {
- var label = cf.dlgGlobalGetParmAt('xxColInfo', i);
- first = label[0];
- }
- if (cf.dlgGlobalSize('xxColInfo') == 1)
- {
- if (!document.f.inputValueRadio || (document.f.inputValueRadio[0].checked || (document.f.inputValueRadio[1].checked && substVarValue == null)))
- {
- if (calcType == 'date' || calcType == 'datetime')
- second = pickerControldateTop.sGetFormatValue();
- if (calcType == 'datetime')
- second += " ";
- if (calcType == 'time' || calcType == 'datetime')
- second += timePickertimeTop.sGetFormatValue();
- if (calcType == 'interval')
- second = intervalControlintervalFrom.sGetFormatValue();
- }
- else
- second = textBoxstringValue.m_oForm.value;
- }
- else if (i == 1)
- {
- var label = cf.dlgGlobalGetParmAt('xxColInfo', i);
- second = label[0];
- }
- }
- }
- else
- {
- for (var i = 0; i < cf.dlgGlobalSize('xxColInfo'); i++)
- {
- if (i == 0)
- {
- var label = cf.dlgGlobalGetParmAt('xxColInfo', i);
- second = label[0];
- }
- if (cf.dlgGlobalSize('xxColInfo') == 1)
- {
- if (!document.f.inputValueRadio || (document.f.inputValueRadio[0].checked || (document.f.inputValueRadio[1].checked && substVarValue == null)))
- {
- if (calcType == 'date' || calcType == 'datetime')
- first = pickerControldateTop.sGetFormatValue();
- if (calcType == 'datetime')
- first += " ";
- if (calcType == 'time' || calcType == 'datetime')
- first += timePickertimeTop.sGetFormatValue();
- if (calcType == 'interval')
- first = intervalControlintervalFrom.sGetFormatValue();
- }
- else
- first = textBoxstringValue.m_oForm.value;
- }
- else if (i == 1)
- {
- var label = cf.dlgGlobalGetParmAt('xxColInfo', i);
- first = label[0];
- }
- }
- }
- }
- switch (calc)
- {
- case "daysBetween":
- calcName = "<xts:string id="CALCULATION_DAYS_BETWEEN_EQUATION" encode="javascript"/>";
- break;
- case "monthsBetween":
- calcName = "<xts:string id="CALCULATION_MONTHS_BETWEEN_EQUATION" encode="javascript"/>";
- break;
- case "yearsBetween":
- calcName = "<xts:string id="CALCULATION_YEARS_BETWEEN_EQUATION" encode="javascript"/>";
- break;
- default:
- calcName = "<xts:string id="CALCULATION_SUBTRACT_EQUATION" encode="javascript"/>";
- break;
- }
- calcName = stringReplace (calcName, "\\^0", first);
- calcName = stringReplace (calcName, "\\^1", second);
- return calcName;
- }
- <xsl:if test="/root/env/param[@name='xxSubstVar']='true'">
- function datetimeGotFocus()
- {
- document.f.inputValueRadio[0].checked = true;
- }
- </xsl:if>
- function init()
- {
- attachMouseEvents();
- for (var i = 0; i < cf.dlgGlobalSize('xxCalcParentIds'); i++)
- {
- var id = cf.dlgGlobalGetParmAt('xxCalcParentIds', i);
- calcParentIds[i] = id[0];
- }
- var validCalcs = new Array();
- for (var i = 0; i < cf.dlgGlobalSize('xxValidCalcItem'); i++)
- validCalcs[validCalcs.length] = cf.dlgGlobalGetParmAt('xxValidCalcItem', i);
- populateCalculationList(calcType, validCalcs);
- // select calculation
- document.f.calcList.selectedIndex = cf.dlgGlobalGetParm('xxCalcTypeIdx');
- setInterval(loadHint, 100);
- addInsert();
- setGlobals(calcType, false);
- loadHint ();
- load ();
- var oIntervalFrom = [document.f.intervalDaysintervalFrom, document.f.intervalHoursintervalFrom, document.f.intervalMinutesintervalFrom, document.f.intervalSecondsintervalFrom];
- if (oIntervalFrom.length > 0)
- {
- if (oIntervalFrom[0])
- {
- oIntervalFrom[0].value = "<xts:string id="FILTER_INTERVAL_DEFAULT_VALUE" encode="javascript"/>";
- oIntervalFrom[0].onclick = onSelOperation;
- oIntervalFrom[0].onkeypress = onSelOperation;
- oIntervalFrom[0].onpaste = onSelOperation;
- oIntervalFrom[0].onblur = onSelOperation;
- }
- if (oIntervalFrom[1])
- {
- oIntervalFrom[1].value = "<xts:string id="FILTER_INTERVAL_DEFAULT_VALUE" encode="javascript"/>";
- oIntervalFrom[1].onclick = onSelOperation;
- oIntervalFrom[1].onkeypress = onSelOperation;
- oIntervalFrom[1].onpaste = onSelOperation;
- oIntervalFrom[1].onblur = onSelOperation;
- }
- if (oIntervalFrom[2])
- {
- oIntervalFrom[2].value = "<xts:string id="FILTER_INTERVAL_DEFAULT_VALUE" encode="javascript"/>";
- oIntervalFrom[2].onclick = onSelOperation;
- oIntervalFrom[2].onkeypress = onSelOperation;
- oIntervalFrom[2].onpaste = onSelOperation;
- oIntervalFrom[2].onblur = onSelOperation;
- }
- if (oIntervalFrom[3])
- {
- oIntervalFrom[3].value = "<xts:string id="FILTER_INTERVAL_DEFAULT_VALUE" encode="javascript"/>";
- oIntervalFrom[3].onclick = onSelOperation;
- oIntervalFrom[3].onkeypress = onSelOperation;
- oIntervalFrom[3].onpaste = onSelOperation;
- oIntervalFrom[3].onblur = onSelOperation;
- }
- }
- <xsl:if test="/root/env/param[@name='xxSubstVar']='true'">
- //choose date and time radio button on focus
- var oDateTop = document.getElementById('dateEditBoxdateTop');
- var oTimeTop = document.getElementById('timeEditBoxtimeTop');
- if (oDateTop)
- {
- oDateTop.onclick = datetimeGotFocus;
- oDateTop.onkeypress = datetimeGotFocus;
- oDateTop.onpaste = datetimeGotFocus;
- }
- if (oTimeTop)
- {
- oTimeTop.onclick = datetimeGotFocus;
- oTimeTop.onkeypress = datetimeGotFocus;
- oTimeTop.onpaste = datetimeGotFocus;
- }
- if (document.dateTopimgPicker)
- document.dateTopimgPicker.onmousedown = datetimeGotFocus;
- <clcdlg:subst_var/>
- </xsl:if>
- }
- function load() {
- var calc = document.f.calcList.options[document.f.calcList.selectedIndex].value;
- var calcWord;
- switch (calc)
- {
- case "daysBetween":
- calcWord = "<xts:string id="CALCULATION_DAYS_BETWEEN_EQUATION" encode="javascript"/>";
- break;
- case "monthsBetween":
- calcWord = "<xts:string id="CALCULATION_MONTHS_BETWEEN_EQUATION" encode="javascript"/>";
- break;
- case "yearsBetween":
- calcWord = "<xts:string id="CALCULATION_YEARS_BETWEEN_EQUATION" encode="javascript"/>";
- break;
- default:
- calcWord = "<xts:string id="CALCULATION_SUBTRACT_EQUATION" encode="javascript"/>";
- break;
- }
- var calcWord2 = calcWord;
- for (var i = 0; i < cf.dlgGlobalSize('xxColInfo'); i++)
- {
- if (i == 0)
- {
- var label = cf.dlgGlobalGetParmAt('xxColInfo', i);
- var first = label[0];
- break;
- }
- }
- if (cf.dlgGlobalSize('xxColInfo') == 1)
- {
- if (calcType == 'date' || calcType == 'datetime')
- var second = "<xts:string id="CALCULATION_DATE_LABEL" encode="javascript"/>";
- else if (calcType == 'time')
- var second = "<xts:string id="CALCULATION_TIME_LABEL" encode="javascript"/>";
- else if (calcType == 'interval')
- var second = "<xts:string id="CALCULATION_INTERVAL_LABEL" encode="javascript"/>";
- }
- else
- {
- for (var i = 0; i < cf.dlgGlobalSize('xxColInfo'); i++)
- {
- if (i == 1)
- {
- var label = cf.dlgGlobalGetParmAt('xxColInfo', i);
- var second = label[0];
- break;
- }
- }
- }
- calcWord = stringReplace (calcWord, "\\^0", first);
- calcWord = stringReplace (calcWord, "\\^1", second);
- calcWord2 = stringReplace (calcWord2, "\\^1", first);
- calcWord2 = stringReplace (calcWord2, "\\^0", second);
- // populate calcWord
- var calcWordElt = document.getElementById("calcWord");
- while (calcWordElt.hasChildNodes())
- calcWordElt.removeChild(calcWordElt.firstChild);
- calcWordElt.appendChild(document.createTextNode(calcWord));
- var calcWordElt2 = document.getElementById("calcWord2");
- while (calcWordElt2.hasChildNodes())
- calcWordElt2.removeChild(calcWordElt2.firstChild);
- calcWordElt2.appendChild(document.createTextNode(calcWord2));
- }
- function redrawHint()
- {
- setTimeout(loadHint, 10);
- }
- //--></script>
- </dp:script>
- <form style="margin:0px" name="f" method="POST" onsubmit="execute();return false;">
- <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
- <tr>
- <td width="100%" height="0%">
- <!-- dialog header -->
- <clcdlg:basic_header/>
- </td>
- </tr>
- <tr>
- <td width="100%" height="100%" valign="top">
- <lyt:layout style="2" border="no">
- <lyt:section>
- <clcdlg:calculations/>
- <dp:input>
- <dp:section1>
- <xts:string id="CALCULATION_LABEL_ORDER"/>
- </dp:section1>
- <dp:section2>
- <dp:choice>
- <dp:section1>
- <input type="radio" name="first" checked="true" onClick="javascript:onSelOperation();"/>
- </dp:section1>
- <dp:section2>
- <span id="calcWord" style="width:240px;"/>
- </dp:section2>
- <dp:section1>
- <input type="radio" name="first" onClick="javascript:onSelOperation();"/>
- </dp:section1>
- <dp:section2>
- <span id="calcWord2" style="width:240px;"/>
- </dp:section2>
- </dp:choice>
- </dp:section2>
- </dp:input>
- <xsl:if test="/root/env/param[@name='xxColCount']=1">
- <dp:input>
- <dp:section1>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='xxCalcType']='date' or /root/env/param[@name='xxCalcType']='datetime'">
- <xts:string id="CALCULATION_DATE"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCalcType']='time' or /root/env/param[@name='xxCalcType']='datetime'">
- <xts:string id="CALCULATION_TIME"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCalcType']='interval'">
- <xts:string id="CALCULATION_INTERVAL"/>
- </xsl:when>
- </xsl:choose>
- </dp:section1>
- <dp:section2>
- <table>
- <tr>
- <xsl:if test="/root/env/param[@name='xxSubstVar']='true'">
- <td>
- <input type="radio" name="inputValueRadio" checked="true"/>
- </td>
- </xsl:if>
- <td>
- <dp:choice>
- <xsl:if test="/root/env/param[@name='xxCalcType']='date' or /root/env/param[@name='xxCalcType']='datetime'">
- <dp:section1>
- <!-- Render a select date prompt-->
- <xsl:call-template name="getSelectDate">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptStartOfWeek" select="'Sunday'"/>
- <xsl:with-param name="promptCalendar" select="'Gregorian'"/>
- <xsl:with-param name="promptParameter" select="'dateparameter1'"/>
- <xsl:with-param name="promptInputOrder" select="'YMD'"/>
- <xsl:with-param name="promptDefaultDate" select="'none'"/>
- <xsl:with-param name="promptDateTime" select="'false'"/>
- <xsl:with-param name="promptMultiSelect" select="'false'"/>
- <xsl:with-param name="promptId" select="'dateTop'"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptSelectUI" select="'editBox'"/>
- </xsl:call-template>
- </dp:section1>
- <dp:section2/>
- </xsl:if>
- <xsl:if test="/root/env/param[@name='xxCalcType']='time' or /root/env/param[@name='xxCalcType']='datetime'">
- <dp:section1>
- <xsl:call-template name="getSelectTime">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptDefaultValue" select="'00:00:00.000'"/>
- <xsl:with-param name="promptParameter" select="'timeparameter1'"/>
- <xsl:with-param name="promptDisplay" select="1"/>
- <xsl:with-param name="promptInline" select="'false'"/>
- <xsl:with-param name="promptHourFormat" select="'hh'"/>
- <xsl:with-param name="promptMinuteFormat" select="'mm'"/>
- <xsl:with-param name="promptSecondFormat" select="'ss'"/>
- <xsl:with-param name="promptMultiSelect" select="'false'"/>
- <xsl:with-param name="promptId" select="'timeTop'"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptSelectUI" select="'editBox'"/>
- </xsl:call-template>
- </dp:section1>
- <dp:section2/>
- </xsl:if>
- <xsl:if test="/root/env/param[@name='xxCalcType']='interval'">
- <dp:section1>
- <xsl:call-template name="getSelectInterval">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptDefaultValue" select="''"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptShowSeconds" select="'true'"/>
- <xsl:with-param name="promptId" select="'intervalFrom'"/>
- <xsl:with-param name="promptParameter" select="'intervalparameter1'"/>
- </xsl:call-template>
- </dp:section1>
- <dp:section2/>
- </xsl:if>
- </dp:choice>
- </td>
- </tr>
- <xsl:if test="/root/env/param[@name='xxSubstVar']='true'">
- <tr>
- <td>
- <input type="radio" name="inputValueRadio"/>
- </td>
- <td>
- <table>
- <tr>
- <td valign="bottom">
- <xsl:call-template name="getTextBox">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptId" select="'stringValue'"/>
- <xsl:with-param name="promptHideText" select="'false'"/>
- <xsl:with-param name="promptMultiLine" select="'false'"/>
- <xsl:with-param name="promptParameter" select="'stringParam1'"/>
- <xsl:with-param name="promptReadOnly" select="'true'"/>
- </xsl:call-template>
- </td>
- <td id="buttonContainer"/>
- </tr>
- </table>
- </td>
- </tr>
- </xsl:if>
- </table>
- </dp:section2>
- </dp:input>
- </xsl:if>
- </lyt:section>
- <lyt:section>
- <clcdlg:calc_hint/>
- </lyt:section>
- <lyt:section/>
- </lyt:layout>
- </td>
- </tr>
- <tr>
- <td width="100%" height="0%">
- <!-- Use default buttons [ OK = execute() and CANCEL = hideDialogFrame() ] -->
- <clcdlg:buttons/>
- </td>
- </tr>
- <!-- <dbg:dumpxml select="/"/> -->
- </table>
- </form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|