banner_searchControl_for_migrated_themes.jspf

 

<%-- Licensed Materials - Property of IBM, 5724-E76, (C) Copyright IBM Corp. 2001, 2004, 2006 - All Rights reserved.

        NOTE: See notes in Default.jsp for information regarding editing theme JSP fragments.   

--%>
<%!
	private static com.ibm.portal.model.PortalLocalizedContextHome localizedContextHome = null;
        private java.util.Locale getDojoLocale(javax.servlet.jsp.PageContext pageContext) {
        	java.util.Locale locale = pageContext.getRequest().getLocale();
        	
		if (localizedContextHome == null) {
			try {
				javax.naming.Context ctx = new javax.naming.InitialContext();
				localizedContextHome = (com.ibm.portal.model.PortalLocalizedContextHome) ctx.lookup(com.ibm.portal.model.PortalLocalizedContextHome.JNDI_NAME);       
			} catch ( javax.naming.NamingException ne ) {
			}    
		}
		
		if (localizedContextHome != null) {
			com.ibm.portal.model.LocalizedContext context = localizedContextHome.getLocalizedContext( pageContext );
			locale = context.getPreferredSupportedLocale();
		}
        	   	
        	return locale;
        }        
%>
<%@page import="com.ibm.wps.services.config.Config" %>
<%@ taglib uri="/WEB-INF/tld/SearchMenuControl.tld"             prefix="searchmenu" %>
<%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-navigation" prefix="portal-navigation6" %>
<%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-fmt" prefix="portal-fmt6" %>
<%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-logic" prefix="portal-logic6" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 

<c:set var="setPrefs"><portal-fmt6:text bundle="com.ibm.lotus.search.taglib.ScopeSearchWidget" key="setPrefs"/></c:set>
<c:set var="viewHelp"><portal-fmt6:text bundle="com.ibm.lotus.search.taglib.ScopeSearchWidget" key="viewHelp"/></c:set>
<c:set var="showResults"><portal-fmt6:text bundle="com.ibm.lotus.search.taglib.ScopeSearchWidget" key="showResults"/></c:set>
  <td nowrap="nowrap" align="right" valign="middle" class="wpsLinkBar">
<link rel="stylesheet" type="text/css" href="<%= com.ibm.wps.services.config.Config.URI_CONTEXT_PATH %>/themes/dojo/portal_dojo/dijit/themes/tundra/tundra.css"/>
<portal-fmt6:bidi dir="rtl">
	<link rel="stylesheet" type="text/css" href="<%= com.ibm.wps.services.config.Config.URI_CONTEXT_PATH %>/themes/dojo/portal_dojo/dijit/themes/tundra/tundra_rtl.css"/>
</portal-fmt6:bidi>
<link rel="stylesheet" type="text/css" href="<%= Config.URI_CONTEXT_PATH %>/search/css/searchWidgets.css" />

<script type="text/javascript">
	if (typeof djConfig == "undefined" ) { 
		djConfig = {locale: '<%=getDojoLocale(pageContext)%>'.replace(/_/, '-').replace(/iw/, 'he')}; //fix locale compatibility issues in Dojo 
	}
	if (typeof dojo == "undefined") {		
		document.writeln('<scr'+'ipt src="' + '<%= com.ibm.wps.services.config.Config.URI_CONTEXT_PATH %>/themes/dojo/portal_dojo/dojo/dojo.js' + '"></scr'+'ipt>');
	}
</script>

<script type="text/javascript">
dojo.require('ibm.portal.portlet.portlet');
dojo.require('ibm.portal.xml.xpath'); 
dojo.require('ibm.portal.xml.xslt');
dojo.require("ibm.portal.search.widgets.ScopeSearchWidget");
var portalThemeScopeSearchWidgetResourceBundle = <searchmenu:resourceBundle bundleName='com.ibm.lotus.search.taglib.ScopeSearchWidget'/>;
</script>
<%--This hidden image solves a problem with image refreshing in Firefox, which causes the search menu icon to disappear--%>
<img border="0" style="display: none" alt="" src="<portal-logic6:urlFindInTheme file="icons/ShowActions.gif"/>"/>
<div id="themeSearchBoxContainer" style="text-align: <%=bidiAlignRight%>">
<div dojoType="ibm.portal.search.widgets.ScopeSearchWidget"
        searchIcon="'<portal-logic6:urlFindInTheme file="icons/scope_search_submit.gif"/>'"
        searchMenuIcon="'<portal-logic6:urlFindInTheme file="icons/ShowActions.gif"/>'"
<portal-navigation6:urlGeneration contentNode="ibm.portal.Search Center" layoutNode="ibm.portal.Search Center Portlet Window" portletParameterType="action">
<portal-navigation6:urlParam name="javax.portlet.action" value="newQuery" type="action"/>
        submitUrl="<%wpsURL.write(out);%>"
</portal-navigation6:urlGeneration>
        resourceBundle="portalThemeScopeSearchWidgetResourceBundle"
        sourceContentNode="<searchmenu:currentContentNode/>"
	searchFeedUrl="'<searchmenu:generateSearchFeedUrl/>'"
	timeStamp="<searchmenu:scopesLastUpdateTime/>">
</div>
</div>  
<script type="text/javascript">
function initSearchLinks () {
        var themeScopeSearchWidget = dijit.byId("ibm_portal_search_widgets_ScopeSearchWidget_0");
        if (themeScopeSearchWidget == null) {
                dojo.parser.parse("themeSearchBoxContainer");
                themeScopeSearchWidget = dijit.byId("ibm_portal_search_widgets_ScopeSearchWidget_0");
        }
        themeScopeSearchWidget.addSearchLink({
                label: '<c:out value='${setPrefs}' escapeXml='true' />',
<portal-navigation6:urlGeneration contentNode="ibm.portal.Search Center" layoutNode="ibm.portal.Search Center Portlet Window" portletMode="edit">
                link: '<%wpsURL.write(out);%>',
</portal-navigation6:urlGeneration>
                icon: '<portal-logic6:urlFindInTheme file="icons/scope_search_preferences.gif"/>'
        });
        themeScopeSearchWidget.addSearchLink({
                label: '<c:out value='${viewHelp}' escapeXml='true' />',
<portal-navigation6:urlGeneration contentNode="ibm.portal.Search Center" layoutNode="ibm.portal.Search Center Portlet Window" 
        portletWindowState="solo" portletMode="help" newWindow="true">
                link: '<%wpsURL.write(out);%>',
</portal-navigation6:urlGeneration>
                newWindow: true,
                icon: '<portal-logic6:urlFindInTheme file="icons/scope_search_help.gif"/>'
        });
        themeScopeSearchWidget.addSearchLink({
                label: '<c:out value='${showResults}' escapeXml='true' />',
<portal-navigation6:urlGeneration contentNode="ibm.portal.Search Center" layoutNode="ibm.portal.Search Center Portlet Window" portletParameterType="render">
                link: '<%wpsURL.write(out);%>',
</portal-navigation6:urlGeneration>
                icon: '<portal-logic6:urlFindInTheme file="icons/scope_search_return.gif"/>'
        });
}
dojo.addOnLoad(initSearchLinks);
</script>
</td>