home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Eclipse SDK / eclipse-SDK-3.1.1-win32.exe / eclipse / plugins / org.eclipse.help.webapp_3.1.0 / advanced / searchView.jsp < prev    next >
Encoding:
Text File  |  2005-09-29  |  3.1 KB  |  121 lines

  1. <%--
  2.  Copyright (c) 2000, 2004 IBM Corporation and others.
  3.  All rights reserved. This program and the accompanying materials 
  4.  are made available under the terms of the Eclipse Public License v1.0
  5.  which accompanies this distribution, and is available at
  6.  http://www.eclipse.org/legal/epl-v10.html
  7.  
  8.  Contributors:
  9.      IBM Corporation - initial API and implementation
  10. --%>
  11. <%@ include file="header.jsp"%>
  12.  
  13. <% 
  14.     SearchData data = new SearchData(application, request, response);
  15.     // After each search we preserve the scope (working set), if any
  16.     // this need to be at the beginning, otherwise cookie is not written
  17.     if (data.isSearchRequest())
  18.         data.saveScope();
  19.  
  20.     WebappPreferences prefs = data.getPrefs();
  21. %>
  22.  
  23. <html>
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  26. <meta http-equiv="Pragma" content="no-cache">
  27. <meta http-equiv="Expires" content="-1">
  28.  
  29. <title><%=ServletResources.getString("SearchResults", request)%></title>
  30.  
  31. <style type="text/css">
  32. <%@ include file="list.css"%>
  33. </style>
  34.  
  35.  
  36. <base target="ContentViewFrame">
  37. <script language="JavaScript" src="list.js"></script>
  38. <script language="JavaScript">        
  39.  
  40. function refresh() 
  41.     window.location.replace("searchView.jsp?<%=request.getQueryString()%>");
  42. }
  43. </script>
  44.  
  45.  
  46. </head>
  47.  
  48. <body dir="<%=direction%>">
  49.  
  50. <%
  51. if (!data.isSearchRequest()) {
  52.     out.write(ServletResources.getString("doSearch", request));
  53. } else if (data.getQueryExceptionMessage()!=null) {
  54.     out.write(data.getQueryExceptionMessage());
  55. } else if (data.isProgressRequest()) {
  56. %>
  57.  
  58. <CENTER>
  59. <TABLE BORDER='0'>
  60.     <TR><TD><%=ServletResources.getString("Indexing", request)%></TD></TR>
  61.     <TR><TD ALIGN='<%=isRTL?"RIGHT":"LEFT"%>'>
  62.         <DIV STYLE='width:100px;height:16px;border:1px solid ThreeDShadow;'>
  63.             <DIV ID='divProgress' STYLE='width:<%=data.getIndexedPercentage()%>px;height:100%;background-color:Highlight'></DIV>
  64.         </DIV>
  65.     </TD></TR>
  66.     <TR><TD><%=data.getIndexedPercentage()%>% <%=ServletResources.getString("complete", request)%></TD></TR>
  67.     <TR><TD><br><%=ServletResources.getString("IndexingPleaseWait", request)%></TD></TR>
  68. </TABLE>
  69. </CENTER>
  70. <script language='JavaScript'>
  71. setTimeout('refresh()', 2000);
  72. </script>
  73. </body>
  74. </html>
  75.  
  76. <%
  77.     return;
  78. } else if (data.getResultsCount() == 0){
  79.     out.write(ServletResources.getString("Nothing_found", request));
  80. } else {
  81. %>
  82.  
  83. <table id='list'  cellspacing='0' >
  84.  
  85. <%
  86.     for (int topic = 0; topic < data.getResultsCount(); topic++)
  87.     {
  88.         if(data.isActivityFiltering() && !data.isEnabled(topic)){
  89.             continue;
  90.         }
  91. %>
  92.  
  93. <tr class='list' id='r<%=topic%>'>
  94.     <td class='score' align='<%=isRTL?"left":"right"%>'><%=data.getTopicScore(topic)%></td>
  95.     <td align='<%=isRTL?"right":"left"%>' class='label' nowrap>
  96.         <a id='a<%=topic%>' 
  97.            href="<%=data.getTopicHref(topic)%>" 
  98.            onmouseover="showStatus(event);return true;"
  99.            onmouseout="clearStatus();return true;"
  100.            onclick='parent.parent.parent.setContentToolbarTitle(this.title)' 
  101.            title="<%=data.getTopicTocLabel(topic)%>"><%=data.getTopicLabel(topic)%></a>
  102.     </td>
  103. </tr>
  104.  
  105. <%
  106.     }
  107. %>
  108. </table>
  109.  
  110. <%
  111. }
  112. %>
  113.  
  114. <script language="JavaScript">
  115.     selectTopicById('<%=data.getSelectedTopicId()%>');
  116. </script>
  117.  
  118. </body>
  119. </html>
  120.