diff options
author | Chris Goldthorpe | 2009-09-08 20:03:27 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2009-09-08 20:03:27 +0000 |
commit | c25063b80d0549361d77ec15e1c829842aa992ae (patch) | |
tree | 4a8436fcad1e1f149df063386500643123a5ada1 /org.eclipse.ua.tests/jsp | |
parent | 3abfc7e4a66d4cfda754de4f4f96a8e861d169c6 (diff) | |
download | eclipse.platform.ua-c25063b80d0549361d77ec15e1c829842aa992ae.tar.gz eclipse.platform.ua-c25063b80d0549361d77ec15e1c829842aa992ae.tar.xz eclipse.platform.ua-c25063b80d0549361d77ec15e1c829842aa992ae.zip |
Bug 286177 [Webapp] Allow additional views to be added to the help webapp
Diffstat (limited to 'org.eclipse.ua.tests/jsp')
4 files changed, 122 insertions, 0 deletions
diff --git a/org.eclipse.ua.tests/jsp/advanced/titlesearchToolbar.jsp b/org.eclipse.ua.tests/jsp/advanced/titlesearchToolbar.jsp new file mode 100644 index 000000000..c19950198 --- /dev/null +++ b/org.eclipse.ua.tests/jsp/advanced/titlesearchToolbar.jsp @@ -0,0 +1,16 @@ +<%-- + Copyright (c) 2009 IBM Corporation and others. + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + IBM Corporation - initial API and implementation +--%> +<%@ include file="/advanced/header.jsp"%> + +<jsp:include page="/advanced/toolbar.jsp"> + <jsp:param name="script" value="navActions.js"/> + <jsp:param name="view" value="Title Search"/> +</jsp:include> diff --git a/org.eclipse.ua.tests/jsp/advanced/titlesearchView.jsp b/org.eclipse.ua.tests/jsp/advanced/titlesearchView.jsp new file mode 100644 index 000000000..0cd7e168c --- /dev/null +++ b/org.eclipse.ua.tests/jsp/advanced/titlesearchView.jsp @@ -0,0 +1,69 @@ +<%-- + Copyright (c) 2009 IBM Corporation and others. + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + IBM Corporation - initial API and implementation +--%> +<%@ include file="/advanced/header.jsp"%> +<%@ page import="org.eclipse.ua.tests.help.webextension.*" %> +<% + TitleSearchData data = new TitleSearchData(application, request, response); +%> + +<html> +<head> +<base target="ContentViewFrame"> +<script language="JavaScript"> + +function doSearch(query) +{ + var typein = document.getElementById("typein"); + var query ="searchWord="+encodeURIComponent(typein.value); + location.replace("titlesearchView.jsp?"+query); +} + +</script> +</head> + +<body> + +<table id="typeinTable"> + + <tr> + <td colspan="2"><p id="instruction">Search topic title</p></td> + </tr> + + <tr> + <td width="100%"><input type="text" id="typein"></td> + + <td><input type="button" id="button" value="Go" onclick="this.blur();doSearch()"></td> + + </tr> +</table> +<% + String searchWord = request.getParameter("searchWord"); + if (searchWord != null) { + TitleSearchData.SearchResult[] results = data.getSearchResults(); + if (results.length > 0) { + for (int r = 0; r < results.length; r++) { +%> +<br><a href = "<%=results[r].href%>"><%=results[r].title%></a> +<% + } + } else { +%> + <p>No match found for <%=searchWord%></p> +<% + } + } else { +%> + <p>Enter a search word</p> +<% + } +%> + +</html>
\ No newline at end of file diff --git a/org.eclipse.ua.tests/jsp/basic/titlesearchToolbar.jsp b/org.eclipse.ua.tests/jsp/basic/titlesearchToolbar.jsp new file mode 100644 index 000000000..43f006f9a --- /dev/null +++ b/org.eclipse.ua.tests/jsp/basic/titlesearchToolbar.jsp @@ -0,0 +1,16 @@ +<%-- + Copyright (c) 2009 IBM Corporation and others. + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + IBM Corporation - initial API and implementation +--%> +<%@ include file="/basic/header.jsp"%> + + +<jsp:include page="/basic/toolbar.jsp"> + <jsp:param name="view" value="Title Search"/> +</jsp:include>
\ No newline at end of file diff --git a/org.eclipse.ua.tests/jsp/basic/titlesearchView.jsp b/org.eclipse.ua.tests/jsp/basic/titlesearchView.jsp new file mode 100644 index 000000000..3d4251f06 --- /dev/null +++ b/org.eclipse.ua.tests/jsp/basic/titlesearchView.jsp @@ -0,0 +1,21 @@ +<%-- + Copyright (c) 2009 IBM Corporation and others. + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + IBM Corporation - initial API and implementation +--%> + +<html> +<body bgcolor="white"> + +<h1> +Title Search View +</h1> + +Title search not supported in basic mode + +</html>
\ No newline at end of file |