All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.search.jsp Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */
--%>

<%@ include file="/init.jsp" %>

<%
String redirect = ParamUtil.getString(request, "redirect");

if (Validator.isNotNull(redirect)) {
	portletDisplay.setURLBack(redirect);
}

long groupId = ParamUtil.getLong(request, SearchPortletParameterNames.GROUP_ID);

String format = ParamUtil.getString(request, SearchPortletParameterNames.FORMAT);
%>


	



	
	
	

	
		
		

		
			
		
	

	<%@ include file="/main_search.jspf" %>

	
		
			<%@ include file="/open_search.jspf" %>
		
	



	$('#keywords').on(
		'keydown',
		function(event) {
			if (event.keyCode === 13) {
				search();
			}
		}
	);



	function addSearchProvider() {
		
			
			
		

		window.external.AddSearchProvider('<%= openSearchDescriptionXMLURL.toString() %>');
	}

	function search() {
		var form = AUI.$(document.fm);

		form.fm('<%= SearchContainer.DEFAULT_CUR_PARAM %>').val(1);

		var keywords = form.fm('keywords').val();

		keywords = keywords.replace(/^\s+|\s+$/, '');

		if (keywords != '') {
			submitForm(form);
		}
	}


<%
String pageSubtitle = LanguageUtil.get(request, "search-results");
String pageKeywords = LanguageUtil.get(request, "search");

if (Validator.isNotNull(searchDisplayContext.getKeywords())) {
	pageKeywords = searchDisplayContext.getKeywords();

	if (StringUtil.startsWith(pageKeywords, Field.ASSET_TAG_NAMES + StringPool.COLON)) {
		pageKeywords = StringUtil.replace(pageKeywords, Field.ASSET_TAG_NAMES + StringPool.COLON, StringPool.BLANK);
	}
}

PortalUtil.setPageSubtitle(pageSubtitle, request);
PortalUtil.setPageKeywords(pageKeywords, request);
%>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy