search.xsl 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2015
  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. <xsl:stylesheet version="1.0"
  13. xmlns:out="dummy-uri"
  14. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  15. xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
  16. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  17. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  18. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  19. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  20. xmlns:sos="http://developer.cognos.com/schemas/xts/logicsheets/xslt/sos/"
  21. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  22. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  23. xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="lyt">
  24. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  25. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  26. <xsl:template match="sos:search-panel">
  27. <out:variable name="scope" select="string(key('env-param','sscope'))"/>
  28. <out:variable name="stype" select="string(key('env-param','stype'))"/>
  29. <out:variable name="stype_is" select="string(key('env-param','stype_is'))"/> <!-- index search search type -->
  30. <out:variable name="modified" select="string(key('env-param','smodified'))"/>
  31. <out:variable name="smethod" select="string(key('env-param','smethod'))"/>
  32. <out:variable name="searchMode"> <!-- {basic | index} search -->
  33. <out:choose>
  34. <out:when test="not(key('spec-item','modes')/search/contents/param[@name='index'])">
  35. <out:value-of select="'basic'"/> <!-- no index search for this page, fix it to basic -->
  36. </out:when>
  37. <out:otherwise>
  38. <out:choose>
  39. <out:when test="$userCanUseIndexSearch">
  40. <out:choose>
  41. <out:when test="string(key('env-param','sfield')) = 'k' or string(key('env-param','sfield')) = ''">
  42. <out:value-of select="'index'"/>
  43. </out:when>
  44. <out:otherwise>
  45. <out:value-of select="'basic'"/>
  46. </out:otherwise>
  47. </out:choose>
  48. </out:when>
  49. <out:otherwise>
  50. <out:value-of select="'basic'"/> <!-- user has no index search capability, fix it to basic -->
  51. </out:otherwise>
  52. </out:choose>
  53. </out:otherwise>
  54. </out:choose>
  55. </out:variable>
  56. <out:variable name="field">
  57. <out:choose>
  58. <out:when test="string(key('env-param','sfield')) != ''"><out:value-of select="string(key('env-param','sfield'))"/></out:when>
  59. <out:when test="$searchMode = 'index'">k</out:when>
  60. <out:otherwise>n</out:otherwise>
  61. </out:choose>
  62. </out:variable>
  63. <out:variable name="stext" select="string(key('env-param','stext'))"/>
  64. <script language="javascript">
  65. <!-- preload source for search icon animation -->
  66. var imgAnimatedSearch = new Image();
  67. imgAnimatedSearch.src = "<out:value-of select="$image_root"/>action_search_ani.gif";
  68. function doSearch()
  69. {
  70. if (document.pform["<out:value-of select="$navigationIdInput"/>"] &amp;&amp;
  71. document.pform["<out:value-of select="$navigationIdInput"/>"].value == '') {
  72. document.pform["<out:value-of select="$navigationIdInput"/>"].value = "<out:value-of select="xtsext:javascriptencode($navigationId)"/>";
  73. }
  74. <!-- Clear the nav search context to reset search, if any -->
  75. if (document.pform["m_context"]) {
  76. document.pform["m_context"].value = '';
  77. }
  78. if (document.pform["m_pagerfrom"]) {
  79. document.pform["m_pagerfrom"].value = '';
  80. }
  81. if (document.pform["m_pagerto"]) {
  82. document.pform["m_pagerto"].value = '';
  83. }
  84. if (document.pform["m_section"]) {
  85. document.pform["m_section"].value = '';
  86. }
  87. if (document.pform["m_pg_e"]) {
  88. document.pform["m_pg_e"].value = '';
  89. }
  90. window.setTimeout("document.pform.submit();", 1);
  91. document.images["imgSearch"].src = imgAnimatedSearch.src;
  92. }
  93. function searchKeyHandler(evt)
  94. {
  95. if (evt.keyCode==13) {
  96. doSearch();
  97. return false;
  98. }
  99. }
  100. var searchMode = '<out:value-of select="$searchMode"/>';
  101. <!-- +++++++++++++ Set Flyout Caption Functions ++++++++++++++ -->
  102. function setSearchMode(sfield)
  103. {
  104. <out:if test="not(key('spec-item','modes')/search/contents/param[@name='index'] and $userCanUseIndexSearch)">
  105. return;
  106. </out:if>
  107. if (sfield == 'k') {
  108. var kEl = document.getElementById('searchOptions_index');
  109. kEl.style.display = "";
  110. var cmEl = document.getElementById('searchOptions_basic');
  111. cmEl.style.display = "none";
  112. }
  113. else
  114. {
  115. var cmEl = document.getElementById('searchOptions_basic');
  116. cmEl.style.display = "";
  117. var kEl = document.getElementById('searchOptions_index');
  118. kEl.style.display = "none";
  119. }
  120. }
  121. function setFindTextIn(selected_value, caption)
  122. {
  123. var findTextInMenu_caption = document.getElementById("findTextInMenu_caption");
  124. if (findTextInMenu_caption) {
  125. findTextInMenu_caption.innerHTML = caption;
  126. }
  127. var findTextInMenuJAWS_caption = document.getElementById("sosSearchTextLabel");
  128. if (findTextInMenuJAWS_caption){
  129. findTextInMenuJAWS_caption.innerHTML = searchFieldMSG + " " + caption;
  130. }
  131. document.getElementById("sfield").value = selected_value;
  132. setSearchMode(selected_value);
  133. var findMenuEl = document.getElementById("findTextInMenu_spanTable");
  134. if (findMenuEl != null){
  135. findMenuEl.focus();
  136. }
  137. }
  138. function setSearchMethod(selected_value,caption)
  139. {
  140. var searchMethodMenu_caption = document.getElementById("searchMethodMenu_caption");
  141. if( searchMethodMenu_caption )
  142. searchMethodMenu_caption.innerHTML = caption;
  143. var findMethodMenuJAWS_caption = document.getElementById("sosSearchMethodLabel");
  144. if (findMethodMenuJAWS_caption){
  145. findMethodMenuJAWS_caption.innerHTML = searchMethodMSG + " " + caption;
  146. }
  147. var smethod = document.getElementById("smethod");
  148. if (smethod)
  149. smethod.value = selected_value;
  150. }
  151. function setSearchModified(selected_value,caption)
  152. {
  153. var searchModifiedMenu_caption = document.getElementById("searchModifiedMenu_caption");
  154. if( searchModifiedMenu_caption )
  155. searchModifiedMenu_caption.innerHTML = caption;
  156. var findModifiedMenuJAWS_caption = document.getElementById("sosSearchModifiedLabel");
  157. if (findModifiedMenuJAWS_caption){
  158. findModifiedMenuJAWS_caption.innerHTML = searchFieldModifiedMSG + " " + caption;
  159. }
  160. var smodified = document.getElementById("smodified");
  161. if (smodified)
  162. smodified.value = selected_value;
  163. }
  164. function setSearchType(selected_value,caption)
  165. {
  166. var searchTypeMenu_caption = document.getElementById("searchTypeMenu_caption");
  167. if( searchTypeMenu_caption )
  168. searchTypeMenu_caption.innerHTML = caption;
  169. var findTypeMenuJAWS_caption = document.getElementById("sosSearchTypeLabel");
  170. if (findTypeMenuJAWS_caption){
  171. findTypeMenuJAWS_caption.innerHTML = searchFieldTypeMSG + " " + caption;
  172. }
  173. var stype = document.getElementById("stype");
  174. if (stype)
  175. stype.value = selected_value;
  176. }
  177. function setSearchIndexType(selected_value,caption)
  178. {
  179. var searchTypeMenu_caption = document.getElementById("searchIndexTypeMenu_caption");
  180. if( searchTypeMenu_caption )
  181. searchTypeMenu_caption.innerHTML = caption;
  182. var stype = document.getElementById("stype_is");
  183. if (stype)
  184. stype.value = selected_value;
  185. }
  186. function setSearchScope(selected_value,caption)
  187. {
  188. var searchScopeMenu_caption = document.getElementById("searchScopeMenu_caption");
  189. if( searchScopeMenu_caption )
  190. searchScopeMenu_caption.innerHTML = caption;
  191. var findScopeMenuJAWS_caption = document.getElementById("sosSearchScopeLabel");
  192. if (findScopeMenuJAWS_caption){
  193. findScopeMenuJAWS_caption.innerHTML = searchFieldScopeMSG + " " + caption;
  194. }
  195. var sscope = document.getElementById("sscope");
  196. if (sscope)
  197. sscope.value = selected_value;
  198. }
  199. </script>
  200. <!-- text edit box: -->
  201. <dp:list dp:kbA11y="true">
  202. <dp:section>
  203. <dp:label valign="top" width="1%" nospace="true"><xts:string id="IDS_FIND_TXT_IN"/></dp:label>
  204. <dp:link wrap="wrap" valign="top">
  205. <input name="sfield" id="sfield" type="hidden" value="{'{$field}'}"/>
  206. <out:variable name="findTextInMenu">
  207. <flyout id="findTextInMenu" hasCheckbox="true">
  208. <label><xts:string encode="javascript" id="IDS_SEARCH_FINDTEXT_MENU"/></label>
  209. <items>
  210. <itemGroup id="findTextInMenuGroup">
  211. <out:if test="key('spec-item','modes')/search/contents/param[@name='index'] and $userCanUseIndexSearch">
  212. <item id="findTextInMenu_k">
  213. <out:if test="$field = 'k'">
  214. <out:attribute name="itemSelectedState">checked</out:attribute>
  215. </out:if>
  216. <text><xts:string id="IDS_KEYWORD"/></text>
  217. <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_k");setFindTextIn('k','<xts:string id="IDS_KEYWORD" encode="javascript"/>');</action>
  218. </item>
  219. </out:if>
  220. <item id="findTextInMenu_n">
  221. <out:if test="$field = 'n'">
  222. <out:attribute name="itemSelectedState">checked</out:attribute>
  223. </out:if>
  224. <text><xts:string id="IDS_NAME_FIELD"/></text>
  225. <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_n");setFindTextIn('n','<xts:string id="IDS_NAME_FIELD" encode="javascript"/>');</action>
  226. </item>
  227. <item id="findTextInMenu_d">
  228. <out:if test="$field = 'd'">
  229. <out:attribute name="itemSelectedState">checked</out:attribute>
  230. </out:if>
  231. <text><xts:string id="IDS_DESC_FIELD"/></text>
  232. <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_d");setFindTextIn('d','<xts:string id="IDS_DESC_FIELD" encode="javascript"/>');</action>
  233. </item>
  234. <item id="findTextInMenu_nd">
  235. <out:if test="$field = 'nd'">
  236. <out:attribute name="itemSelectedState">checked</out:attribute>
  237. </out:if>
  238. <text><xts:string id="IDS_NAME_DESC_FIELD"/></text>
  239. <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_nd");setFindTextIn('nd','<xts:string id="IDS_NAME_DESC_FIELD" encode="javascript"/>');</action>
  240. </item>
  241. </itemGroup>
  242. </items>
  243. </flyout>
  244. </out:variable>
  245. <div id="findTextInMenu_span" style="margin-left:5px;z-index:10;position: relative;" >
  246. <table id="findTextInMenu_spanTable" cellspacing="0" cellpadding="0" style="position:relative; cursor:pointer;" tabindex="0"
  247. onkeypress="return CCPopupMenu.dropDown(event,0,0,'findTextInMenu');"
  248. onclick="return CCPopupMenu.dropDown(event,0,0,'findTextInMenu');" role="button" aria-haspopup="true" aria-labelledby="sosSearchTextLabel">
  249. <tr>
  250. <td nowrap="true" valign="top">
  251. <out:variable name="currentSortField">
  252. <out:choose>
  253. <out:when test="$field = 'k'">
  254. <xts:string id="IDS_KEYWORD"/>
  255. </out:when>
  256. <out:when test="$field = 'n'">
  257. <xts:string id="IDS_NAME_FIELD"/>
  258. </out:when>
  259. <out:when test="$field = 'd'">
  260. <xts:string id="IDS_DESC_FIELD"/>
  261. </out:when>
  262. <out:when test="$field = 'nd'">
  263. <xts:string id="IDS_NAME_DESC_FIELD"/>
  264. </out:when>
  265. </out:choose>
  266. </out:variable>
  267. <span id="sosSearchTextLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; ">
  268. <out:variable name="searchFieldNameMSG">
  269. <xts:string id="IDS_FIND_TXT_IN"/>
  270. </out:variable>
  271. <script language="javascript">
  272. var searchFieldMSG = "<xts:string encode="javascript" id="IDS_FLYOUTMENU_DESCRIPT"><xts:param name="menuName"><out:value-of select="$searchFieldNameMSG"/></xts:param></xts:string>";
  273. </script>
  274. <xts:string id="IDS_FLYOUTMENU_DESCRIPT"><xts:param name="menuName"><out:value-of select="$searchFieldNameMSG"/></xts:param></xts:string> <out:value-of select="$currentSortField"/>
  275. </span>
  276. <a id="findTextInMenu_caption" role="presentation" class="ccOptions" style="text-decoration:underline;" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
  277. <label for="stext">
  278. <out:value-of select="$currentSortField"/>
  279. </label>
  280. </a>
  281. </td>
  282. <td nowrap="true" valign="top">
  283. <img name="findTextInMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
  284. </td>
  285. </tr>
  286. </table>
  287. </div>
  288. <out:call-template name="renderPopup">
  289. <out:with-param name="flyoutXML">
  290. <out:copy-of select="$findTextInMenu"/>
  291. </out:with-param>
  292. <out:with-param name="controlID">findTextInMenu_span</out:with-param>
  293. </out:call-template>
  294. </dp:link>
  295. </dp:section>
  296. </dp:list>
  297. <dp:list dp:kbA11y="true">
  298. <dp:section width="100%" >
  299. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  300. <tr>
  301. <td style="padding-right:2px;">
  302. <input type="text" size="65" name="stext" id="stext" onkeypress="searchKeyHandler(event)">
  303. <out:attribute name="value">
  304. <out:value-of select="$stext"/>
  305. </out:attribute>
  306. <out:if test="$isBidiEnabled = 'true'">
  307. <out:variable name="textDirection">
  308. <out:value-of select="xtsext:getBTD(string($stext), $baseTextDirection, $productLocale)"/>
  309. </out:variable>
  310. <out:attribute name="dir">
  311. <out:value-of select="$textDirection"/>
  312. </out:attribute>
  313. <out:if test="$baseTextDirection = 'auto'">
  314. <out:attribute name="onfocus">
  315. <out:text>bidi.onfocus(this)</out:text>
  316. </out:attribute>
  317. </out:if>
  318. </out:if>
  319. </input>
  320. </td>
  321. <dp:button>
  322. <dp:defaultAct>doSearch();</dp:defaultAct>
  323. <a href="javascript:doSearch()" role="button" aria-labelledby="sosSearchButtonLabel">
  324. <dp:buttonText>
  325. <xts:string id="IDS_SEARCH_BUTTON"/>
  326. </dp:buttonText>
  327. <dp:buttonImage name="imgSearch" dp:tooltip="IDS_SEARCH_BUTTON">{$image_root}action_search.gif</dp:buttonImage>
  328. <span id="sosSearchButtonLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; ">
  329. <xts:string id="IDS_SEARCH_BUTTON"/>
  330. </span>
  331. </a>
  332. </dp:button>
  333. <td>
  334. <span id="searchAdvancedDesc" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><xts:string id="IDS_SELECT_SEARCH_ADVANCED"/></span>
  335. <cf:dynamicExpandingSectionTop indent="no" name="b_search" title="IDS_ADV_SEARCH_OPTIONS" longDescription="searchAdvancedDesc" expanding="yes" border="no" style="cursor:pointer;"/>
  336. </td>
  337. </tr>
  338. <tr>
  339. <td width="100%" colspan="4">
  340. <cf:dynamicExpandingSectionBody name="b_search" title="IDS_ADV_SEARCH_OPTIONS" expanding="yes" border="no">
  341. <table width="100%" role="presentation">
  342. <!-- <dp:groupItem><img height="1" width="10" src="{'{$webcontent}'}/images/space.gif"/></dp:groupItem>-->
  343. <td width="100%" class="sectionBackground">
  344. <!-- Index search options -->
  345. <out:if test="key('spec-item','modes')/search/contents/param[@name='index']">
  346. <div id="searchOptions_index">
  347. <out:if test="not($field = 'k')">
  348. <out:attribute name="style"><out:value-of select="'display:none'"/></out:attribute>
  349. </out:if>
  350. <!-- <xsl:call-template name="generate-indexSearchOptions-block"/> -->
  351. <xsl:call-template name="generate-indexSearchFlyouts-block"/>
  352. </div>
  353. </out:if>
  354. <!-- Basic search options -->
  355. <div id="searchOptions_basic">
  356. <out:if test="key('spec-item','modes')/search/contents/param[@name='index']">
  357. <out:if test="$field = 'k'">
  358. <out:attribute name="style"><out:value-of select="'display:none'"/></out:attribute>
  359. </out:if>
  360. </out:if>
  361. <!-- <xsl:call-template name="generate-basicSearchOptions-block"/> -->
  362. <xsl:call-template name="generate-basicSearchFlyouts-block"/>
  363. </div>
  364. </td>
  365. </table>
  366. </cf:dynamicExpandingSectionBody>
  367. </td>
  368. </tr>
  369. </table>
  370. </dp:section>
  371. </dp:list>
  372. <out:if test=" key('env-param','stext') or key('env-param','sourceContext') ">
  373. <dp:list>
  374. <dp:section>
  375. <dp:text/>
  376. </dp:section>
  377. </dp:list>
  378. <dp:division title="IDS_SEARCH_RESULTS"/>
  379. </out:if>
  380. <!-- Standard xts command variables -->
  381. <!--
  382. <input type="hidden" name="b_action" value="xts.run"/>
  383. <input type="hidden" name="m" value="{'{$app}/{$mname}'}"/>
  384. <xsl:if test="@type = 'tools'">
  385. <input type="hidden" name="m_newsearch" value="false"/>
  386. </xsl:if>
  387. -->
  388. <!-- Search control parameters -->
  389. <input type="hidden" name="search" id="search">
  390. <out:attribute name="value"><out:value-of select=" key('env-param','search') "/></out:attribute>
  391. </input>
  392. <!-- Request UI customization parameter -->
  393. <!--
  394. <input type="hidden" name="rui">
  395. <out:attribute name="value"><out:value-of select=" key('env-param','rui') "/></out:attribute>
  396. </input>
  397. -->
  398. </xsl:template>
  399. <xsl:template name="generate-basicSearchFlyouts-block">
  400. <dp:list width="100%" dp:kbA11y="true">
  401. <dp:section width="100%">
  402. <dp:list width="50%" dp:kbA11y="true">
  403. <dp:section>
  404. <dp:label valign="top" width="1%" nospace="true"><div><xts:string id="IDS_SEARCH_METHOD"/></div></dp:label>
  405. <dp:link wrap="wrap" valign="top">
  406. <out:variable name="smethodDefault">
  407. <out:choose>
  408. <out:when test="/root/env/param[@name='queryNamespaceSearchDefaultMethodOptionSetting'] = 'true'">
  409. <out:variable name="option" select="/root/configProps/param[@name='cc']/property[@name='portal.namespaceSearchDefaultMethodOption']"/>
  410. <out:choose>
  411. <out:when test="$option = 'contains'">1</out:when>
  412. <out:when test="$option = 'starts'">2</out:when>
  413. <out:when test="$option = 'equals'">3</out:when>
  414. <out:otherwise>1</out:otherwise>
  415. </out:choose>
  416. </out:when>
  417. <out:otherwise>1</out:otherwise>
  418. </out:choose>
  419. </out:variable>
  420. <input name="smethod" id="smethod" type="hidden">
  421. <out:attribute name="value">
  422. <out:choose>
  423. <out:when test="$smethod = ''"><out:value-of select="$smethodDefault"/></out:when>
  424. <out:otherwise><out:value-of select="$smethod"/></out:otherwise>
  425. </out:choose>
  426. </out:attribute>
  427. </input>
  428. <out:variable name="searchMethodMenu">
  429. <flyout id="searchMethodMenu" hasCheckbox="true">
  430. <label><xts:string encode="javascript" id="IDS_SEARCH_METHOD_MENU"/></label>
  431. <items>
  432. <itemGroup id="searchMethodGroup">
  433. <item id="searchMethod_1">
  434. <out:if test="$smethod = '1' or ($smethod = '' and $smethodDefault = '1')">
  435. <out:attribute name="itemSelectedState">checked</out:attribute>
  436. </out:if>
  437. <text><xts:string id="IDS_CONTAINS"/></text>
  438. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_1");setSearchMethod('1','<xts:string id="IDS_CONTAINS" encode="javascript"/>');</action>
  439. </item>
  440. <item id="searchMethod_2">
  441. <out:if test="$smethod = '2' or ($smethod = '' and $smethodDefault = '2')">
  442. <out:attribute name="itemSelectedState">checked</out:attribute>
  443. </out:if>
  444. <text><xts:string id="IDS_STARTS_WITH"/></text>
  445. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_2");setSearchMethod('2','<xts:string id="IDS_STARTS_WITH" encode="javascript"/>');</action>
  446. </item>
  447. <item id="searchMethod_3">
  448. <out:if test="$smethod = '3' or ($smethod = '' and $smethodDefault = '3')">
  449. <out:attribute name="itemSelectedState">checked</out:attribute>
  450. </out:if>
  451. <text><xts:string id="IDS_EQUALS"/></text>
  452. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_3");setSearchMethod('3','<xts:string id="IDS_EQUALS" encode="javascript"/>');</action>
  453. </item>
  454. </itemGroup>
  455. </items>
  456. </flyout>
  457. </out:variable>
  458. <div style="margin-left:5px;z-index:9;position: relative;">
  459. <div id="searchMethodMenu_span" style="text-decoration:underline;" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" tabindex="0"
  460. onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchMethodMenu');"
  461. onclick="return CCPopupMenu.dropDown(event,0,0,'searchMethodMenu');" role="button" aria-haspopup="true"
  462. aria-labelledby="sosSearchMethodLabel">
  463. <table cellspacing="0" cellpadding="0" role="presentation">
  464. <tr class="ccOptions" style="cursor:pointer;">
  465. <td nowrap="true" valign="top">
  466. <out:variable name="currentSortMethod">
  467. <out:choose>
  468. <out:when test="$smethod = '1' or ($smethod = '' and $smethodDefault = '1')">
  469. <xts:string id="IDS_CONTAINS"/>
  470. </out:when>
  471. <out:when test="$smethod = '2' or ($smethod = '' and $smethodDefault = '2')">
  472. <xts:string id="IDS_STARTS_WITH"/>
  473. </out:when>
  474. <out:when test="$smethod = '3' or ($smethod = '' and $smethodDefault = '3')">
  475. <xts:string id="IDS_EQUALS"/>
  476. </out:when>
  477. </out:choose>
  478. </out:variable>
  479. <span id="sosSearchMethodLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; ">
  480. <out:variable name="searchMethodNameMSG">
  481. <xts:string id="IDS_SEARCH_METHOD"/>
  482. </out:variable>
  483. <script language="javascript">
  484. var searchMethodMSG = "<xts:string encode="javascript" id="IDS_FLYOUTMENU_DESCRIPT">
  485. <xts:param name="menuName">
  486. <out:value-of select="$searchMethodNameMSG"/>
  487. </xts:param>
  488. </xts:string>";
  489. </script>
  490. <xts:string id="IDS_FLYOUTMENU_DESCRIPT">
  491. <xts:param name="menuName">
  492. <out:value-of select="$searchMethodNameMSG"/>
  493. </xts:param>
  494. </xts:string>
  495. <out:value-of select="$currentSortMethod"/>
  496. </span>
  497. <span id="searchMethodMenu_caption">
  498. <out:value-of select="$currentSortMethod"/>
  499. </span>
  500. </td>
  501. <td nowrap="true" valign="top">
  502. <img name="searchMethodMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
  503. </td>
  504. </tr>
  505. </table>
  506. </div>
  507. <out:call-template name="renderPopup">
  508. <out:with-param name="flyoutXML">
  509. <out:copy-of select="$searchMethodMenu"/>
  510. </out:with-param>
  511. <out:with-param name="controlID">searchMethodMenu_span</out:with-param>
  512. </out:call-template>
  513. </div>
  514. </dp:link>
  515. </dp:section>
  516. <out:choose>
  517. <out:when test="key('spec-item','modes')/search/modified">
  518. <dp:section>
  519. <dp:label valign="top" width="1%" nospace="true"><div><xts:string id="IDS_SEARCH_MODIFIED"/></div></dp:label>
  520. <dp:link wrap="wrap" valign="top">
  521. <input name="smodified" id="smodified" type="hidden">
  522. <out:attribute name="value">
  523. <out:choose>
  524. <out:when test="$modified = ''">any</out:when>
  525. <out:otherwise><out:value-of select="$modified"/></out:otherwise>
  526. </out:choose>
  527. </out:attribute>
  528. </input>
  529. <out:variable name="searchModifiedMenu">
  530. <flyout id="searchModifiedMenu" hasCheckbox="true">
  531. <label><xts:string encode="javascript" id="IDS_SEARCH_MODIFIED_MENU"/></label>
  532. <items>
  533. <itemGroup id="searchModifiedGroup">
  534. <item id="searchModified_a">
  535. <out:if test="$modified = 'any' or $modified = ''">
  536. <out:attribute name="itemSelectedState">checked</out:attribute>
  537. </out:if>
  538. <text><xts:string id="IDS_ANY_DATE"/></text>
  539. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_a");setSearchModified('any','<xts:string id="IDS_ANY_DATE" encode="javascript"/>');</action>
  540. </item>
  541. <item id="searchModified_t">
  542. <out:if test="$modified = '2'">
  543. <out:attribute name="itemSelectedState">checked</out:attribute>
  544. </out:if>
  545. <text><xts:string id="IDS_MODIFIED_TODAY"/></text>
  546. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_t");setSearchModified('t','<xts:string id="IDS_MODIFIED_TODAY" encode="javascript"/>');</action>
  547. </item>
  548. <item id="searchModified_l3d">
  549. <out:if test="$modified = 'l3d'">
  550. <out:attribute name="itemSelectedState">checked</out:attribute>
  551. </out:if>
  552. <text><xts:string id="IDS_MODIFIED_LAST3DAYS"/></text>
  553. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3d");setSearchModified('l3d','<xts:string id="IDS_MODIFIED_LAST3DAYS" encode="javascript"/>');</action>
  554. </item>
  555. <item id="searchModified_lw">
  556. <out:if test="$modified = 'lw'">
  557. <out:attribute name="itemSelectedState">checked</out:attribute>
  558. </out:if>
  559. <text><xts:string id="IDS_MODIFIED_LASTWEEK"/></text>
  560. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_lw");setSearchModified('lw','<xts:string id="IDS_MODIFIED_LASTWEEK" encode="javascript"/>');</action>
  561. </item>
  562. <item id="searchModified_lm">
  563. <out:if test="$modified = 'lm'">
  564. <out:attribute name="itemSelectedState">checked</out:attribute>
  565. </out:if>
  566. <text><xts:string id="IDS_MODIFIED_LASTMONTH"/></text>
  567. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_lm");setSearchModified('lm','<xts:string id="IDS_MODIFIED_LASTMONTH" encode="javascript"/>');</action>
  568. </item>
  569. <item id="searchModified_l3m">
  570. <out:if test="$modified = 'l3m'">
  571. <out:attribute name="itemSelectedState">checked</out:attribute>
  572. </out:if>
  573. <text><xts:string id="IDS_MODIFIED_LAST3MONTH"/></text>
  574. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3m");setSearchModified('l3m','<xts:string id="IDS_MODIFIED_LAST3MONTH" encode="javascript"/>');</action>
  575. </item>
  576. <item id="searchModified_l6m">
  577. <out:if test="$modified = 'l6m'">
  578. <out:attribute name="itemSelectedState">checked</out:attribute>
  579. </out:if>
  580. <text><xts:string id="IDS_MODIFIED_LAST6MONTH"/></text>
  581. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l6m");setSearchModified('l6m','<xts:string id="IDS_MODIFIED_LAST6MONTH" encode="javascript"/>');</action>
  582. </item>
  583. <item id="searchModified_ly">
  584. <out:if test="$modified = 'ly'">
  585. <out:attribute name="itemSelectedState">checked</out:attribute>
  586. </out:if>
  587. <text><xts:string id="IDS_MODIFIED_LASTYEAR"/></text>
  588. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_ly");setSearchModified('ly','<xts:string id="IDS_MODIFIED_LASTYEAR" encode="javascript"/>');</action>
  589. </item>
  590. <item id="searchModified_l3y">
  591. <out:if test="$modified = 'l3y'">
  592. <out:attribute name="itemSelectedState">checked</out:attribute>
  593. </out:if>
  594. <text><xts:string id="IDS_MODIFIED_LAST3YEARS"/></text>
  595. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3y");setSearchModified('l3y','<xts:string id="IDS_MODIFIED_LAST3YEARS" encode="javascript"/>');</action>
  596. </item>
  597. </itemGroup>
  598. </items>
  599. </flyout>
  600. </out:variable>
  601. <div style="margin-left:5px;z-index:8;position: relative;">
  602. <div id="searchModifiedMenu_span" style="text-decoration:underline;" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" tabindex="0"
  603. onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchModifiedMenu');"
  604. onclick="return CCPopupMenu.dropDown(event,0,0,'searchModifiedMenu');" role="button" aria-haspopup="true"
  605. aria-labelledby="sosSearchModifiedLabel">
  606. <table cellpadding="0" cellspacing="0" role="presentation">
  607. <tr class="ccOptions" style="cursor:pointer;">
  608. <td nowrap="true" valign="top">
  609. <out:variable name="currentModifiedField">
  610. <out:choose>
  611. <out:when test=" $modified = 'any' or $modified = ''">
  612. <xts:string id="IDS_ANY_DATE"/>
  613. </out:when>
  614. <out:when test=" $modified = 't' ">
  615. <xts:string id="IDS_MODIFIED_TODAY"/>
  616. </out:when>
  617. <out:when test=" $modified = 'l3d' ">
  618. <xts:string id="IDS_MODIFIED_LAST3DAYS"/>
  619. </out:when>
  620. <out:when test=" $modified = 'lw' ">
  621. <xts:string id="IDS_MODIFIED_LASTWEEK"/>
  622. </out:when>
  623. <out:when test=" $modified = 'lm' ">
  624. <xts:string id="IDS_MODIFIED_LASTMONTH"/>
  625. </out:when>
  626. <out:when test=" $modified = 'l3m' ">
  627. <xts:string id="IDS_MODIFIED_LAST3MONTH"/>
  628. </out:when>
  629. <out:when test=" $modified = 'l6m' ">
  630. <xts:string id="IDS_MODIFIED_LAST6MONTH"/>
  631. </out:when>
  632. <out:when test=" $modified = 'ly' ">
  633. <xts:string id="IDS_MODIFIED_LASTYEAR"/>
  634. </out:when>
  635. <out:when test=" $modified = 'l3y' ">
  636. <xts:string id="IDS_MODIFIED_LAST3YEARS"/>
  637. </out:when>
  638. </out:choose>
  639. </out:variable>
  640. <span id="sosSearchModifiedLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; ">
  641. <out:variable name="searchFieldModifiedMSG">
  642. <xts:string id="IDS_SEARCH_MODIFIED"/>
  643. </out:variable>
  644. <script language="javascript">
  645. var searchFieldModifiedMSG = "<xts:string encode="javascript" id="IDS_FLYOUTMENU_DESCRIPT">
  646. <xts:param name="menuName">
  647. <out:value-of select="$searchFieldModifiedMSG"/>
  648. </xts:param>
  649. </xts:string>";
  650. </script>
  651. <xts:string id="IDS_FLYOUTMENU_DESCRIPT">
  652. <xts:param name="menuName">
  653. <out:value-of select="$searchFieldModifiedMSG"/>
  654. </xts:param>
  655. </xts:string>
  656. <out:value-of select="$currentModifiedField"/>
  657. </span>
  658. <span id="searchModifiedMenu_caption">
  659. <out:value-of select="$currentModifiedField"/>
  660. </span>
  661. </td>
  662. <td nowrap="true" valign="top">
  663. <img name="searchModifiedMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
  664. </td>
  665. </tr>
  666. </table>
  667. </div>
  668. <out:call-template name="renderPopup">
  669. <out:with-param name="flyoutXML">
  670. <out:copy-of select="$searchModifiedMenu"/>
  671. </out:with-param>
  672. <out:with-param name="controlID">searchModifiedMenu_span</out:with-param>
  673. </out:call-template>
  674. </div>
  675. </dp:link>
  676. </dp:section>
  677. </out:when>
  678. <out:otherwise>
  679. <dp:section>
  680. <table cellpadding="0" cellspacing="0" role="presentation">
  681. <tr>
  682. <td>&#160;</td>
  683. </tr>
  684. </table>
  685. </dp:section>
  686. </out:otherwise>
  687. </out:choose>
  688. </dp:list>
  689. <dp:list width="50%" dp:kbA11y="true">
  690. <out:if test="count(key('spec-item','modes')/search/types/param) &gt; 1">
  691. <dp:section>
  692. <dp:label valign="top" width="1%" nospace="true"><div><xts:string id="IDS_ENTRY_TYPE"/></div></dp:label>
  693. <dp:link wrap="wrap" valign="top">
  694. <!-- Create flyout for type -->
  695. <out:variable name="searchTypeItems">
  696. <xsl:call-template name="generate-search-types-items">
  697. <xsl:with-param name="types" select="'key(&quot;spec-item&quot;,&quot;modes&quot;)/search/types'"/>
  698. <xsl:with-param name="input_name" select="'stype'"/>
  699. </xsl:call-template>
  700. </out:variable>
  701. <input name="stype" id="stype" type="hidden">
  702. <out:attribute name="value">
  703. <out:choose>
  704. <out:when test="$stype = ''">any</out:when>
  705. <out:otherwise><out:value-of select="$stype"/></out:otherwise>
  706. </out:choose>
  707. </out:attribute>
  708. </input>
  709. <out:variable name="searchTypeMenu">
  710. <flyout id="searchTypeMenu" hasCheckbox="true">
  711. <label><xts:string encode="javascript" id="IDS_SEARCH_TYPE_MENU"/></label>
  712. <items>
  713. <itemGroup id="searchTypeGroup">
  714. <out:for-each select="$searchTypeItems/item">
  715. <out:variable name="curVal" select="@value"/>
  716. <out:variable name="ck">
  717. <out:choose>
  718. <out:when test="$stype = $curVal">checked</out:when>
  719. <out:when test="($stype = 'any' or $stype = '') and position()=1">checked</out:when>
  720. </out:choose>
  721. </out:variable>
  722. <item>
  723. <out:if test="$ck!=''">
  724. <out:attribute name="itemSelectedState"><out:value-of select="$ck"/></out:attribute>
  725. </out:if>
  726. <out:copy-of select="@*[name()!='itemSelectedState' and name()!='value']"/>
  727. <out:copy-of select="./*"/>
  728. </item>
  729. </out:for-each>
  730. </itemGroup>
  731. </items>
  732. </flyout>
  733. </out:variable>
  734. <div style="margin-left:5px;z-index:9;position: relative;">
  735. <div id="searchTypeMenu_span" style="text-decoration:underline;" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" tabindex="0"
  736. onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchTypeMenu');"
  737. onclick="return CCPopupMenu.dropDown(event,0,0,'searchTypeMenu');" role="button" aria-haspopup="true"
  738. aria-labelledby="sosSearchTypeLabel">
  739. <table cellspacing="0" cellpadding="0" role="presentation">
  740. <tr class="ccOptions" style="cursor:pointer;">
  741. <td nowrap="true" valign="top">
  742. <span id="sosSearchTypeLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; ">
  743. <out:variable name="searchFieldTypeMSG">
  744. <xts:string id="IDS_ENTRY_TYPE"/>
  745. </out:variable>
  746. <script language="javascript">
  747. var searchFieldTypeMSG = "<xts:string encode="javascript" id="IDS_FLYOUTMENU_DESCRIPT">
  748. <xts:param name="menuName">
  749. <out:value-of select="$searchFieldTypeMSG"/>
  750. </xts:param>
  751. </xts:string>";
  752. </script>
  753. <xts:string id="IDS_FLYOUTMENU_DESCRIPT">
  754. <xts:param name="menuName">
  755. <out:value-of select="$searchFieldTypeMSG"/>
  756. </xts:param>
  757. </xts:string>
  758. <out:value-of select="$searchTypeMenu//item[string(@itemSelectedState)='checked']/*"/>
  759. </span>
  760. <span id="searchTypeMenu_caption">
  761. <out:value-of select="$searchTypeMenu//item[string(@itemSelectedState)='checked']/*"/>
  762. </span>
  763. </td>
  764. <td nowrap="true" valign="top">
  765. <img name="searchTypeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
  766. </td>
  767. </tr>
  768. </table>
  769. </div>
  770. <out:call-template name="renderPopup">
  771. <out:with-param name="flyoutXML">
  772. <out:copy-of select="$searchTypeMenu"/>
  773. </out:with-param>
  774. <out:with-param name="controlID">searchTypeMenu_span</out:with-param>
  775. </out:call-template>
  776. </div>
  777. </dp:link>
  778. </dp:section>
  779. </out:if>
  780. <!-- Scope: -->
  781. <out:if test="key('spec-item','modes')/search/scopes">
  782. <dp:section>
  783. <dp:label valign="top" width="1%" nospace="true"><div><xts:string id="IDS_SCOPE"/></div></dp:label>
  784. <dp:link wrap="wrap" valign="top">
  785. <!-- Create flyout for scope -->
  786. <out:variable name="searchScopeItems">
  787. <xsl:call-template name="generate-search-scopes-items">
  788. <xsl:with-param name="scopes" select="'key(&quot;spec-item&quot;,&quot;modes&quot;)/search/scopes'"/>
  789. </xsl:call-template>
  790. </out:variable>
  791. <input name="sscope" id="sscope" type="hidden">
  792. <out:attribute name="value">
  793. <out:choose>
  794. <out:when test="$scope = ''"><out:value-of select="$searchScopeItems/item[1]/@value"/></out:when>
  795. <out:otherwise><out:value-of select="$scope"/></out:otherwise>
  796. </out:choose>
  797. </out:attribute>
  798. </input>
  799. <out:variable name="searchScopeMenu">
  800. <flyout id="searchScopeMenu" hasCheckbox="true">
  801. <label><xts:string encode="javascript" id="IDS_SEARCH_SCOPE_MENU"/></label>
  802. <items>
  803. <itemGroup id="searchScopeGroup">
  804. <out:for-each select="$searchScopeItems/item">
  805. <out:variable name="curVal" select="@value"/>
  806. <out:variable name="ck">
  807. <out:choose>
  808. <out:when test="$scope = $curVal">checked</out:when>
  809. <out:when test="$scope = '' and position()=1">checked</out:when>
  810. </out:choose>
  811. </out:variable>
  812. <item>
  813. <out:if test="$ck!=''">
  814. <out:attribute name="itemSelectedState"><out:value-of select="$ck"/></out:attribute>
  815. </out:if>
  816. <out:copy-of select="@*[name()!='itemSelectedState' and name()!='value']"/>
  817. <out:copy-of select="./*"/>
  818. </item>
  819. </out:for-each>
  820. </itemGroup>
  821. </items>
  822. </flyout>
  823. </out:variable>
  824. <div style="margin-left:5px;z-index:8;position: relative;">
  825. <div id="searchScopeMenu_span" style="text-decoration:underline;" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" tabindex="0"
  826. onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchScopeMenu');"
  827. onclick="return CCPopupMenu.dropDown(event,0,0,'searchScopeMenu');" role="button" aria-haspopup="true" aria-labelledby="sosSearchScopeLabel">
  828. <table cellspacing="0" cellpadding="0" role="presentation">
  829. <tr class="ccOptions" style="cursor:pointer;">
  830. <td nowrap="true" valign="top">
  831. <span id="sosSearchScopeLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; ">
  832. <out:variable name="searchFieldScopeMSG">
  833. <xts:string id="IDS_SCOPE"/>
  834. </out:variable>
  835. <script language="javascript">
  836. var searchFieldScopeMSG = "<xts:string encode="javascript" id="IDS_FLYOUTMENU_DESCRIPT">
  837. <xts:param name="menuName">
  838. <out:value-of select="$searchFieldScopeMSG"/>
  839. </xts:param>
  840. </xts:string>";
  841. </script>
  842. <xts:string id="IDS_FLYOUTMENU_DESCRIPT">
  843. <xts:param name="menuName">
  844. <out:value-of select="$searchFieldScopeMSG"/>
  845. </xts:param>
  846. </xts:string>
  847. <out:value-of select="$searchScopeMenu//item[string(@itemSelectedState)='checked']/*"/>
  848. </span>
  849. <span id="searchScopeMenu_caption">
  850. <out:value-of select="$searchScopeMenu//item[string(@itemSelectedState)='checked']/*"/>
  851. </span>
  852. </td>
  853. <td nowrap="true" valign="top">
  854. <img name="searchScopeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
  855. </td>
  856. </tr>
  857. </table>
  858. </div>
  859. <out:call-template name="renderPopup">
  860. <out:with-param name="flyoutXML">
  861. <out:copy-of select="$searchScopeMenu"/>
  862. </out:with-param>
  863. <out:with-param name="controlID">searchScopeMenu_span</out:with-param>
  864. </out:call-template>
  865. </div>
  866. </dp:link>
  867. </dp:section>
  868. </out:if>
  869. <out:if test="not(count(key('spec-item','modes')/search/types/param) &gt; 1)">
  870. <dp:section>
  871. <table cellpadding="0" cellspacing="0" role="presentation">
  872. <tr>
  873. <td>&#160;</td>
  874. </tr>
  875. </table>
  876. <out:if test="count(key('spec-item','modes')/search/types/param) &gt; 0">
  877. <input name="stype" id="stype" type="hidden">
  878. <out:attribute name="value"><out:value-of select="key('spec-item','modes')/search/types/param/@name"/></out:attribute>
  879. </input>
  880. </out:if>
  881. </dp:section>
  882. </out:if>
  883. </dp:list>
  884. </dp:section>
  885. </dp:list>
  886. </xsl:template>
  887. <xsl:template name="generate-indexSearchFlyouts-block">
  888. <dp:list width="100%" dp:kbA11y="true">
  889. <dp:section width="100%">
  890. <!-- Method: -->
  891. <dp:list width="50%" dp:kbA11y="true">
  892. <dp:section><dp:text/></dp:section>
  893. <dp:section><dp:label><xts:string id="IDS_SEARCH_METHOD"/></dp:label><xts:string id="IDS_SEARCH_METHOD_FULL_KEYWORD_TEXT"/></dp:section>
  894. <dp:section><dp:text/></dp:section>
  895. </dp:list>
  896. <out:if test="key('spec-item','modes')/search/types_index">
  897. <dp:list width="50%" dp:kbA11y="true">
  898. <dp:section>
  899. <dp:label width="1%" nospace="true"><xts:string id="IDS_ENTRY_TYPE"/></dp:label>
  900. <dp:link wrap="wrap" valign="top">
  901. <!-- Create flyout for type -->
  902. <out:variable name="searchIndexTypeItems">
  903. <xsl:call-template name="generate-search-types-is-items">
  904. <xsl:with-param name="types" select="'key(&quot;spec-item&quot;,&quot;modes&quot;)/search/types_index'"/>
  905. <xsl:with-param name="input_name" select="'stype_is'"/>
  906. </xsl:call-template>
  907. </out:variable>
  908. <input name="stype_is" id="stype_is" type="hidden">
  909. <out:attribute name="value">
  910. <out:choose>
  911. <out:when test="$stype_is = ''">any</out:when>
  912. <out:otherwise><out:value-of select="$stype_is"/></out:otherwise>
  913. </out:choose>
  914. </out:attribute>
  915. </input>
  916. <out:variable name="searchIndexTypeMenu">
  917. <flyout id="searchIndexTypeMenu" hasCheckbox="true">
  918. <label><xts:string encode="javascript" id="IDS_SEARCH_TYPE_MENU"/></label>
  919. <items>
  920. <itemGroup id="searchIndexTypeGroup">
  921. <out:for-each select="$searchIndexTypeItems/item">
  922. <out:variable name="curVal" select="@value"/>
  923. <out:variable name="ck">
  924. <out:choose>
  925. <out:when test="$stype_is = $curVal">checked</out:when>
  926. <out:when test="($stype_is = 'any' or $stype_is = '') and position()=1">checked</out:when>
  927. </out:choose>
  928. </out:variable>
  929. <item>
  930. <out:if test="$ck!=''">
  931. <out:attribute name="itemSelectedState"><out:value-of select="$ck"/></out:attribute>
  932. </out:if>
  933. <out:copy-of select="@*[name()!='itemSelectedState' and name()!='value']"/>
  934. <out:copy-of select="./*"/>
  935. </item>
  936. </out:for-each>
  937. </itemGroup>
  938. </items>
  939. </flyout>
  940. </out:variable>
  941. <div id="searchIndexTypeMenu_span" style="margin-left:5px;z-index:9;position: relative; top: 5px">
  942. <table role="button" id="searchIndexTypeMenu_spanTable" cellspacing="0" cellpadding="0" style="cursor:pointer;" tabindex="0"
  943. onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchIndexTypeMenu');"
  944. onclick="return CCPopupMenu.dropDown(event,0,0,'searchIndexTypeMenu');">
  945. <tr>
  946. <td nowrap="true" valign="top">
  947. <div class="ccOptions" style="text-decoration:underline" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" role="presentation">
  948. <span id="searchIndexTypeMenu_caption">
  949. <out:value-of select="$searchIndexTypeMenu//item[string(@itemSelectedState)='checked']/*"/>
  950. </span>
  951. </div>
  952. </td>
  953. <td nowrap="true" valign="top">
  954. <img name="searchIndexTypeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
  955. </td>
  956. </tr>
  957. </table>
  958. </div>
  959. <out:call-template name="renderPopup">
  960. <out:with-param name="flyoutXML">
  961. <out:copy-of select="$searchIndexTypeMenu"/>
  962. </out:with-param>
  963. <out:with-param name="controlID">searchIndexTypeMenu_span</out:with-param>
  964. </out:call-template>
  965. </dp:link>
  966. </dp:section>
  967. </dp:list>
  968. </out:if>
  969. </dp:section>
  970. </dp:list>
  971. </xsl:template>
  972. <xsl:template name="generate-search-scopes-items">
  973. <xsl:param name="scopes"/>
  974. <out:for-each select="{$scopes}/param">
  975. <out:variable name="curName" select="@name"/>
  976. <out:if test="$curName != ''">
  977. <item id="searchScope_{'{$curName}'}" value="{'{$curName}'}">
  978. <text><out:value-of select="key('search-spec-message-scope',$curName)"/></text>
  979. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchScope_<out:value-of select="xtsext:javascriptencode(string($curName))"/>");setSearchScope('<out:value-of select="xtsext:javascriptencode(string($curName))"/>','<out:value-of select="xtsext:javascriptencode(string(key('search-spec-message-scope',$curName)))"/>');</action>
  980. </item>
  981. </out:if>
  982. </out:for-each>
  983. </xsl:template>
  984. <xsl:template name="generate-search-types-items">
  985. <xsl:param name="types"/>
  986. <xsl:param name="input_name"/>
  987. <item id="searchType_any">
  988. <text><xts:string id="IDS_ANY"/></text>
  989. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchType_any");setSearchType('any','<xts:string id="IDS_ANY" encode="javascript"/>');</action>
  990. </item>
  991. <out:for-each select="{$types}/param[@name!='any']">
  992. <out:variable name="curName" select="@name"/>
  993. <out:if test="$curName != ''">
  994. <item id="searchType_{'{$curName}'}" value="{'{$curName}'}">
  995. <text><out:value-of select="key('search-spec-message-type',$curName)"/></text>
  996. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchType_<out:value-of select="xtsext:javascriptencode(string($curName))"/>");setSearchType('<out:value-of select="xtsext:javascriptencode(string($curName))"/>','<out:value-of select="xtsext:javascriptencode(string(key('search-spec-message-type',$curName)))"/>');</action>
  997. </item>
  998. </out:if>
  999. </out:for-each>
  1000. </xsl:template>
  1001. <xsl:template name="generate-search-types-is-items">
  1002. <xsl:param name="types"/>
  1003. <xsl:param name="input_name"/>
  1004. <item id="searchIndexType_any">
  1005. <text><xts:string id="IDS_ANY"/></text>
  1006. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchIndexType_any");setSearchIndexType('any','<xts:string id="IDS_ANY" encode="javascript"/>');</action>
  1007. </item>
  1008. <out:for-each select="{$types}/param[@name!='any']">
  1009. <out:variable name="curName" select="@name"/>
  1010. <out:if test="$curName != ''">
  1011. <item id="searchIndexType_{'{$curName}'}" value="{'{$curName}'}">
  1012. <text><out:value-of select="key('search-spec-message-type',$curName)"/></text>
  1013. <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchIndexType_<out:value-of select="xtsext:javascriptencode(string($curName))"/>");setSearchIndexType('<out:value-of select="xtsext:javascriptencode(string($curName))"/>','<out:value-of select="xtsext:javascriptencode(string(key('search-spec-message-type',$curName)))"/>');</action>
  1014. </item>
  1015. </out:if>
  1016. </out:for-each>
  1017. </xsl:template>
  1018. <xsl:template match="*">
  1019. <xsl:copy>
  1020. <xsl:copy-of select="@*"/>
  1021. <xsl:apply-templates/>
  1022. </xsl:copy>
  1023. </xsl:template>
  1024. </xsl:stylesheet>