123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2015
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:out="dummy-uri"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:pg="http://developer.cognos.com/schemas/xts/pg"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="lyt">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
- This stylesheet (search.xsl) consists of the following templates:
- mt:search - generate main search area for page.
- mt:directPath - used in lieu of path control in search dialog (only tools).
- mt:scopes - generates select element
- mt:scope - generate scope list for tools search dialog.
- mt:stypes - placeholder.
- mt:stype - generate type list for tools search dialog.
- -->
- <!--
- Template - mt:search:
- This template defines link elements for skin_style and skin_fonts.
- Operation:
- Generates javascript:
- function doSearch() - apply the search.
- function init() - run at page load to set focus.
- Renders the search page.
- -->
- <xsl:template match="mt:common-variables">
- <out:variable name="imageRootSpace"><out:value-of select="$webcontent"/><out:text>/images/</out:text></out:variable>
- <out:variable name="all_filters">
- <out:choose>
- <out:when test="string(/root/env/param[@name='all_filters']) != ''">
- <out:value-of select="/root/env/param[@name='all_filters']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="'false'"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <pg:common-variables caller="cc">
- <pg:formLabelStyle>'formLabel'</pg:formLabelStyle>
- <pg:tableTextStyle>'tableText'</pg:tableTextStyle>
- <pg:tableHeaderStyle>'tableHeader'</pg:tableHeaderStyle>
- <pg:tableTitleStyle>'tableTitle'</pg:tableTitleStyle>
- <pg:callbackFunction>'doSearch(true)'</pg:callbackFunction>
- <pg:gateway>$gateway</pg:gateway>
- <pg:imageRoot>$image_root</pg:imageRoot>
- <pg:skinImages>$skin_images</pg:skinImages>
- <pg:skinSharedImages>$skin_shared_images</pg:skinSharedImages>
- <pg:imageRootSpace>$imageRootSpace</pg:imageRootSpace>
- <pg:searchTerms>string(/root/env/param[@name = 'stext'])</pg:searchTerms>
- <pg:searchForm>'frmSearch'</pg:searchForm>
- <pg:isIndexSearch>$isIndexSearch</pg:isIndexSearch>
- <pg:selectedCategoryStyle>'indexTreeCategorySelected'</pg:selectedCategoryStyle>
- <pg:selectedCategoryHoverStyle>'indexTreeCategoryHoverSelected'</pg:selectedCategoryHoverStyle>
- <pg:categoryHoverStyle>'indexTreeCategoryHover'</pg:categoryHoverStyle>
- <pg:categoryHighlightStyle>'indexTreeCategoryBlur'</pg:categoryHighlightStyle>
- <pg:allFilters>$all_filters</pg:allFilters>
- <pg:popupMenu>'flyOutMenu'</pg:popupMenu>
- <pg:popupMenuCaption>'ccOptions'</pg:popupMenuCaption>
- <pg:popupMenuItem>'tabletext menuItemNormal'</pg:popupMenuItem>
- <pg:popupMenuItemHover>'tabletext menuItemOver'</pg:popupMenuItemHover>
- <pg:tooltipStyle>'countSummary'</pg:tooltipStyle>
- </pg:common-variables>
- </xsl:template>
- <xsl:template match="mt:search">
- <out:variable name="scope" select="string(key('env-param','sscope'))"/>
- <out:variable name="type" select="string(key('env-param','stype'))"/>
- <out:variable name="type_is" select="string(key('env-param','stype_is'))"/> <!-- index search search type -->
- <out:variable name="modified" select="string(key('env-param','smodified'))"/>
- <out:variable name="smethod" select="string(key('env-param','smethod'))"/>
- <out:variable name="indexSearch" select="'{string(@indexSearch) = 'true'}'"/>
- <out:variable name="stext">
- <out:choose>
- <out:when test="string(key('env-param','sfield')) = 'k' and not($userCanUseIndexSearch)">
- <!-- user initiates index search but has no capability - clear the text as it may not apply -->
- <out:value-of select="''"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="string(key('env-param','stext'))"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="singleField">
- <xsl:if test="count(mt:fields/*) = 1"><out:value-of select="'{mt:fields/mt:field}'"/></xsl:if>
- </out:variable>
- <out:variable name="field">
- <out:variable name="f" select="xtsext:javascriptencode(string(key('env-param','sfield')))"/>
- <out:choose>
- <out:when test="$singleField != ''"><out:value-of select="$singleField"/></out:when>
- <out:when test="($f = 'k' or $f = '')">
- <out:choose>
- <out:when test="$indexSearch='true' and $userCanUseIndexSearch">
- <out:value-of select="'k'"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="'n'"/>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:value-of select="$f"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
-
- <script language="javascript">
- <!-- preload source for search icon animation -->
- var imgAnimatedSearch = new Image();
- imgAnimatedSearch.src = "<out:value-of select="xtsext:javascriptencode($image_root)"/>action_search_ani.gif";
-
- function doSearch(bTreeFilterSearch)
- {
- <out:if test="$mvc-N-enabled">
- if (typeof clearMVCState == "function")
- clearMVCState("search");
- </out:if>
-
- if (document.frmSearch.m_searchsection) {
- document.frmSearch.m_searchsection.value = "";
- }
- if (document.frmSearch.m_searchcontext) {
- document.frmSearch.m_searchcontext.value = "";
- }
- if (document.frmSearch.m_pg_esearch) {
- document.frmSearch.m_pg_esearch.value = "";
- }
- if (document.frmSearch.m_section) {
- document.frmSearch.m_section.value = "";
- }
- <!--
- // Make sure the base path is not empty. This should rarely be the case!!
- // Happens when home is set to "My Folders" and search is invoked immediately after going "home" OR if the url is being tampered with.
- -->
- if (document.frmSearch.m_path && document.frmSearch.m_path.value == '')
- document.frmSearch.m_path.value = "<out:value-of select="xtsext:javascriptencode(string($m_path))"/>";
-
- <xsl:if test="@type = 'tools'">
- if (document.frmSearch.m_newsearch && document.frmSearch.m_newsearch.value != 'true')
- document.frmSearch.m_newsearch.value = "true";
- </xsl:if>
- document.frmSearch.sfield.value = g_sfield;
- var isXSSCheckingOn = <out:value-of select="$isXSSCheckingOn='true'"/>;
-
- if (isXSSCheckingOn
- <xsl:if test="string(@indexSearch) = 'true'">
- || (g_sfield == 'k' && document.frmSearch.cs_filter && document.frmSearch.cs_filter.value != '')
- </xsl:if>
- ) {
- document.frmSearch.method = "post";
- <xsl:for-each select="mt:close-params/param">
- document.frmSearch["<xsl:value-of select="."/>"].value = document.frmSearch_dummy["unencoded_<xsl:value-of select="."/>"].value;
- </xsl:for-each>
- } else {
- <xsl:if test="string(@indexSearch) = 'true'">
- if (!isXSSCheckingOn)
- document.frmSearch.method = "get";
- if (g_sfield != 'k') {
- document.frmSearch.cs_filter.value = "";
- document.frmSearch.open_list.value = "";
- }
-
- if (wsrp_rewrite_isNewSearchTerms(document.frmSearch.stext.value, m_sLastSearch)) {
- //new search terms, clear the filters and open nodes
- document.frmSearch.cs_filter.value = "";
- document.frmSearch.open_list.value = "";
- }
- </xsl:if>
- }
-
- <!-- set to indicate that we can use cs_filter data that was stored in the runtime session -->
- <xsl:if test="string(@indexSearch) = 'true'">
- if (g_sfield == 'k' && document.frmSearch.cs_filter && document.frmSearch.cs_filter.value != '') {
- document.frmSearch.t_cs_filter_saved.value = 'true';
- } else {
- document.frmSearch.t_cs_filter_saved.value = '';
- }
- </xsl:if>
- <!-- temporarily hide the newSearch div -->
- var divNewSearch = document.getElementById("divNewSearch");
- if (divNewSearch) {
- divNewSearch.style.display = "none";
- }
- if (document.frmSearch.onsubmit) {
- document.frmSearch.onsubmit();
- }
-
-
- document.frmSearch.submit();
-
- if (!bTreeFilterSearch)
- document.images["imgSearch"].src = imgAnimatedSearch.src;
- }
- function onsubmitHandler(bNewSearch)
- {
- <xsl:if test="string(@indexSearch) = 'true'">
- if (document.frmSearch.sfield.value == 'k') {
- setTimeout('wsrp_rewrite_showSearchBusy(true)',100);
- }
- </xsl:if>
- }
- var m_sLastSearch = '<out:value-of select="xtsext:javascriptencode(string($stext))"/>';
- function newSearch()
- {
- <!-- reset form variable to defaulted values -->
- var frmSearch = document.frmSearch;
- if (frmSearch.stext)
- frmSearch.stext.value = "";
- if (frmSearch.cs_filter)
- frmSearch.cs_filter.value = "";
- if (frmSearch.t_cs_filter_saved)
- frmSearch.t_cs_filter_saved.value = "";
- if (frmSearch.open_list)
- frmSearch.open_list.value = "";
- if (frmSearch.stype_is)
- setSearchIndexType('any','<xts:string id="IDS_ANY" encode="javascript"/>');
- <!-- hide the result div -->
- var wsrp_rewrite_div_results = document.getElementById("wsrp_rewrite_div_results");
- if (wsrp_rewrite_div_results) {
- wsrp_rewrite_div_results.innerHTML = "";
- }
- <!-- hide the newSearch div -->
- var divNewSearch = document.getElementById("divNewSearch");
- if (divNewSearch) {
- divNewSearch.style.display = "none";
- }
- clearRelatedReportsHintText();
- wsrp_rewrite_hideSearchBusy();
- document.frmSearch.stext.focus();
- }
-
- function searchKeyHandler(event)
- {
- var key = -1;
- if (event && event.which)
- key = event.which;
- else if (window.event)
- key = window.event.keyCode;
- if (key==13) {
- doSearch();
- return false;
- }
- }
-
- function init()
- {
- <!--
- // When returning to the Portal window after launching RS, we do not want to
- // give focus to the search field b/c it causes the portal window to jump in front of the RS window.
- -->
- <out:if test="not(key('env-param','sf'))">
- if (document.frmSearch.stext)
- document.frmSearch.stext.focus();
- </out:if>
- }
- function setSearchMode(field)
- {
- <xsl:if test="string(@indexSearch) != 'true'">
- return;
- </xsl:if>
- var userCanUseIndexSearch = <out:value-of select="$userCanUseIndexSearch"/>;
- if (!userCanUseIndexSearch) {
- document.getElementById('searchOptions_basic').style.display = "";
- } else {
- var pform = document.frmSearch;
- var sfield = "";
- //for (var i=0; i < pform.sfield.length; i++) {
- // if (pform.sfield[i].selected) {
- // sfield = pform.sfield[i].value;
- // break;
- // }
- //}
- sfield = (field) ? field : document.frmSearch.sfield.value;
- if (sfield == '' || sfield == 'k') {
- document.getElementById('searchOptions_index').style.display = "";
- document.getElementById('searchOptions_basic').style.display = "none";
- }
- else
- {
- document.getElementById('searchOptions_basic').style.display = "";
- document.getElementById('searchOptions_index').style.display = "none";
- }
- }
- }
- var g_sfield = '<out:value-of select="$field"/>';
- function setFindTextIn(selected_value, caption)
- {
- var findTextInMenu_caption = document.getElementById("findTextInMenu_caption");
- if (findTextInMenu_caption) {
- findTextInMenu_caption.innerHTML = caption;
- }
- <!--document.frmSearch.sfield.value = selected_value;-->
- g_sfield = selected_value;
- setSearchMode(g_sfield);
- clearRelatedReportsHintText();
- //set focus back to the drop down element
- var dropDownEl = document.getElementById("findTextInMenu_drop_down");
- if (dropDownEl != null){
- dropDownEl.focus();
- }
- }
- function clearRelatedReportsHintText()
- {
- var hint = document.getElementById('showRelatedReportsDescriptionText');
- if (hint) {
- hint.style.display = "none";
- }
- }
- <!-- +++++++++++++ Set Flyout Caption Functions ++++++++++++++ -->
-
- function setSearchMethod(selected_value,caption)
- {
- var searchMethodMenu_caption = document.getElementById("searchMethodMenu_caption");
- if( searchMethodMenu_caption )
- searchMethodMenu_caption.innerHTML = caption;
- if (document.frmSearch.smethod)
- document.frmSearch.smethod.value = selected_value;
- //set focus back to the drop down element
- var dropDownEl = document.getElementById("searchMethodMenu_drop_down");
- if (dropDownEl != null){
- dropDownEl.focus();
- }
- }
- function setSearchModified(selected_value,caption)
- {
- var searchModifiedMenu_caption = document.getElementById("searchModifiedMenu_caption");
- if( searchModifiedMenu_caption )
- searchModifiedMenu_caption.innerHTML = caption;
- if (document.frmSearch.smodified)
- document.frmSearch.smodified.value = selected_value;
- //set focus back to the drop down element
- var dropDownEl = document.getElementById("searchModifiedMenu_drop_down");
- if (dropDownEl != null){
- dropDownEl.focus();
- }
- }
- function setSearchType(selected_value,caption)
- {
- var searchTypeMenu_caption = document.getElementById("searchTypeMenu_caption");
- if( searchTypeMenu_caption )
- searchTypeMenu_caption.innerHTML = caption;
- if (document.frmSearch.stype)
- document.frmSearch.stype.value = selected_value;
- //set focus back to the drop down element
- var dropDownEl = document.getElementById("searchTypeMenu_drop_down");
- if (dropDownEl != null){
- dropDownEl.focus();
- }
-
- }
- function setSearchIndexType(selected_value,caption)
- {
- var searchTypeMenu_caption = document.getElementById("searchIndexTypeMenu_caption");
- if( searchTypeMenu_caption )
- searchTypeMenu_caption.innerHTML = caption;
- if (document.frmSearch.stype_is)
- document.frmSearch.stype_is.value = selected_value;
- }
- function setSearchScope(selected_value,caption)
- {
- var searchScopeMenu_caption = document.getElementById("searchScopeMenu_caption");
- if( searchScopeMenu_caption )
- searchScopeMenu_caption.innerHTML = caption;
- if (document.frmSearch.sscope)
- document.frmSearch.sscope.value = selected_value;
- //need to set the focus back to the drop down element since the menu will
- //close
- var searchScopeDropDownEl = document.getElementById("searchScopeDropDown");
- if (searchScopeDropDownEl != null){
- searchScopeDropDownEl.focus();
- }
-
-
-
- }
- </script>
-
- <!-- Ridiculous (but well formed!) hack to prevent the browser from showing a blank line at the top of the page. Ugh !-->
- <table cellpadding="0" cellspacing="0">
- <out:variable name="submitMethod">
- <out:choose>
- <out:when test="$isXSSCheckingOn='true'">post</out:when>
- <out:otherwise>
- <xsl:choose>
- <xsl:when test="string(@indexSearch) = 'true'">
- <out:choose>
- <out:when test="string(/root/env/param[@name='cs_filter']) != ''
- or string(/root/env/param[@name='sourceContext']) != ''
- ">
- <out:value-of select="'post'"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="'get'"/>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="'get'"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <tr>
- <td><out:text disable-output-escaping="yes"><</out:text>form name="frmSearch" style="margin:0px" onsubmit="onsubmitHandler();" method="<out:value-of select="$submitMethod"/>" action="<out:value-of select="$gateway"/>"<out:text disable-output-escaping="yes">></out:text><input type="hidden" name="backURL" ><out:attribute name="value"><out:value-of select="key('env-param', 'backURL')"/></out:attribute></input></td>
- </tr>
- </table>
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <lyt:layout joinSection="yes" style="1" width="%100">
- <lyt:section>
- <!-- search mode: render search mode radios - basic | index searches - if user can use index search -->
- <!-- text edit box: -->
- <dp:list padding="0">
- <dp:section>
- <!-- Find text in: -->
- <dp:label valign="top" width="1%" nospace="true"><xts:string id="IDS_FIND_TXT_IN"/></dp:label>
- <dp:link wrap="wrap" valign="top">
-
- <input name="sfield" id="sfield" type="hidden" value="{'{$field}'}"/>
-
- <out:variable name="findTextInMenu">
- <flyout id="findTextInMenu" hasCheckbox="true">
- <label><xts:string encode="javascript" id="IDS_SEARCH_FINDTEXT_MENU"/></label>
- <items>
- <itemGroup id="findTextInMenuGroup">
- <xsl:if test="not(mt:fields) or mt:fields/mt:field='k'">
- <out:if test="$indexSearch='true' and $userCanUseIndexSearch or $singleField = 'k'">
- <item id="findTextInMenu_k">
- <out:if test="$field = 'k'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_KEYWORD"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_k");setFindTextIn('k','<xts:string id="IDS_KEYWORD" encode="javascript"/>');</action>
- </item>
- </out:if>
- </xsl:if>
-
- <xsl:if test="not(mt:fields) or mt:fields/mt:field='n'">
- <item id="findTextInMenu_n">
- <out:if test="$field = 'n'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_NAME_FIELD"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_n");setFindTextIn('n','<xts:string id="IDS_NAME_FIELD" encode="javascript"/>');</action>
- </item>
- </xsl:if>
-
- <xsl:if test="not(mt:fields) or mt:fields/mt:field='d'">
- <item id="findTextInMenu_d">
- <out:if test="$field = 'd'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_DESC_FIELD"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_d");setFindTextIn('d','<xts:string id="IDS_DESC_FIELD" encode="javascript"/>');</action>
- </item>
- </xsl:if>
-
- <xsl:if test="not(mt:fields) or mt:fields/mt:field='nd'">
- <item id="findTextInMenu_nd">
- <out:if test="$field = 'nd'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_NAME_DESC_FIELD"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("findTextInMenu_nd");setFindTextIn('nd','<xts:string id="IDS_NAME_DESC_FIELD" encode="javascript"/>');</action>
- </item>
- </xsl:if>
- </itemGroup>
- </items>
- </flyout>
- </out:variable>
-
- <div id="findTextInMenu_span" style="margin-left:5px;z-index:10;position: relative;">
- <table id="findTextInMenu_drop_down" cellspacing="0" cellpadding="0" style="position:relative; cursor:pointer;" tabindex="0"
- onkeypress="return CCPopupMenu.dropDown(event,0,0,'findTextInMenu');"
- onclick="return CCPopupMenu.dropDown(event,0,0,'findTextInMenu');" role="button" aria-haspopup="true">
- <tr>
- <td nowrap="true" valign="top">
- <!-- since this anchor is not inside a form and has an event handler must provide a role...in this case -->
- <a role="presentation" class="ccOptions" style="text-decoration:underline;" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
- <label id="findTextInMenu_caption" for="stext">
- <out:choose>
- <out:when test="$field = 'k'">
- <xts:string id="IDS_KEYWORD"/>
- </out:when>
- <out:when test="$field = 'n'">
- <xts:string id="IDS_NAME_FIELD"/>
- </out:when>
- <out:when test="$field = 'd'">
- <xts:string id="IDS_DESC_FIELD"/>
- </out:when>
- <out:when test="$field = 'nd'">
- <xts:string id="IDS_NAME_DESC_FIELD"/>
- </out:when>
- </out:choose>
- </label>
- </a>
- </td>
- <td nowrap="true" valign="top">
- <img name="findTextInMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
- </td>
- </tr>
- </table>
- </div>
-
- <out:call-template name="renderPopup">
- <out:with-param name="flyoutXML">
- <out:copy-of select="$findTextInMenu"/>
- </out:with-param>
- <out:with-param name="controlID">findTextInMenu_span</out:with-param>
- </out:call-template>
- </dp:link>
- </dp:section>
- </dp:list>
- <dp:list>
- <dp:section width="100%">
- <table border="0" width="100%" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <td>
- <input type="text" size="65" name="stext" id="stext" onkeypress="return searchKeyHandler(event);" style="margin-right:2px;">
- <out:attribute name="value"><out:value-of select="$stext"/></out:attribute>
- </input>
- </td>
- <dp:button>
- <dp:defaultAct>doSearch();</dp:defaultAct>
- <a href="javascript:doSearch()" role="button">
- <dp:buttonText><xts:string id="IDS_SEARCH_BUTTON"/></dp:buttonText>
- <dp:buttonImage name="imgSearch" dp:tooltip=" ">{$image_root}action_search.gif</dp:buttonImage>
- </a>
- </dp:button>
- <td>
- <cf:dynamicExpandingSectionTop indent="no" name="b_search" title="IDS_ADV_SEARCH_OPTIONS" expanding="yes" border="no">
- <xsl:if test="string(@indexSearch) = 'true'">
- <xsl:attribute name="callback-func">clearRelatedReportsHintText();wsrp_rewrite_resizeHandler();</xsl:attribute>
- </xsl:if>
- </cf:dynamicExpandingSectionTop>
- </td>
- <td>
- <out:if test="(string($field) = 'k' or string($field) = '') and $userCanUseIndexSearch">
- <div id="divNewSearch">
- <out:if test="not(/root/search/navSearchSpec or string(/root/search/expression) != '')">
- <out:attribute name="style">display:none</out:attribute>
- </out:if>
- <dp:group>
- <dp:groupItem style="padding-left:5px;padding-right:8px;">
- <div style="height:18px;" class="ccOptionsDivider"/>
- </dp:groupItem>
- <dp:groupItem tdClass="formLink">
- <dp:link>
- <nobr><a href="javascript:newSearch()"><xts:string id="IDS_SEARCH_NEW_SEARCH"/></a></nobr>
- </dp:link>
- </dp:groupItem>
- </dp:group>
- </div>
- </out:if>
- </td>
- </tr>
- </table>
- </dp:section>
- </dp:list>
-
- <xsl:if test="string(@indexSearch) = 'true'">
- <out:if test="$userCanUseIndexSearch and string(/root/env/param[@name='sourceContext']) != ''">
- <div id="showRelatedReportsDescriptionText">
- <dp:list>
- <dp:section>
- <dp:hint wrap="true" nospace="true" width="400px">
- <xts:string id="IDS_SHOW_RELATEDREPORTS_TEXT"/>
- </dp:hint>
- </dp:section>
- </dp:list>
- </div>
- </out:if>
- </xsl:if>
- </lyt:section>
- </lyt:layout>
- <!-- Advanced options - body -->
- <cf:dynamicExpandingSectionBody name="b_search" title="IDS_ADV_SEARCH_OPTIONS" expanding="yes" border="no">
- <dp:group>
- <dp:groupItem>
- <img height="1" width="10" src="{'{$webcontent}'}/images/space.gif"/>
- </dp:groupItem>
- <dp:groupItem width="100%" tdClass="sectionBackground">
- <!-- Index search options -->
- <xsl:if test="string(@indexSearch) = 'true'">
- <div id="searchOptions_index">
- <out:if test="not($field = 'k')">
- <out:attribute name="style">
- <out:value-of select="'display:none'"/>
- </out:attribute>
- </out:if>
- <xsl:call-template name="generate-indexSearchFlyouts-block"/>
- </div>
- </xsl:if>
- <!-- Basic search options -->
- <div id="searchOptions_basic">
- <xsl:if test="string(@indexSearch) = 'true'">
- <out:if test="$field = 'k'">
- <out:attribute name="style">
- <out:value-of select="'display:none'"/>
- </out:attribute>
- </out:if>
- </xsl:if>
- <xsl:call-template name="generate-basicSearchFlyouts-block"/>
- </div>
- </dp:groupItem>
- </dp:group>
- </cf:dynamicExpandingSectionBody>
- </td>
- </tr>
- </table>
- <!-- Standard xts command variables -->
- <input type="hidden" name="b_action" value="xts.run"/>
- <input type="hidden" name="m" value="{'{$app}/{$mname}'}"/>
- <xsl:if test="@type = 'tools'">
- <input type="hidden" name="m_newsearch" value="false"/>
- </xsl:if>
- <!-- Generate hidden inputs that represent the state of the view that called this search page so that it is maintained. -->
- <xsl:for-each select="mt:close-params/param">
- <input type="hidden" name="{.}">
- <xsl:attribute name="value">
- <!-- use "xss" to force a XSS-encoding to be carried out on value that is already XSS-encoded -->
- <xsl:text/>{xtsext:protect(string(key('env-param','<xsl:value-of select="."/>')), 'xss', concat('NAME','<xsl:value-of select="."/>'),'getdata')}<xsl:text/>
- </xsl:attribute>
- </input>
- </xsl:for-each>
- <!-- Search control parameters -->
- <input type="hidden" name="search">
- <out:attribute name="value"><out:value-of select=" key('env-param','search') "/></out:attribute>
- </input>
-
- <xsl:if test="string(@indexSearch) = 'true'">
- <!-- extra index search params -->
- <input type="hidden" name="cs_filter" value=""/>
- <input type="hidden" name="t_cs_filter_saved" value="{'{key("env-param","cs_filter") != ""}'}"/>
- <input type="hidden" name="cs_tree" value="true"/>
- <input type="hidden" name="cs_requestversion" value="2"/>
- <input id="wsrp_rewrite_allFilters_input" type="hidden" name="all_filters" value="{'{$all_filters}'}"/>
- <input type="hidden" name="open_list"/>
- <input type="hidden" name="desc_expanded" value="{'{key("env-param","desc_expanded")}'}"/>
- <input name="m_pagerfromsearch" type="hidden" value="{'{key("env-param","m_pagerfromsearch")}'}"/>
- <input name="m_pagertosearch" type="hidden" value="{'{key("env-param","m_pagertosearch")}'}"/>
- <input name="m_pg_esearch" type="hidden" value="{'{key("env-param","m_pg_esearch")}'}"/>
- <input name="m_searchsection" type="hidden" value="{'{key("env-param","m_searchsection")}'}"/>
- <input name="m_searchcontext" type="hidden" value="{'{key("env-param","m_searchcontext")}'}"/>
- <input name="ps_nav_op" type="hidden" value=""/>
- </xsl:if>
- <!-- Request UI customization parameter -->
- <input type="hidden" name="rui">
- <out:attribute name="value"><out:value-of select=" key('env-param','rui') "/></out:attribute>
- </input>
- <!-- Was not painful enough to do this at the top, now we have to make it "well formed" Ugh! Ugh! -->
- <table cellpadding="0" cellspacing="0">
- <tr><td><out:text disable-output-escaping="yes"><</out:text>/form<out:text disable-output-escaping="yes">></out:text></td></tr>
- </table>
-
- <form name="frmSearch_dummy" style="margin:0px">
- <xsl:for-each select="mt:close-params/param">
- <!-- POST parameters -->
- <input type="hidden" name="unencoded_{.}">
- <xsl:attribute name="value">
- <xsl:text/>{string(key('env-param','<xsl:value-of select="."/>'))}<xsl:text/>
- </xsl:attribute>
- </input>
- </xsl:for-each>
- </form>
- </xsl:template>
- <!--
- Template - mt:directPath:
- Used in lieu of path control in search dialog (tools_service_monitor currently
- only file to use)
- Operation:
- Generates either the search button or the close button for the search.
- -->
- <xsl:template match="mt:directPath">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>{$gateway}?b_action=xts.run&m={$app}/{$mname}<xsl:text/>
- <xsl:for-each select="mt:close-params/param">
- <xsl:text/>&<xsl:value-of select="."/>={xtsext:protect(xtsext:urlencode(string(key('env-param','<xsl:value-of select="."/>'))),'url',concat('NAME','<xsl:value-of select="."/>'),'getdata')}<xsl:text/>
- </xsl:for-each>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="mt:searchLabel">
- <xsl:variable name="lab">
- <xsl:value-of select="mt:searchLabel"/>
- </xsl:variable>
- <xts:string id="{$lab}"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_CLOSE"/>
- </xsl:otherwise>
- </xsl:choose>
- </a> 
- </xsl:template>
- <xsl:template name="generate-basicSearchFlyouts-block">
- <dp:list width="100%">
- <dp:section width="100%">
- <dp:list width="50%">
- <dp:section>
- <dp:label valign="top" width="1%" nospace="true">
- <div> <xts:string id="IDS_SEARCH_METHOD"/></div></dp:label>
- <dp:link wrap="wrap" valign="top">
- <out:variable name="smethodDefault">
- <out:choose>
- <out:when test="/root/env/param[@name='queryNamespaceSearchDefaultMethodOptionSetting'] = 'true'">
- <out:variable name="option" select="/root/configProps/param[@name='cc']/property[@name='portal.namespaceSearchDefaultMethodOption']"/>
- <out:choose>
- <out:when test="$option = 'contains'">1</out:when>
- <out:when test="$option = 'starts'">2</out:when>
- <out:when test="$option = 'equals'">3</out:when>
- <out:otherwise>1</out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>1</out:otherwise>
- </out:choose>
- </out:variable>
-
- <input name="smethod" id="smethod" type="hidden">
- <out:attribute name="value">
- <out:choose>
- <out:when test="$smethod = ''"><out:value-of select="$smethodDefault"/></out:when>
- <out:otherwise><out:value-of select="$smethod"/></out:otherwise>
- </out:choose>
- </out:attribute>
- </input>
- <out:variable name="searchMethodMenu">
- <flyout id="searchMethodMenu" hasCheckbox="true">
- <label><xts:string encode="javascript" id="IDS_SEARCH_METHOD_MENU"/></label>
- <items>
- <itemGroup id="searchMethodGroup">
- <item id="searchMethod_1">
- <out:if test="$smethod = '1' or ($smethod = '' and $smethodDefault = '1')">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_CONTAINS"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_1");setSearchMethod('1','<xts:string id="IDS_CONTAINS" encode="javascript"/>');</action>
- </item>
- <item id="searchMethod_2">
- <out:if test="$smethod = '2' or ($smethod = '' and $smethodDefault = '2')">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_STARTS_WITH"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_2");setSearchMethod('2','<xts:string id="IDS_STARTS_WITH" encode="javascript"/>');</action>
- </item>
- <item id="searchMethod_3">
- <out:if test="$smethod = '3' or ($smethod = '' and $smethodDefault = '3')">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_EQUALS"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchMethod_3");setSearchMethod('3','<xts:string id="IDS_EQUALS" encode="javascript"/>');</action>
- </item>
- </itemGroup>
- </items>
- </flyout>
- </out:variable>
- <div id="searchMethodMenu_span" style="margin-left:5px;z-index:9;position: relative;">
- <table cellspacing="0" id="searchMethodMenu_drop_down" cellpadding="0" style="cursor:pointer;" tabindex="0"
- onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchMethodMenu');"
- onclick="return CCPopupMenu.dropDown(event,0,0,'searchMethodMenu');" role="button" aria-haspopup="true">
- <tr>
- <td nowrap="true" valign="top">
- <div class="ccOptions" style="text-decoration:underline" role="presentation" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
- <span id="searchMethodMenu_caption">
- <out:choose>
- <out:when test="$smethod = '1' or ($smethod = '' and $smethodDefault = '1')">
- <xts:string id="IDS_CONTAINS"/>
- </out:when>
- <out:when test="$smethod = '2' or ($smethod = '' and $smethodDefault = '2')">
- <xts:string id="IDS_STARTS_WITH"/>
- </out:when>
- <out:when test="$smethod = '3' or ($smethod = '' and $smethodDefault = '3')">
- <xts:string id="IDS_EQUALS"/>
- </out:when>
- </out:choose>
- </span>
- </div>
- </td>
- <td nowrap="true" valign="top">
- <img name="searchMethodMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
- </td>
- </tr>
- </table>
- </div>
- <out:call-template name="renderPopup">
- <out:with-param name="flyoutXML">
- <out:copy-of select="$searchMethodMenu"/>
- </out:with-param>
- <out:with-param name="controlID">searchMethodMenu_span</out:with-param>
- </out:call-template>
- </dp:link>
- </dp:section>
- <xsl:choose>
- <xsl:when test="not(@modified) or @modified != 'no' ">
- <dp:section>
- <dp:label valign="top" width="1%" nospace="true">
- <div>
- <xts:string id="IDS_SEARCH_MODIFIED"/>
- </div>
- </dp:label>
- <dp:link wrap="wrap" valign="top">
-
-
- <input name="smodified" id="smodified" type="hidden">
- <out:attribute name="value">
- <out:choose>
- <out:when test="$modified = ''">any</out:when>
- <out:otherwise><out:value-of select="$modified"/></out:otherwise>
- </out:choose>
- </out:attribute>
- </input>
-
-
- <out:variable name="searchModifiedMenu">
- <flyout id="searchModifiedMenu" hasCheckbox="true">
- <label><xts:string encode="javascript" id="IDS_SEARCH_MODIFIED_MENU"/></label>
- <items>
- <itemGroup id="searchModifiedGroup">
- <item id="searchModified_a">
- <out:if test="$modified = 'any' or $modified = ''">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_ANY_DATE"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_a");setSearchModified('any','<xts:string id="IDS_ANY_DATE" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_t">
- <out:if test="$modified = '2'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_TODAY"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_t");setSearchModified('t','<xts:string id="IDS_MODIFIED_TODAY" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_l3d">
- <out:if test="$modified = 'l3d'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_LAST3DAYS"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3d");setSearchModified('l3d','<xts:string id="IDS_MODIFIED_LAST3DAYS" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_lw">
- <out:if test="$modified = 'lw'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_LASTWEEK"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_lw");setSearchModified('lw','<xts:string id="IDS_MODIFIED_LASTWEEK" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_lm">
- <out:if test="$modified = 'lm'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_LASTMONTH"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_lm");setSearchModified('lm','<xts:string id="IDS_MODIFIED_LASTMONTH" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_l3m">
- <out:if test="$modified = 'l3m'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_LAST3MONTH"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3m");setSearchModified('l3m','<xts:string id="IDS_MODIFIED_LAST3MONTH" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_l6m">
- <out:if test="$modified = 'l6m'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_LAST6MONTH"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l6m");setSearchModified('l6m','<xts:string id="IDS_MODIFIED_LAST6MONTH" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_ly">
- <out:if test="$modified = 'ly'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_LASTYEAR"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_ly");setSearchModified('ly','<xts:string id="IDS_MODIFIED_LASTYEAR" encode="javascript"/>');</action>
- </item>
- <item id="searchModified_l3y">
- <out:if test="$modified = 'l3y'">
- <out:attribute name="itemSelectedState">checked</out:attribute>
- </out:if>
- <text><xts:string id="IDS_MODIFIED_LAST3YEARS"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchModified_l3y");setSearchModified('l3y','<xts:string id="IDS_MODIFIED_LAST3YEARS" encode="javascript"/>');</action>
- </item>
- </itemGroup>
- </items>
- </flyout>
- </out:variable>
-
- <div id="searchModifiedMenu_span" style="margin-left:5px;z-index:8;position: relative;">
- <table id="searchModifiedMenu_drop_down" cellspacing="0" cellpadding="0" style="cursor:pointer;" tabindex="0"
- onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchModifiedMenu');"
- onclick="return CCPopupMenu.dropDown(event,0,0,'searchModifiedMenu');" role="button" aria-haspopup="true">
- <tr>
- <td nowrap="true" valign="top">
- <div role="presentation" class="ccOptions" style="text-decoration:underline" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
- <span id="searchModifiedMenu_caption">
- <out:choose>
- <out:when test=" $modified = 'any' or $modified = ''">
- <xts:string id="IDS_ANY_DATE"/>
- </out:when>
- <out:when test=" $modified = 't' ">
- <xts:string id="IDS_MODIFIED_TODAY"/>
- </out:when>
- <out:when test=" $modified = 'l3d' ">
- <xts:string id="IDS_MODIFIED_LAST3DAYS"/>
- </out:when>
- <out:when test=" $modified = 'lw' ">
- <xts:string id="IDS_MODIFIED_LASTWEEK"/>
- </out:when>
- <out:when test=" $modified = 'lm' ">
- <xts:string id="IDS_MODIFIED_LASTMONTH"/>
- </out:when>
- <out:when test=" $modified = 'l3m' ">
- <xts:string id="IDS_MODIFIED_LAST3MONTH"/>
- </out:when>
- <out:when test=" $modified = 'l6m' ">
- <xts:string id="IDS_MODIFIED_LAST6MONTH"/>
- </out:when>
- <out:when test=" $modified = 'ly' ">
- <xts:string id="IDS_MODIFIED_LASTYEAR"/>
- </out:when>
- <out:when test=" $modified = 'l3y' ">
- <xts:string id="IDS_MODIFIED_LAST3YEARS"/>
- </out:when>
- </out:choose>
- </span>
- </div>
- </td>
- <td nowrap="true" valign="top">
- <img name="searchModifiedMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
- </td>
- </tr>
- </table>
- </div>
- <out:call-template name="renderPopup">
- <out:with-param name="flyoutXML">
- <out:copy-of select="$searchModifiedMenu"/>
- </out:with-param>
- <out:with-param name="controlID">searchModifiedMenu_span</out:with-param>
- </out:call-template>
- </dp:link>
- </dp:section>
- </xsl:when>
- <xsl:otherwise>
- <dp:section>
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td> </td>
- </tr>
- </table>
- </dp:section>
- </xsl:otherwise>
- </xsl:choose>
- </dp:list>
- <dp:list width="50%">
- <xsl:if test="mt:stypes[not(@indexSearch)]">
- <out:if test="not(/root/env/param[@name='tool_tab']) or /root/env/param[@name='tool_tab']!='p'">
- <dp:section>
- <dp:label valign="top" width="1%" nospace="true">
- <div>
- <xts:string id="IDS_ENTRY_TYPE"/>
- </div>
- </dp:label>
- <dp:link wrap="wrap" valign="top">
-
- <!-- Create flyout for type -->
-
- <out:variable name="searchTypeItems">
- <xsl:apply-templates select="./mt:stypes[not(@indexSearch)]" mode="ddTypes">
- <xsl:with-param name="isIdx" select="'false'"/>
- </xsl:apply-templates>
- </out:variable>
-
- <input name="stype" id="stype" type="hidden">
- <out:attribute name="value">
- <out:choose>
- <out:when test="$type = ''">any</out:when>
- <out:otherwise><out:value-of select="$type"/></out:otherwise>
- </out:choose>
- </out:attribute>
- </input>
-
- <out:variable name="searchTypeMenu">
- <flyout id="searchTypeMenu" hasCheckbox="true">
- <label><xts:string encode="javascript" id="IDS_SEARCH_TYPE_MENU"/></label>
- <items>
- <itemGroup id="searchTypeGroup">
- <out:for-each select="$searchTypeItems/item">
- <out:variable name="curVal" select="@value"/>
- <out:variable name="ck">
- <out:choose>
- <out:when test="$type = $curVal">checked</out:when>
- <out:when test="($type = 'any' or $type = '') and position()=1">checked</out:when>
- </out:choose>
- </out:variable>
- <item>
- <out:if test="$ck!=''">
- <out:attribute name="itemSelectedState"><out:value-of select="$ck"/></out:attribute>
- </out:if>
- <out:copy-of select="@*[name()!='itemSelectedState' and name()!='value']"/>
- <out:copy-of select="./*"/>
- </item>
- </out:for-each>
- </itemGroup>
- </items>
- </flyout>
- </out:variable>
-
- <div id="searchTypeMenu_span" style="margin-left:5px;z-index:9;position: relative;">
- <table id="searchTypeMenu_drop_down" cellspacing="0" cellpadding="0" style="cursor:pointer;" tabindex="0"
- onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchTypeMenu');"
- onclick="return CCPopupMenu.dropDown(event,0,0,'searchTypeMenu');" role="button" aria-haspopup="true">
- <tr>
- <td nowrap="true" valign="top">
- <div class="ccOptions" style="text-decoration:underline" role="presentation" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
- <span id="searchTypeMenu_caption">
- <out:value-of select="$searchTypeMenu//item[string(@itemSelectedState)='checked']/*"/>
- </span>
- </div>
- </td>
- <td nowrap="true" valign="top">
- <img name="searchTypeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
- </td>
- </tr>
- </table>
- </div>
-
- <out:call-template name="renderPopup">
- <out:with-param name="flyoutXML">
- <out:copy-of select="$searchTypeMenu"/>
- </out:with-param>
- <out:with-param name="controlID">searchTypeMenu_span</out:with-param>
- </out:call-template>
-
- </dp:link>
- </dp:section>
- </out:if>
- </xsl:if>
- <!-- Scope: -->
- <xsl:if test="mt:scopes//mt:scope[string() != '']">
- <dp:section>
- <dp:label valign="top" width="1%" nospace="true">
- <div>
- <xts:string id="IDS_SCOPE"/>
- </div>
- </dp:label>
- <dp:link wrap="wrap" valign="top">
-
- <!-- Create flyout for scope -->
-
- <out:variable name="searchScopeItems">
- <xsl:apply-templates select="./mt:scopes" mode="ddScopes"/>
- </out:variable>
-
- <input name="sscope" id="sscope" type="hidden">
- <out:attribute name="value">
- <out:choose>
- <out:when test="$scope = ''"><out:value-of select="$searchScopeItems/item[1]/@value"/></out:when>
- <out:otherwise><out:value-of select="$scope"/></out:otherwise>
- </out:choose>
- </out:attribute>
- </input>
-
- <out:variable name="searchScopeMenu">
- <flyout id="searchScopeMenu" hasCheckbox="true">
- <label><xts:string encode="javascript" id="IDS_SEARCH_SCOPE_MENU"/></label>
- <items>
- <itemGroup id="searchScopeGroup">
- <out:for-each select="$searchScopeItems/item">
- <out:variable name="curVal" select="@value"/>
- <out:variable name="ck">
- <out:choose>
- <out:when test="$scope = $curVal">checked</out:when>
- <out:when test="$scope = '' and position()=1">checked</out:when>
- </out:choose>
- </out:variable>
- <item>
- <out:if test="$ck!=''">
- <out:attribute name="itemSelectedState"><out:value-of select="$ck"/></out:attribute>
- </out:if>
- <out:copy-of select="@*[name()!='itemSelectedState' and name()!='value']"/>
- <out:copy-of select="./*"/>
- </item>
- </out:for-each>
- </itemGroup>
- </items>
- </flyout>
- </out:variable>
-
- <div id="searchScopeMenu_span" style="margin-left:5px;z-index:8;position: relative;">
- <table id="searchScopeDropDown" cellspacing="0" cellpadding="0" style="cursor:pointer;" tabindex="0"
- onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchScopeMenu');"
- onclick="return CCPopupMenu.dropDown(event,0,0,'searchScopeMenu');" role="button" aria-haspopup="true">
- <tr>
- <td nowrap="true" valign="top">
- <div class="ccOptions" role="presentation" style="text-decoration:underline" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
- <span id="searchScopeMenu_caption">
- <out:value-of select="$searchScopeMenu//item[string(@itemSelectedState)='checked']/*"/>
- </span>
- </div>
- </td>
- <td nowrap="true" valign="top">
- <img name="searchScopeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
- </td>
- </tr>
- </table>
- </div>
-
- <out:call-template name="renderPopup">
- <out:with-param name="flyoutXML">
- <out:copy-of select="$searchScopeMenu"/>
- </out:with-param>
- <out:with-param name="controlID">searchScopeMenu_span</out:with-param>
- </out:call-template>
-
- </dp:link>
- </dp:section>
- </xsl:if>
- <xsl:if test="not(mt:stypes[not(@indexSearch)])">
- <dp:section>
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td> </td>
- </tr>
- </table>
- </dp:section>
- </xsl:if>
- </dp:list>
- </dp:section>
- </dp:list>
- <xsl:if test="mt:scopes//mt:hiddenscope">
- <xsl:apply-templates select="mt:scopes//mt:hiddenscope"/>
- </xsl:if>
- </xsl:template>
- <xsl:template name="generate-indexSearchFlyouts-block">
- <dp:list width="100%">
- <dp:section width="100%">
- <!-- Method: -->
- <dp:list width="50%">
- <dp:section><dp:text/></dp:section>
- <dp:section><dp:label><xts:string id="IDS_SEARCH_METHOD"/></dp:label><xts:string id="IDS_SEARCH_METHOD_FULL_KEYWORD_TEXT"/></dp:section>
- <dp:section><dp:text/></dp:section>
- </dp:list>
- <xsl:if test="mt:stypes[@indexSearch]">
- <dp:list width="50%">
- <dp:section>
- <dp:label width="1%" nospace="true"><xts:string id="IDS_ENTRY_TYPE"/></dp:label>
- <dp:link wrap="wrap" valign="top">
-
- <!-- Create flyout for type -->
-
- <out:variable name="searchIndexTypeItems">
- <xsl:apply-templates select="./mt:stypes[@indexSearch]" mode="ddTypes">
- <xsl:with-param name="isIdx" select="'true'"/>
- </xsl:apply-templates>
- </out:variable>
-
- <input id="stype_is" name="stype_is" type="hidden">
- <out:attribute name="value">
- <out:choose>
- <out:when test="$type_is = ''">any</out:when>
- <out:otherwise><out:value-of select="$type_is"/></out:otherwise>
- </out:choose>
- </out:attribute>
- </input>
-
- <out:variable name="searchIndexTypeMenu">
- <flyout id="searchIndexTypeMenu" hasCheckbox="true">
- <label><xts:string encode="javascript" id="IDS_SEARCH_TYPE_MENU"/></label>
- <items>
- <itemGroup id="searchIndexTypeGroup">
- <out:for-each select="$searchIndexTypeItems/item">
- <out:variable name="curVal" select="@value"/>
- <out:variable name="ck">
- <out:choose>
- <out:when test="$type_is = $curVal">checked</out:when>
- <out:when test="($type_is = 'any' or $type_is = '') and position()=1">checked</out:when>
- </out:choose>
- </out:variable>
- <item>
- <out:if test="$ck!=''">
- <out:attribute name="itemSelectedState"><out:value-of select="$ck"/></out:attribute>
- </out:if>
- <out:copy-of select="@*[name()!='itemSelectedState' and name()!='value']"/>
- <out:copy-of select="./*"/>
- </item>
- </out:for-each>
- </itemGroup>
- </items>
- </flyout>
- </out:variable>
-
- <div id="searchIndexTypeMenu_span" style="margin-left:5px;z-index:9;position: relative">
- <table cellspacing="0" cellpadding="0" style="cursor:pointer;" tabindex="0"
- onkeypress="return CCPopupMenu.dropDown(event,0,0,'searchIndexTypeMenu');"
- onclick="return CCPopupMenu.dropDown(event,0,0,'searchIndexTypeMenu');" role="button">
- <tr>
- <td nowrap="true" valign="top">
- <div role="presentation" class="ccOptions" style="text-decoration:underline" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
- <span id="searchIndexTypeMenu_caption">
- <out:value-of select="$searchIndexTypeMenu//item[string(@itemSelectedState)='checked']/*"/>
- </span>
- </div>
- </td>
- <td nowrap="true" valign="top">
- <img name="searchIndexTypeMenu_imgFlyControl" src="{'{$skin_shared_images}'}dropdown_arrow.gif" title="" alt=""/>
- </td>
- </tr>
- </table>
- </div>
-
- <out:call-template name="renderPopup">
- <out:with-param name="flyoutXML">
- <out:copy-of select="$searchIndexTypeMenu"/>
- </out:with-param>
- <out:with-param name="controlID">searchIndexTypeMenu_span</out:with-param>
- </out:call-template>
-
- </dp:link>
- </dp:section>
- </dp:list>
- </xsl:if>
- </dp:section>
- </dp:list>
- </xsl:template>
- <!--
- Template - mt:scopes: FOR FLYOUT SEARCH
- Placeholder.
- Operation:
- apply all templates.
- -->
-
- <xsl:template match="mt:scopes" priority="1" mode="ddScopes">
- <out:choose>
- <out:when test="/root/page/type = 'customsearch'">
- <xsl:apply-templates select="./*[@customsearch='true']" mode="ddScope"/>
- </out:when>
- <out:otherwise>
- <xsl:apply-templates mode="ddScope"/>
- </out:otherwise>
- </out:choose>
- </xsl:template>
-
- <!--
- Template - mt:scope: FOR FLYOUT SEARCH
- Create item tags named searchScope_xxx
- Operation:
- Create item element structure consumed in the generate-basicSearchFlyouts-block.
- -->
- <xsl:template match="mt:scope" priority="1" mode="ddScope">
- <xsl:variable name="curVal" select="string()"/>
- <xsl:if test="$curVal != ''">
- <item id="searchScope_{$curVal}" value="{$curVal}">
- <out:variable name="scopeString">
- <xsl:choose>
- <xsl:when test="$curVal = 'any'">
- <xsl:choose>
- <xsl:when test="@type = 'security'"><xts:string id="IDS_FILTER_CURRENT_NAMESPACE"/></xsl:when>
- <xsl:otherwise><xts:string id="IDS_ANY"/></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$curVal = 'fb'"><xts:string id="IDS_THIS_FOLDER_BELOW"/></xsl:when>
- <xsl:when test="$curVal = 'fo'"><xts:string id="IDS_THIS_FOLDER_ONLY"/></xsl:when>
- <xsl:when test="$curVal = 'm'">
- <out:choose>
- <out:when test="key('session-param', 'e_mroot') != ''">
- <out:value-of select="key('session-param', 'e_mroot')"/>
- </out:when>
- <out:otherwise>
- <xts:string id="IDS_PERSONAL"/>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:when test="$curVal = 'p'">
- <out:choose>
- <out:when test="key('session-param', 'e_proot') != ''">
- <out:value-of select="key('session-param', 'e_proot')"/>
- </out:when>
- <out:otherwise>
- <xts:string id="IDS_PUBLIC"/>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:when test="$curVal = 's'"><xts:string id="IDS_MYSUB_MYSUBSCRIPTIONS"/></xsl:when>
- </xsl:choose>
- </out:variable>
- <text><out:value-of select="$scopeString"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("searchScope_<xsl:value-of select="xtsext:javascriptencode(string($curVal))"/>");setSearchScope('<xsl:value-of select="xtsext:javascriptencode(string($curVal))"/>','<out:value-of select="xtsext:javascriptencode(string($scopeString))"/>');</action>
- </item>
- </xsl:if>
- </xsl:template>
- <!--
- Template - FOR FLYOUT SEARCH
- Scope Placeholder.
- Operation:
- apply all templates.
- -->
-
- <xsl:template match="*" mode="ddScope">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="ddScope"/>
- </xsl:copy>
- </xsl:template>
- <!--
- Template - mt:stypes: FOR FLYOUT SEARCH
- Placeholder.
- Operation:
- generate the searchType_any item element.
- apply all templates.
- -->
- <xsl:template match="mt:stypes" priority="1" mode="ddTypes">
- <xsl:param name="isIdx" select="''"/>
- <xsl:variable name="idxName">
- <xsl:if test="$isIdx = 'true'">Index</xsl:if>
- </xsl:variable>
- <item id="search{$idxName}Type_any">
- <text><xts:string id="IDS_ANY"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("search<xsl:value-of select="xtsext:javascriptencode(string($idxName))"/>Type_any");setSearch<xsl:value-of select="xtsext:javascriptencode(string($idxName))"/>Type('any','<xts:string id="IDS_ANY" encode="javascript"/>');</action>
- </item>
- <xsl:apply-templates mode="ddType">
- <xsl:with-param name="isIdx" select="$isIdx"/>
- </xsl:apply-templates>
- </xsl:template>
- <!--
- Template - mt:stype:
- Create item tags named searchType_xxx
- Operation:
- Create item element structure consumed in the generate-basicSearchFlyouts-block.
- -->
-
- <xsl:template match="mt:stype" mode="ddType">
- <xsl:param name="isIdx" select="''"/>
- <xsl:variable name="idxName">
- <xsl:if test="$isIdx = 'true'">Index</xsl:if>
- </xsl:variable>
- <xsl:variable name="curVal" select="@name"/>
- <xsl:if test="$curVal != ''">
- <item id="search{$idxName}Type_{$curVal}" value="{$curVal}">
- <out:variable name="txtVal"><xsl:copy-of select="./*"/></out:variable>
- <text><out:value-of select="$txtVal"/></text>
- <action>CCPopupMenu.activeMenu.setMenuItemChecked("search<xsl:value-of select="xtsext:javascriptencode(string($idxName))"/>Type_<xsl:value-of select="xtsext:javascriptencode(string($curVal))"/>");setSearch<xsl:value-of select="xtsext:javascriptencode(string($idxName))"/>Type('<xsl:value-of select="xtsext:javascriptencode(string($curVal))"/>','<out:value-of select="xtsext:javascriptencode(string($txtVal))"/>');</action>
- </item>
- </xsl:if>
- </xsl:template>
-
- <!--
- Template - FOR FLYOUT SEARCH
- Type Placeholder.
- Operation:
- apply all templates.
- -->
-
- <xsl:template match="*" mode="ddType">
- <xsl:param name="isIdx" select="''"/>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates select="./*" mode="ddType">
- <xsl:with-param name="isIdx" select="$isIdx"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="mt:hiddenscope" priority="1">
- <xsl:if test="string(.) != ''">
- <input type="hidden" name="sscope" id="sscope">
- <xsl:attribute name="value"><xsl:value-of select="string(.)"/></xsl:attribute>
- </input>
- </xsl:if>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
-
- </xsl:stylesheet>
|