condStylesSearch.xts 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <xts:morphlet resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio, canUseQueryStudioAdvancedMode">
  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:block id="format" type="exec" mode="output" processor="XSLT" mimeType="text/html">
  13. <!-- get the debug logic sheet -->
  14. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  15. <!-- get the new theme stuff -->
  16. <xts:logicsheet path="logicsheets/portal.xsl"/>
  17. <xts:logicsheet path="qs/logicsheets/dialogs.xsl"/>
  18. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  19. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  20. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  21. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  22. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  23. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  24. <!-- apply the form logic -->
  25. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  26. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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="xsl xts lyt pf dp df cp cf dbg qsdlg xtsext">
  27. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  28. <!-- Default variables (like skin) and prompt variables -->
  29. <qsdlg:variables/>
  30. <qsdlg:promptVariables/>
  31. <!-- Prompt Control XSL include -->
  32. <xsl:include href="p_include.xsl"/>
  33. <!-- add any theme variables -->
  34. <df:variables/>
  35. <pf:variables/>
  36. <!-- start the output -->
  37. <xsl:template match="/root">
  38. <!--Get HTML output for the HEAD section -->
  39. <dp:page>
  40. <dp:script>
  41. <xsl:call-template name="getPromptCommonIncludes"/>
  42. <xsl:call-template name="getselectWithSearchIncludes">
  43. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  44. <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
  45. </xsl:call-template>
  46. <link rel="stylesheet" type="text/css" href="{$qsdlgskin}/qs/QSRVDialog.css" />
  47. <script type="text/javascript">
  48. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/layout.js</xsl:attribute>
  49. <xsl:text/>//<xsl:text/>
  50. </script>
  51. <script type="text/javascript">
  52. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/dialogs/filterDialog.js</xsl:attribute>
  53. <xsl:text/>//<xsl:text/>
  54. </script>
  55. <script type="text/javascript">
  56. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CDialogManager.js</xsl:attribute>
  57. <xsl:text/>//<xsl:text/>
  58. </script>
  59. <script type="text/javascript">
  60. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CWindowManager.js</xsl:attribute>
  61. <xsl:text/>//<xsl:text/>
  62. </script>
  63. <script type="text/javascript">&lt;!--
  64. var goDialogManager = new CDialogManager();
  65. var cf = getConfigFrame();
  66. var onlyPrompt = false;
  67. var promptsRetrieved = false;
  68. var complexFilterType = "selectWithSearch";
  69. function cancelDialog()
  70. {
  71. getConfigFrame().hideCModal();
  72. }
  73. function execute()
  74. {
  75. var fct = getConfigFrame().dlgGlobalGetParm("csCALLBACK");
  76. var param = new Array();
  77. for (i = 0; i &lt; searchpSearch.m_oLstChoices.length; i++)
  78. {
  79. var value = searchpSearch.m_oLstChoices.options[i].value;
  80. var text = searchpSearch.m_oLstChoices.options[i].text;
  81. param[param.length] = new Array(value,text);
  82. }
  83. if (typeof fct == "function") {
  84. fct(param,getNullOption());
  85. }
  86. getConfigFrame().hideCModal();
  87. }
  88. function invokePickDlg(sNullOption)
  89. {
  90. var cf = getConfigFrame();
  91. cf.dlgSetParm("m", "/" + cf.qs_dir + "/condStylesPickList.xts");
  92. <!--
  93. // we disable the Null Option ui for conditional styles.
  94. // it will interfere with Xtab's styling solution
  95. cf.dlgGlobalSetParm('xxIsNullAllowed', true);
  96. cf.dlgGlobalSetParm('xxNullOption', sNullOption);
  97. -->
  98. cf.showModal("<xts:string id="COND_STYLE_PICKLIST_TITLE" encode="javascript"/>", "<xts:string id="CLOSE" encode="javascript"/>", 300, 350);
  99. }
  100. function invokeTypeDlg(sNullOption)
  101. {
  102. var cf = getConfigFrame();
  103. cf.dlgSetParm("m", "/" + cf.qs_dir + "/condStylesEditBox.xts");
  104. <!--
  105. // we disable the Null Option ui for conditional styles.
  106. // it will interfere with Xtab's styling solution
  107. cf.dlgGlobalSetParm('xxIsNullAllowed', true);
  108. cf.dlgGlobalSetParm('xxNullOption', sNullOption);
  109. -->
  110. cf.showModal("<xts:string id="COND_STYLE_PICKER_TYPE_TITLE" encode="javascript"/>", "<xts:string id="CLOSE" encode="javascript"/>", 525, 325);
  111. }
  112. function init()
  113. {
  114. document.body.className = 'body_dialog_modal';
  115. initNullOptions();
  116. if (searchpSearch.m_oLstChoices.options.length == 0)
  117. {
  118. var uv = null; // for use value
  119. var dv = null; // for display value
  120. if (cf.dlgGlobalGetParm("xxPickListIsLoaded") != true)
  121. {
  122. for (var j = 0; j &lt; cf.dlgGlobalSize("xxPickList"); j++) {
  123. uv = fd_getUseValue(cf.dlgGlobalGetParmAt("xxPickList", j));
  124. dv = fd_getDisplayValue(cf.dlgGlobalGetParmAt("xxPickList", j));
  125. searchpSearch.addNoUpdate(dv, uv);
  126. }
  127. }
  128. searchpSearch.update();
  129. cf.dlgGlobalSetParm("xxPickListIsLoaded", true);
  130. }
  131. document.f._sws_pSearch_searchValue.focus();
  132. sendSearchRequest(true);
  133. }
  134. //--&gt;</script>
  135. </dp:script>
  136. <form class="body_dialog_modal" style="margin:0px" name="f" method="POST" onSubmit="execute();return false;">
  137. <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
  138. <tr>
  139. <td width="100%" height="0%">
  140. <table border="0" width="100%" cellspacing="0" cellpadding="0" style="padding-left:5px;">
  141. <tr>
  142. <td width="10" valign="middle">
  143. <img width="10">
  144. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/common/images/spacer.gif</xsl:attribute>
  145. </img>
  146. </td>
  147. <td align="right" valign="top">
  148. <table border="0" cellpadding="0" cellspacing="0"><tr>
  149. <td valign="top" nowrap="nowrap" class="dialogHeaderLink" align="right">
  150. <a href="javascript:invokePickDlg(getNullOption())">
  151. <xts:string id="FILTER_PICK_VALUES"/>
  152. </a>
  153. </td>
  154. <xsl:if test="not(contains(' level hierarchy ',concat(' ',/root/env/param[@name='xxDataType'],' ')))">
  155. <td valign="top" nowrap="nowrap" class="dialogHeaderLink" align="right">
  156. <a href="javascript:invokeTypeDlg(getNullOption())">
  157. <xts:string id="FILTER_TYPE_IN_VALUES"/>
  158. </a>
  159. </td>
  160. </xsl:if>
  161. </tr></table>
  162. </td></tr>
  163. </table>
  164. </td>
  165. </tr>
  166. <tr>
  167. <td width="100%" height="100%" valign="top">
  168. <lyt:layout style="1" border="no">
  169. <lyt:section>
  170. <dp:input>
  171. <dp:section1>
  172. <xsl:call-template name="getSelectWithSearch">
  173. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  174. <xsl:with-param name="promptFormName" select="$promptFormName"/>
  175. <xsl:with-param name="promptRequired" select="'false'"/>
  176. <xsl:with-param name="promptMultiSelect" select="'true'"/>
  177. <xsl:with-param name="promptHideAdornments" select="'false'"/>
  178. <xsl:with-param name="promptSubmitType" select="'XML'"/>
  179. <xsl:with-param name="promptParameter" select="'searchEngine'"/>
  180. <xsl:with-param name="promptId" select="'pSearch'"/>
  181. <xsl:with-param name="promptSearchFunction" select="'sendSearchRequest'"/>
  182. </xsl:call-template>
  183. </dp:section1>
  184. </dp:input>
  185. </lyt:section>
  186. </lyt:layout>
  187. <qsdlg:nullOptions/>
  188. </td>
  189. </tr>
  190. </table>
  191. </form>
  192. </dp:page>
  193. </xsl:template>
  194. </xsl:stylesheet>
  195. </xts:block>
  196. </xts:morphlet>