Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2010-10-11 19:59:55 +0000
committerChris Goldthorpe2010-10-11 19:59:55 +0000
commitb9ec68386c09b14e58775962cf6b47957323bfd2 (patch)
tree57bc5bb127683a047a38cfa0ae94b3f1a2b1815b /org.eclipse.help.webapp
parent2811ead829db3e54ec0e233d80602c5a417d24d5 (diff)
downloadeclipse.platform.ua-b9ec68386c09b14e58775962cf6b47957323bfd2.tar.gz
eclipse.platform.ua-b9ec68386c09b14e58775962cf6b47957323bfd2.tar.xz
eclipse.platform.ua-b9ec68386c09b14e58775962cf6b47957323bfd2.zip
Bug 305895 - [Webapp] Need an indication that a filter has been applied - add show all link
Diffstat (limited to 'org.eclipse.help.webapp')
-rw-r--r--org.eclipse.help.webapp/advanced/indexView.css10
-rw-r--r--org.eclipse.help.webapp/advanced/indexView.jsp2
-rw-r--r--org.eclipse.help.webapp/advanced/searchList.css8
-rw-r--r--org.eclipse.help.webapp/advanced/searchScoped.jsp28
-rw-r--r--org.eclipse.help.webapp/advanced/searchView.jsp9
-rw-r--r--org.eclipse.help.webapp/advanced/tocTree.css6
-rw-r--r--org.eclipse.help.webapp/advanced/tocView.jsp2
-rw-r--r--org.eclipse.help.webapp/advanced/view.js19
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties3
9 files changed, 72 insertions, 15 deletions
diff --git a/org.eclipse.help.webapp/advanced/indexView.css b/org.eclipse.help.webapp/advanced/indexView.css
index 83b2f09cd..7bd31ca47 100644
--- a/org.eclipse.help.webapp/advanced/indexView.css
+++ b/org.eclipse.help.webapp/advanced/indexView.css
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Intel Corporation and others.
+ * Copyright (c) 2005, 2010 Intel 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
@@ -9,6 +9,7 @@
* Intel Corporation - initial API and implementation
* IBM Corporation 2006, refactored index view into a single frame
* IBM Corporation 2009, added style for .see
+ * IBM Corporation 2010, Added see all link
*******************************************************************************/
BODY {
@@ -212,4 +213,11 @@ A.nolink:hover {
visibility:hidden;
}
+.showall {
+ text-decoration:underline;
+ color:#0066FF;
+ cursor:pointer;
+}
+
+
diff --git a/org.eclipse.help.webapp/advanced/indexView.jsp b/org.eclipse.help.webapp/advanced/indexView.jsp
index 65ccada4f..1714da48c 100644
--- a/org.eclipse.help.webapp/advanced/indexView.jsp
+++ b/org.eclipse.help.webapp/advanced/indexView.jsp
@@ -57,6 +57,7 @@ var loadingMessage = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("Lo
<script language="JavaScript" src="helptreechildren.js"></script>
<script language="JavaScript" src="xmlajax.js"></script>
<script language="JavaScript" src="utils.js"></script>
+<script language="JavaScript" src="view.js"></script>
</head>
<body dir="<%=direction%>" onload="onloadHandler()" onresize = "sizeList()">
@@ -71,6 +72,7 @@ var loadingMessage = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("Lo
<tr>
<td colspan="2">
<%= searchData.getScopeActiveMessage() %>
+<a class="showall" onclick="showAll();" ><%=ServletResources.getString("showAllLink", request)%></a>
</p></td></tr>
<%
}
diff --git a/org.eclipse.help.webapp/advanced/searchList.css b/org.eclipse.help.webapp/advanced/searchList.css
index 98a21ce47..19cc1523d 100644
--- a/org.eclipse.help.webapp/advanced/searchList.css
+++ b/org.eclipse.help.webapp/advanced/searchList.css
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 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
@@ -56,6 +56,12 @@ a:hover {
height:100%;
}
+.showall {
+ text-decoration:underline;
+ color:#0066FF;
+ cursor:pointer;
+}
+
#menu {
position:absolute;
display:none;
diff --git a/org.eclipse.help.webapp/advanced/searchScoped.jsp b/org.eclipse.help.webapp/advanced/searchScoped.jsp
index bbec15a5b..25d22b47b 100644
--- a/org.eclipse.help.webapp/advanced/searchScoped.jsp
+++ b/org.eclipse.help.webapp/advanced/searchScoped.jsp
@@ -206,17 +206,14 @@ function doSearch(query, noRefocus)
{
var workingSet = document.getElementById("scope").firstChild.nodeValue;
- if (!query || query == "")
- {
- var form = document.forms["searchForm"];
- var searchWord = form.searchWord.value;
- var maxHits = form.maxHits.value;
- if (!searchWord || searchWord == "")
- return;
- query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits;
- if (workingSet != '<%=UrlUtil.JavaScriptEncode(ServletResources.getString("All", request))%>')
- query = query +"&scope="+encodeURIComponent(workingSet);
- }
+ var form = document.forms["searchForm"];
+ var searchWord = form.searchWord.value;
+ var maxHits = form.maxHits.value;
+ if (!searchWord || searchWord == "")
+ return;
+ query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits;
+ if (workingSet != '<%=UrlUtil.JavaScriptEncode(ServletResources.getString("All", request))%>')
+ query = query +"&scope="+encodeURIComponent(workingSet);
/******** HARD CODED VIEW NAME *********/
// do some tests to ensure the results are available
@@ -235,6 +232,15 @@ function doSearch(query, noRefocus)
}
}
+function getSearchWord() {
+ var form = document.forms["searchForm"];
+ var searchWord = form.searchWord.value;
+ if (searchWord ) {
+ return searchWord;
+ }
+ return "";
+}
+
function rescope() {
if (parent.parent.HelpFrame &&
parent.parent.HelpFrame.NavFrame &&
diff --git a/org.eclipse.help.webapp/advanced/searchView.jsp b/org.eclipse.help.webapp/advanced/searchView.jsp
index 9acb0331a..48cfde4bf 100644
--- a/org.eclipse.help.webapp/advanced/searchView.jsp
+++ b/org.eclipse.help.webapp/advanced/searchView.jsp
@@ -31,6 +31,7 @@
<base target="ContentViewFrame">
<script language="JavaScript" src="utils.js"></script>
<script language="JavaScript" src="list.js"></script>
+<script language="JavaScript" src="view.js"></script>
<script language="JavaScript">
var cookiesRequired = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("cookiesRequired", request))%>";
@@ -117,7 +118,12 @@ setTimeout('refresh()', 2000);
<%
return;
} else if (data.getResultsCount() == 0){
- out.write(data.getNotFoundMessage());
+ out.write(data.getNotFoundMessage());
+ if (data.isScopeActive()) {
+%>
+<a class="showall" onclick="showAll();" ><%=ServletResources.getString("showAllLink", request)%></a>
+<%
+ }
} else {
%>
<%
@@ -125,6 +131,7 @@ setTimeout('refresh()', 2000);
%>
<p>
<%= data.getScopeActiveMessage() %>
+<a class="showall" onclick="showAll();" ><%=ServletResources.getString("showAllLink", request)%></a>
</p>
<%
}
diff --git a/org.eclipse.help.webapp/advanced/tocTree.css b/org.eclipse.help.webapp/advanced/tocTree.css
index 32bef150a..050eb6de0 100644
--- a/org.eclipse.help.webapp/advanced/tocTree.css
+++ b/org.eclipse.help.webapp/advanced/tocTree.css
@@ -70,6 +70,12 @@ A {
white-space: nowrap;
}
+.showall {
+ text-decoration:underline;
+ color:#0066FF;
+ cursor:pointer;
+}
+
A:hover{
text-decoration:underline;
}
diff --git a/org.eclipse.help.webapp/advanced/tocView.jsp b/org.eclipse.help.webapp/advanced/tocView.jsp
index 94e65d014..a188dffea 100644
--- a/org.eclipse.help.webapp/advanced/tocView.jsp
+++ b/org.eclipse.help.webapp/advanced/tocView.jsp
@@ -32,6 +32,7 @@
<script language="JavaScript" src="xmlajax.js"></script>
<script language="JavaScript" src="utils.js"></script>
<script language="JavaScript" src="tocTree.js"></script>
+<script language="JavaScript" src="view.js"></script>
<script language="JavaScript">
@@ -136,6 +137,7 @@ if (requestData.isIE()){
%>
<p>
<%= searchData.getScopeActiveMessage() %>
+<a class="showall" onclick="showAll();" ><%=ServletResources.getString("showAllLink", request)%></a>
</p>
<%
}
diff --git a/org.eclipse.help.webapp/advanced/view.js b/org.eclipse.help.webapp/advanced/view.js
new file mode 100644
index 000000000..a3c7744d2
--- /dev/null
+++ b/org.eclipse.help.webapp/advanced/view.js
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *******************************************************************************/
+
+// Contains functions used by more than one view
+
+function showAll() {
+ var searchFrame = parent.parent.parent.parent.parent.HelpToolbarFrame.SearchFrame;
+ if (searchFrame.getSearchWord) {
+ searchFrame.location.replace("searchScoped.jsp?searchWord=" + searchFrame.getSearchWord() + "&workingSet=");
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties
index f3d141e6b..5b2f324e4 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties
@@ -39,7 +39,8 @@ QuickSearchTopic=Search selected topic
QuickSearchToc=Search selected topic and all subtopics
TocHeading=Contents
Close=Close
-activeScope=Results for scope {0}
+activeScope=Scope {0}:
+showAllLink=Show all
Nothing_found=Nothing found.
Nothing_found_in_scope=Nothing found in scope {0}.
Indexing=Indexing...

Back to the top