sort.xts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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 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="page" type="exec" mode="output" processor="XSLT" mimeType="text/html">
  14. <!-- get the debug logic sheet -->
  15. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  16. <!-- get the new theme stuff -->
  17. <xts:logicsheet path="logicsheets/portal.xsl"/>
  18. <xts:logicsheet path="qs/logicsheets/dialogIncludes.xsl"/>
  19. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  20. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  21. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  22. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  23. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  24. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  25. <!-- apply the form logic -->
  26. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  27. <xsl:stylesheet version="1.0" 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:qsdialog="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts lyt pf dp df cp cf dbg qsdialog xtsext">
  28. <xsl:import href="qs/logicsheets/markupTemplates.xsl"/>
  29. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  30. <!-- add any theme variables -->
  31. <df:variables/>
  32. <pf:variables/>
  33. <!-- start the output -->
  34. <xsl:template match="/root">
  35. <dp:page>
  36. <dp:script>
  37. <qsdialog:headerIncludes dlgSize="280" featureName="Sort" setupParameters="env"/>
  38. <script type="text/javascript">
  39. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/dialogs/sort.js</xsl:attribute>
  40. <xsl:text/>//<xsl:text/>
  41. </script>
  42. </dp:script>
  43. <form style="margin:0px" name="f" method="POST" onsubmit="return false;">
  44. <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
  45. <tr>
  46. <td width="100%" height="0%">
  47. <!-- dialog header -->
  48. <dp:header help="false">
  49. <!-- header titles -->
  50. <dp:title>
  51. <xts:string id="SORT_TITLE"/>
  52. </dp:title>
  53. <!-- close link for the header -->
  54. <dp:close>
  55. <a href="javascript:goDialogManager.getWindowManager().hideDialogFrame()">
  56. <dp:closeMarker/>
  57. </a>
  58. </dp:close>
  59. <!-- description (hint text) -->
  60. <dp:description>
  61. <xts:string id="SORT_DESCRIPTION"/>
  62. </dp:description>
  63. </dp:header>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td width="100%" height="100%" valign="top">
  68. <!-- layout -->
  69. <lyt:layout style="2" border="no">
  70. <lyt:section>
  71. <dp:input>
  72. <dp:section1>
  73. <xts:string id="SORT_ON"/>
  74. </dp:section1>
  75. <dp:section2>
  76. <xsl:attribute name="id">colNameText</xsl:attribute>
  77. </dp:section2>
  78. </dp:input>
  79. <br/>
  80. <div id="displayNumeric" style="display:none">
  81. <dp:choice title="SORT_ORDER">
  82. <!-- numeric sort -->
  83. <dp:section1>
  84. <input type="radio" name="numericOrder" value="A" onMouseDown="setState(true);">
  85. <xsl:if test="/root/env/param[@name='currentSortOrder']='a'">
  86. <xsl:attribute name="checked">true</xsl:attribute>
  87. </xsl:if>
  88. </input>
  89. </dp:section1>
  90. <dp:section2>
  91. <xts:string id="SORT_ASC_NUM"/>
  92. </dp:section2>
  93. <dp:section1>
  94. <input type="radio" name="numericOrder" value="D" onMouseDown="setState(true);">
  95. <xsl:if test="/root/env/param[@name='currentSortOrder']='d'">
  96. <xsl:attribute name="checked">true</xsl:attribute>
  97. </xsl:if>
  98. </input>
  99. </dp:section1>
  100. <dp:section2>
  101. <xts:string id="SORT_DES_NUM"/>
  102. </dp:section2>
  103. <dp:section1>
  104. <input type="radio" name="numericOrder" value="N" onMouseDown="setState(false);">
  105. <xsl:if test="/root/env/param[@name='currentSortOrder']=''">
  106. <xsl:attribute name="checked">true</xsl:attribute>
  107. </xsl:if>
  108. </input>
  109. </dp:section1>
  110. <dp:section2>
  111. <xts:string id="SORT_NOSORT"/>
  112. </dp:section2>
  113. </dp:choice>
  114. </div>
  115. <div id="displayAlphanumeric" style="display:none">
  116. <dp:choice title="SORT_ORDER">
  117. <!-- alphanumeric sort -->
  118. <dp:section1>
  119. <input type="radio" name="alphaOrder" value="A" onMouseDown="setState(true);">
  120. <xsl:if test="/root/env/param[@name='currentSortOrder']='a'">
  121. <xsl:attribute name="checked">true</xsl:attribute>
  122. </xsl:if>
  123. </input>
  124. </dp:section1>
  125. <dp:section2>
  126. <xts:string id="SORT_ASC_ALPHA"/>
  127. </dp:section2>
  128. <dp:section1>
  129. <input type="radio" name="alphaOrder" value="D" onMouseDown="setState(true);">
  130. <xsl:if test="/root/env/param[@name='currentSortOrder']='d'">
  131. <xsl:attribute name="checked">true</xsl:attribute>
  132. </xsl:if>
  133. </input>
  134. </dp:section1>
  135. <dp:section2>
  136. <xts:string id="SORT_DES_ALPHA"/>
  137. </dp:section2>
  138. <dp:section1>
  139. <input type="radio" name="alphaOrder" value="N" onMouseDown="setState(false);">
  140. <xsl:if test="/root/env/param[@name='currentSortOrder']=''">
  141. <xsl:attribute name="checked">true</xsl:attribute>
  142. </xsl:if>
  143. </input>
  144. </dp:section1>
  145. <dp:section2>
  146. <xts:string id="SORT_NOSORT"/>
  147. </dp:section2>
  148. </dp:choice>
  149. </div>
  150. <div id="displayOther" style="display:none">
  151. <dp:choice title="SORT_ORDER">
  152. <!-- other sort -->
  153. <dp:section1>
  154. <input type="radio" name="otherOrder" value="A" onMouseDown="setState(true);">
  155. <xsl:if test="/root/env/param[@name='currentSortOrder']='a'">
  156. <xsl:attribute name="checked">true</xsl:attribute>
  157. </xsl:if>
  158. </input>
  159. </dp:section1>
  160. <dp:section2>
  161. <xts:string id="SORT_ASC"/>
  162. </dp:section2>
  163. <dp:section1>
  164. <input type="radio" name="otherOrder" value="D" onMouseDown="setState(true);">
  165. <xsl:if test="/root/env/param[@name='currentSortOrder']='d'">
  166. <xsl:attribute name="checked">true</xsl:attribute>
  167. </xsl:if>
  168. </input>
  169. </dp:section1>
  170. <dp:section2>
  171. <xts:string id="SORT_DES"/>
  172. </dp:section2>
  173. <dp:section1>
  174. <input type="radio" name="otherOrder" value="N" onMouseDown="setState(false);">
  175. <xsl:if test="/root/env/param[@name='currentSortOrder']=''">
  176. <xsl:attribute name="checked">true</xsl:attribute>
  177. </xsl:if>
  178. </input>
  179. </dp:section1>
  180. <dp:section2>
  181. <xts:string id="SORT_NOSORT"/>
  182. </dp:section2>
  183. </dp:choice>
  184. </div>
  185. </lyt:section>
  186. <lyt:section>
  187. <div id="displayBasedOn" style="display:none">
  188. <dp:choice title="SORT_BASED_ON">
  189. <dp:section1>
  190. <input type="radio" name="details" value="t" checked="checked" onclick="changeSummaryState(false)"/>
  191. </dp:section1>
  192. <dp:section2>
  193. <div id="detailsOnly">
  194. <xsl:if test="/root/env/param[@name='currentSortOrder']=''">
  195. <xsl:attribute name="class">clsTextDisable</xsl:attribute>
  196. </xsl:if>
  197. <xts:string id="SORT_DETAILS_ONLY"/>
  198. </div>
  199. </dp:section2>
  200. <dp:section1>
  201. <input type="radio" name="details" value="f" onclick="changeSummaryState(true)">
  202. <xsl:if test="/root/env/param[@name='currentSortByIndex']">
  203. <xsl:attribute name="checked">true</xsl:attribute>
  204. </xsl:if>
  205. </input>
  206. </dp:section1>
  207. <dp:section2>
  208. <div id="summariesOf">
  209. <xsl:if test="/root/env/param[@name='currentSortOrder']=''">
  210. <xsl:attribute name="class">clsTextDisable</xsl:attribute>
  211. </xsl:if>
  212. <xts:string id="SORT_SUMMARIES_OF"/>
  213. </div>
  214. </dp:section2>
  215. <dp:section3>
  216. <select name="summary">
  217. <xsl:if test="not(/root/env/param[@name='currentSortByIndex'])">
  218. <xsl:attribute name="disabled">true</xsl:attribute>
  219. </xsl:if>
  220. <!-- Add an 'All' option if there is more than one group available -->
  221. <xsl:if test="/root/env/param[@name='includeAllOption']">
  222. <option value="-1"><xts:string id="DIALOG_ALL"/></option>
  223. </xsl:if>
  224. </select>
  225. </dp:section3>
  226. </dp:choice>
  227. </div>
  228. </lyt:section>
  229. </lyt:layout>
  230. </td>
  231. </tr>
  232. <tr>
  233. <td width="100%" height="0%">
  234. <!-- Use default buttons [ OK = execute() and CANCEL = hideDialogFrame() ] -->
  235. <qsdialog:defaultButtons/>
  236. </td>
  237. </tr>
  238. <!-- <dbg:dumpxml select="/"/> -->
  239. </table>
  240. </form>
  241. </dp:page>
  242. </xsl:template>
  243. </xsl:stylesheet>
  244. </xts:block>
  245. </xts:morphlet>