filterNumRange.xts 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. BI and PM: qs
  5. (C) Copyright IBM Corp. 2001, 2017
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <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">
  13. <xts:block id="queryCM" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='xxRetrievePrompt']='true']" mandatory="false" nodelist="header, env, http, cookies, bus:biBusHeader">
  14. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  15. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  16. <xsl:template match="/">
  17. <xts:sequence>
  18. <xts:append>
  19. <xts:request asText="true" href="bus://dispatcher" protocol="BUS" responseEnvelope="false" soapAction="http://www.ibm.com/xmlns/prod/cognos/contentManagerService/201404/">
  20. <SOAP-ENV:Envelope xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  21. <SOAP-ENV:Header>
  22. <xsl:copy-of select="/root/header/bus:biBusHeader"/>
  23. </SOAP-ENV:Header>
  24. <SOAP-ENV:Body>
  25. <cm:query xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
  26. <search>
  27. <xsl:value-of select="xtsext:urldecode(string(/root/env/param[@name='xxSearchPath']))"/>
  28. </search>
  29. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[1]">
  30. <item xsi:type="">parameters</item>
  31. </properties>
  32. </cm:query>
  33. </SOAP-ENV:Body>
  34. </SOAP-ENV:Envelope>
  35. </xts:request>
  36. </xts:append>
  37. </xts:sequence>
  38. </xsl:template>
  39. </xsl:stylesheet>
  40. </xts:block>
  41. <xts:block id="appendDocument" mode="interpret" processor="XSLT" type="exec" dependency="queryCM" condition=".[/root/env/param[@name='xxRetrievePrompt']='true']" mandatory="false" nodelist="header, env, http, cookies, bus:biBusHeader, cm:queryResponse">
  42. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  43. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  44. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  45. <xsl:template match="/root">
  46. <xts:sequence>
  47. <xts:append select="/root/env">
  48. <xsl:for-each select="/root/cm:queryResponse/queryResult/item/parameters/value/item" xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
  49. <xsl:if test="/root/env/param[@name='xxFromParamName']=./name">
  50. <xsl:for-each select="./value/item/start">
  51. <param name="xxFromValue"><xsl:value-of select="./use" disable-output-escaping="yes"/></param>
  52. </xsl:for-each>
  53. </xsl:if>
  54. <xsl:if test="/root/env/param[@name='xxToParamName']=./name">
  55. <xsl:for-each select="./value/item/end">
  56. <param name="xxToValue"><xsl:value-of select="./use" disable-output-escaping="yes"/></param>
  57. </xsl:for-each>
  58. </xsl:if>
  59. <xsl:if test="/root/env/param[@name='xxToParamName']=./name">
  60. <xsl:for-each select="./value/item/use">
  61. <param name="xxFromValue"><xsl:value-of select="." disable-output-escaping="yes"/></param>
  62. <param name="xxToValue"><xsl:value-of select="." disable-output-escaping="yes"/></param>
  63. </xsl:for-each>
  64. </xsl:if>
  65. </xsl:for-each>
  66. </xts:append>
  67. </xts:sequence>
  68. </xsl:template>
  69. </xsl:stylesheet>
  70. </xts:block>
  71. <xts:block id="getLocalPrompts" mode="interpret" processor="XSLT" type="exec" dependency="queryCM" condition=".[not(/root/env/param[@name='xxRetrievePrompt'])]" mandatory="false" nodelist="header, env, http, cookies, bus:biBusHeader">
  72. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  73. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  74. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  75. <xsl:template match="/root">
  76. <xts:sequence>
  77. <xts:append select="/root/env">
  78. <xsl:for-each select="/root/env/param[@name='xxFromParamName']">
  79. <param name="xxFromParamName"><xsl:value-of select="." disable-output-escaping="yes"/></param>
  80. </xsl:for-each>
  81. <xsl:for-each select="/root/env/param[@name='xxToParamName']">
  82. <param name="xxToParamName"><xsl:value-of select="." disable-output-escaping="yes"/></param>
  83. </xsl:for-each>
  84. </xts:append>
  85. </xts:sequence>
  86. </xsl:template>
  87. </xsl:stylesheet>
  88. </xts:block>
  89. <xts:block id="appendLocalPrompts" mode="interpret" processor="XSLT" type="exec" dependency="getLocalPrompts" condition=".[not(/root/env/param[@name='xxRetrievePrompt'])]" mandatory="false" nodelist="header, env, http, cookies, bus:biBusHeader">
  90. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  91. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  92. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  93. <xsl:template match="/root">
  94. <xts:sequence>
  95. <xts:append select="/root/env">
  96. <xsl:for-each select="/root/env/param[@name='xxFromParamName']/selectChoices">
  97. <xsl:choose>
  98. <xsl:when test="./selectBoundRange/start">
  99. <param name="xxFromValue"><xsl:value-of select="./selectBoundRange/start/@useValue"/></param>
  100. </xsl:when>
  101. <xsl:when test="./selectUnboundedEndRange/start">
  102. <param name="xxFromValue"><xsl:value-of select="./selectUnboundedEndRange/start/@useValue"/></param>
  103. </xsl:when>
  104. <xsl:when test="./selectOption">
  105. <param name="xxFromValue"><xsl:value-of select="./selectOption/@useValue"/></param>
  106. </xsl:when>
  107. </xsl:choose>
  108. </xsl:for-each>
  109. <xsl:for-each select="/root/env/param[@name='xxToParamName']/selectChoices">
  110. <xsl:choose>
  111. <xsl:when test="./selectBoundRange/end">
  112. <param name="xxToValue"><xsl:value-of select="./selectBoundRange/end/@useValue"/></param>
  113. </xsl:when>
  114. <xsl:when test="./selectUnboundedStartRange/end">
  115. <param name="xxToValue"><xsl:value-of select="./selectUnboundedStartRange/end/@useValue"/></param>
  116. </xsl:when>
  117. <xsl:when test="./selectOption">
  118. <param name="xxToValue"><xsl:value-of select="./selectOption/@useValue"/></param>
  119. </xsl:when>
  120. </xsl:choose>
  121. </xsl:for-each>
  122. </xts:append>
  123. </xts:sequence>
  124. </xsl:template>
  125. </xsl:stylesheet>
  126. </xts:block>
  127. <xts:block id="page" type="exec" mode="output" processor="XSLT" mimeType="text/html" dependency="appendDocument appendLocalPrompts" nodelist="env, debug, http, command, system, session, user, actions, tabs, configProps, credential, cookies, setCookies, accountOptions, newSession, gatewayURI, cm:queryResponse, objectClass, prompting">
  128. <!-- get the debug logic sheet -->
  129. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  130. <!-- get the new theme stuff -->
  131. <xts:logicsheet path="qs/logicsheets/filter_theme.xsl"/>
  132. <xts:logicsheet path="logicsheets/portal.xsl"/>
  133. <xts:logicsheet path="qs/logicsheets/dialogs.xsl"/>
  134. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  135. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  136. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  137. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  138. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  139. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  140. <!-- apply the form logic -->
  141. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  142. <xsl:stylesheet version="1.0" xmlns:filterdlg="test_filterDlg" 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:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:qsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/" exclude-result-prefixes="xsl xts lyt pf dp df cp cf dbg xtsext qsdlg">
  143. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  144. <!-- Default variables (like skin) and prompt variables -->
  145. <qsdlg:variables/>
  146. <qsdlg:promptVariables/>
  147. <!-- Prompt Control XSL include -->
  148. <xsl:include href="p_include.xsl"/>
  149. <!-- add any theme variables -->
  150. <df:variables/>
  151. <pf:variables/>
  152. <!-- start the output -->
  153. <xsl:template match="/root">
  154. <!--Get HTML output for the HEAD section -->
  155. <dp:page>
  156. <dp:script>
  157. <xsl:call-template name="getPromptCommonIncludes"/>
  158. <xsl:call-template name="gettextBoxIncludes">
  159. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  160. <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
  161. </xsl:call-template>
  162. <link href="{$qsdlgskin}/qs/QSRVDialog.css" type="text/css" rel="stylesheet"/>
  163. <script type="text/javascript">
  164. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/layout.js</xsl:attribute>
  165. <xsl:text/>//<xsl:text/>
  166. </script>
  167. <script type="text/javascript">
  168. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/dialogs/filterDialog.js</xsl:attribute>
  169. <xsl:text/>//<xsl:text/>
  170. </script>
  171. <script type="text/javascript">
  172. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/rv/cvConstants.js</xsl:attribute>
  173. <xsl:text/>//<xsl:text/>
  174. </script>
  175. <script type="text/javascript">
  176. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/rv/common.js</xsl:attribute>
  177. <xsl:text/>//<xsl:text/>
  178. </script>
  179. <script type="text/javascript">
  180. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/rv/cvui.js</xsl:attribute>
  181. <xsl:text/>//<xsl:text/>
  182. </script>
  183. <script type="text/javascript">
  184. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/framework/notification/CObserver.js</xsl:attribute>
  185. <xsl:text/>//<xsl:text/>
  186. </script>
  187. <script type="text/javascript">
  188. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CDialogManager.js</xsl:attribute>
  189. <xsl:text/>//<xsl:text/>
  190. </script>
  191. <script type="text/javascript">
  192. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CWindowManager.js</xsl:attribute>
  193. <xsl:text/>//<xsl:text/>
  194. </script>
  195. <script type="text/javascript">&lt;!--
  196. var goDialogManager = new CDialogManager();
  197. var cf = getConfigFrame();
  198. var onlyPrompt = false;
  199. var complexFilterType = "numeric";
  200. var substVarValueFrom = null;
  201. var substVarValueTo = null;
  202. var sFILTER_NUMBER_LOWEST = "<xts:string id="FILTER_NUMBER_LOWEST" encode="javascript"/>";
  203. var sFILTER_NUMBER_HIGHEST = "<xts:string id="FILTER_NUMBER_HIGHEST" encode="javascript"/>";
  204. function execute() { filterNumRange_execute(); }
  205. function buildFilterExpression() { return filterNumRange_buildFilterExpression(); }
  206. <filterdlg:update_value_field numeric="true"/>
  207. function init()
  208. {
  209. var oOptions = {};
  210. <xsl:if test="/root/env/param[@name='xxFromParamName' or @name='xxToParamName']">
  211. oOptions.bPrompt = true;
  212. </xsl:if>
  213. filterNumRange_init(oOptions);
  214. <xsl:if test="/root/env/param[@name='xxSubstVar']='true'">
  215. <filterdlg:subst_var_button numeric="true"/>
  216. //hide the text boxes for the substitution variable constants
  217. document.getElementById("textBoxStringFrom").style.display = "none";
  218. document.getElementById("textBoxStringTo").style.display = "none";
  219. </xsl:if>
  220. }
  221. //--&gt;</script>
  222. </dp:script>
  223. <form style="margin:0px" name="f" method="POST" onsubmit="execute();return false;">
  224. <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
  225. <tr>
  226. <td width="100%" height="0%">
  227. <!-- dialog header -->
  228. <dp:header help="false">
  229. <!-- header titles -->
  230. <dp:title>
  231. <xts:string id="FILTER_TITLE"/>
  232. </dp:title>
  233. <!-- close link for the header -->
  234. <dp:close>
  235. <a href="javascript:this.cancelDialog()">
  236. <dp:closeMarker/>
  237. </a>
  238. </dp:close>
  239. <!-- description (hint text) -->
  240. <dp:description>
  241. <xts:string id="FILTER_NUMSUM_DESCRIPTION"/>
  242. </dp:description>
  243. </dp:header>
  244. </td>
  245. </tr>
  246. <tr>
  247. <td width="100%" height="100%" valign="top">
  248. <lyt:layout style="2" border="no">
  249. <lyt:section>
  250. <dp:input>
  251. <dp:section1>
  252. <xts:string id="FILTER_ON"/>
  253. </dp:section1>
  254. <dp:section2>
  255. <xsl:attribute name="id">colName</xsl:attribute>
  256. </dp:section2>
  257. </dp:input>
  258. </lyt:section>
  259. <lyt:section>
  260. <qsdlg:promptBox/>
  261. </lyt:section>
  262. </lyt:layout>
  263. <lyt:layout style="1" border="no" joinSection="true">
  264. <lyt:section>
  265. <qsdlg:conditionBox/>
  266. <dp:choice>
  267. <dp:section1 type="label">
  268. <xts:string id="FILTER_FROM"/>
  269. </dp:section1>
  270. <dp:section2>
  271. <table>
  272. <tr>
  273. <td>
  274. <input type="radio" name="fromValue">
  275. <xsl:if test="/root/env/param[@name='xxFromValue']!=''">
  276. <xsl:attribute name="checked">true</xsl:attribute>
  277. </xsl:if>
  278. </input>
  279. </td>
  280. <td id="textBoxNumericFrom" valign="bottom">
  281. <xsl:variable name="defValFrom">
  282. <xsl:choose>
  283. <xsl:when test="/root/env/param[@name='xxPercentValueFrom'] != ''">
  284. <xsl:value-of select="/root/env/param[@name='xxPercentValueFrom']"/>
  285. </xsl:when>
  286. <xsl:otherwise>
  287. <xsl:if test="/root/env/param[@name='xxFromValue']!=''">
  288. <!--
  289. To multiply by 100, we used *1000/10 to prevent floating point issues.
  290. Otherwise, 0.55*100 = 55.00000000000001
  291. -->
  292. <xsl:value-of select="translate(/root/env/param[@name='xxFromValue'],',','.') * 1000 div 10"/>
  293. </xsl:if>
  294. </xsl:otherwise>
  295. </xsl:choose>
  296. </xsl:variable>
  297. <xsl:choose>
  298. <xsl:when test="/root/env/param[@name='xxIsPercent']='true'">
  299. <xsl:call-template name="getTextBox">
  300. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  301. <xsl:with-param name="promptFormName" select="$promptFormName"/>
  302. <xsl:with-param name="promptRequired" select="'false'"/>
  303. <xsl:with-param name="promptHideText" select="'false'"/>
  304. <xsl:with-param name="promptDefaultValue" select="$defValFrom"/>
  305. <xsl:with-param name="promptDataType" select="'percentage'"/>
  306. <xsl:with-param name="promptMultiLine" select="'false'"/>
  307. <xsl:with-param name="promptParameter" select="'parameterFrom'"/>
  308. <xsl:with-param name="promptId" select="'textBoxFrom'"/>
  309. <xsl:with-param name="suppressDisabled" select="'true'"/>
  310. <xsl:with-param name="promptMaxLength" select="'15'"/>
  311. </xsl:call-template>
  312. </xsl:when>
  313. <xsl:otherwise>
  314. <xsl:variable name="defDataType">
  315. <xsl:choose>
  316. <xsl:when test="/root/env/param[@name='xxIntegerNumeric']='true'">integer</xsl:when>
  317. <xsl:otherwise>number</xsl:otherwise>
  318. </xsl:choose>
  319. </xsl:variable>
  320. <xsl:call-template name="getTextBox">
  321. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  322. <xsl:with-param name="promptFormName" select="$promptFormName"/>
  323. <xsl:with-param name="promptRequired" select="'false'"/>
  324. <xsl:with-param name="promptHideText" select="'false'"/>
  325. <xsl:with-param name="promptDefaultValue" select="/root/env/param[@name='xxFromValue']"/>
  326. <xsl:with-param name="promptDataType" select="$defDataType"/>
  327. <xsl:with-param name="promptMultiLine" select="'false'"/>
  328. <xsl:with-param name="promptParameter" select="'parameterFrom'"/>
  329. <xsl:with-param name="promptId" select="'textBoxFrom'"/>
  330. <xsl:with-param name="suppressDisabled" select="'true'"/>
  331. <xsl:with-param name="promptMaxLength" select="'15'"/>
  332. </xsl:call-template>
  333. </xsl:otherwise>
  334. </xsl:choose>
  335. </td>
  336. <xsl:if test="/root/env/param[@name='xxSubstVar']='true'">
  337. <td id="textBoxStringFrom" valign="bottom">
  338. <xsl:call-template name="getTextBox">
  339. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  340. <xsl:with-param name="promptFormName" select="$promptFormName"/>
  341. <xsl:with-param name="promptRequired" select="'false'"/>
  342. <xsl:with-param name="promptHideText" select="'false'"/>
  343. <xsl:with-param name="promptMultiLine" select="'false'"/>
  344. <xsl:with-param name="promptParameter" select="'parameterFrom2'"/>
  345. <xsl:with-param name="promptId" select="'textBoxStringFrom'"/>
  346. <xsl:with-param name="promptReadOnly" select="'true'"/>
  347. </xsl:call-template>
  348. </td>
  349. <td id="buttonContainer1"/>
  350. </xsl:if>
  351. </tr>
  352. </table>
  353. </dp:section2>
  354. <dp:section3>
  355. <table>
  356. <tr>
  357. <td>
  358. <input type="radio" name="fromValue" value="lowest">
  359. <xsl:if test="not(/root/env/param[@name='xxFromValue'])">
  360. <xsl:attribute name="checked">true</xsl:attribute>
  361. </xsl:if>
  362. </input>
  363. </td>
  364. <td class="formText">
  365. <img width="10">
  366. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/images/spacer.gif</xsl:attribute>
  367. </img>
  368. <xts:string id="FILTER_LOWEST_VALUE"/>
  369. </td>
  370. </tr>
  371. </table>
  372. </dp:section3>
  373. <dp:section1>&#160;</dp:section1>
  374. <dp:section2>&#160;</dp:section2>
  375. <dp:section1 type="label">
  376. <xts:string id="FILTER_TO"/>
  377. </dp:section1>
  378. <dp:section2>
  379. <table>
  380. <tr>
  381. <td>
  382. <input type="radio" name="toValue">
  383. <xsl:if test="/root/env/param[@name='xxToValue']!=''">
  384. <xsl:attribute name="checked">true</xsl:attribute>
  385. </xsl:if>
  386. </input>
  387. </td>
  388. <td id="textBoxNumericTo" valign="bottom">
  389. <xsl:variable name="defValTo">
  390. <xsl:choose>
  391. <xsl:when test="/root/env/param[@name='xxPercentValueTo'] != ''">
  392. <xsl:value-of select="/root/env/param[@name='xxPercentValueTo']"/>
  393. </xsl:when>
  394. <xsl:otherwise>
  395. <xsl:if test="/root/env/param[@name='xxToValue']!=''">
  396. <!--
  397. To multiply by 100, we used *1000/10 to prevent floating point issues.
  398. Otherwise, 0.55*100 = 55.00000000000001
  399. -->
  400. <xsl:value-of select="translate(/root/env/param[@name='xxToValue'],',','.') * 1000 div 10"/>
  401. </xsl:if>
  402. </xsl:otherwise>
  403. </xsl:choose>
  404. </xsl:variable>
  405. <xsl:choose>
  406. <xsl:when test="/root/env/param[@name='xxIsPercent']='true'">
  407. <xsl:call-template name="getTextBox">
  408. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  409. <xsl:with-param name="promptFormName" select="$promptFormName"/>
  410. <xsl:with-param name="promptRequired" select="'false'"/>
  411. <xsl:with-param name="promptHideText" select="'falvse'"/>
  412. <xsl:with-param name="promptDefaultValue" select="$defValTo"/>
  413. <xsl:with-param name="promptDataType" select="'percentage'"/>
  414. <xsl:with-param name="promptMultiLine" select="'false'"/>
  415. <xsl:with-param name="promptParameter" select="'parameterTo'"/>
  416. <xsl:with-param name="promptId" select="'textBoxTo'"/>
  417. <xsl:with-param name="suppressDisabled" select="'true'"/>
  418. <xsl:with-param name="promptMaxLength" select="'15'"/>
  419. </xsl:call-template>
  420. </xsl:when>
  421. <xsl:otherwise>
  422. <xsl:variable name="defDataType">
  423. <xsl:choose>
  424. <xsl:when test="/root/env/param[@name='xxIntegerNumeric']='true'">integer</xsl:when>
  425. <xsl:otherwise>number</xsl:otherwise>
  426. </xsl:choose>
  427. </xsl:variable>
  428. <xsl:call-template name="getTextBox">
  429. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  430. <xsl:with-param name="promptFormName" select="$promptFormName"/>
  431. <xsl:with-param name="promptRequired" select="'false'"/>
  432. <xsl:with-param name="promptHideText" select="'false'"/>
  433. <xsl:with-param name="promptDefaultValue" select="/root/env/param[@name='xxToValue']"/>
  434. <xsl:with-param name="promptDataType" select="$defDataType"/>
  435. <xsl:with-param name="promptMultiLine" select="'false'"/>
  436. <xsl:with-param name="promptParameter" select="'parameterTo'"/>
  437. <xsl:with-param name="promptId" select="'textBoxTo'"/>
  438. <xsl:with-param name="suppressDisabled" select="'true'"/>
  439. <xsl:with-param name="promptMaxLength" select="'15'"/>
  440. </xsl:call-template>
  441. </xsl:otherwise>
  442. </xsl:choose>
  443. </td>
  444. <xsl:if test="/root/env/param[@name='xxSubstVar']='true'">
  445. <td id="textBoxStringTo" valign="bottom">
  446. <xsl:call-template name="getTextBox">
  447. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  448. <xsl:with-param name="promptFormName" select="$promptFormName"/>
  449. <xsl:with-param name="promptRequired" select="'false'"/>
  450. <xsl:with-param name="promptHideText" select="'false'"/>
  451. <xsl:with-param name="promptMultiLine" select="'false'"/>
  452. <xsl:with-param name="promptParameter" select="'parameterTo2'"/>
  453. <xsl:with-param name="promptId" select="'textBoxStringTo'"/>
  454. <xsl:with-param name="promptReadOnly" select="'true'"/>
  455. </xsl:call-template>
  456. </td>
  457. <td id="buttonContainer2"/>
  458. </xsl:if>
  459. </tr>
  460. </table>
  461. </dp:section2>
  462. <dp:section3>
  463. <table>
  464. <tr>
  465. <td>
  466. <input type="radio" name="toValue" value="highest">
  467. <xsl:if test="not(/root/env/param[@name='xxToValue'])">
  468. <xsl:attribute name="checked">true</xsl:attribute>
  469. </xsl:if>
  470. </input>
  471. </td>
  472. <td class="formText">
  473. <img width="10">
  474. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/images/spacer.gif</xsl:attribute>
  475. </img>
  476. <xts:string id="FILTER_HIGHEST_VALUE"/>
  477. </td>
  478. </tr>
  479. </table>
  480. </dp:section3>
  481. </dp:choice>
  482. </lyt:section>
  483. </lyt:layout>
  484. <lyt:layout style="1" border="no" joinSection="true">
  485. <lyt:section>
  486. <qsdlg:nullOptions/>
  487. <qsdlg:filterBasedOnDSBox/>
  488. </lyt:section>
  489. </lyt:layout>
  490. </td>
  491. </tr>
  492. <tr>
  493. <td width="100%" height="0%">
  494. <!-- Use default buttons [ OK = execute() and CANCEL = hideDialogFrame() ] -->
  495. <qsdlg:defaultButtons/>
  496. </td>
  497. </tr>
  498. <!-- <dbg:dumpxml select="/"/> -->
  499. </table>
  500. </form>
  501. </dp:page>
  502. </xsl:template>
  503. </xsl:stylesheet>
  504. </xts:block>
  505. </xts:morphlet>