Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.79 KB | None | 0 0
  1. --- menu.jspf.1.2.2 2019-02-19 11:29:49.000000000 -0800
  2. +++ menu.jspf 2019-02-19 12:46:56.000000000 -0800
  3. @@ -72,157 +72,171 @@
  4. /* ]]> */
  5. </script>
  6. <form action="<%= request.getContextPath() %>/search" id="sbox" onsubmit="searchSubmit(this)">
  7. -<div id="qtbl">
  8. - <table>
  9. - <%
  10. - if (projects.size() != 0) {
  11. - %>
  12. - <tbody id="ptbl">
  13. - <tr>
  14. - <td id="projectLabelTd">
  15. - <label for="project">Project(s)</label>
  16. - </td>
  17. - <td colspan="2">
  18. - <select tabindex="8" class="q" id="project"
  19. - name="project" multiple="multiple" size="<%=
  20. - Math.min(15, projectsSize) %>"><%
  21. - SortedSet<String> pRequested = cfg.getRequestedProjects();
  22. - for (Group group : ph.getGroups()) {
  23. - Set<Project> groupProjects = ph.getAllGrouped(group);
  24. - if (groupProjects.size() > 0) {
  25. - %><optgroup label="<%= group.getName() %>"><%
  26. - for (Project p : groupProjects) {
  27. - if (!p.isIndexed()) {
  28. - continue;
  29. - }
  30. +<table>
  31. + <tbody>
  32. + <tr>
  33. + <td>
  34. + <table class="table table-striped table-bordered">
  35. + <tr>
  36. + <td><label for="full" title="The text token(s) or other fields to be found (lucene query, this is not full text!)">Full&nbsp;Search</label></td>
  37. + <td colspan="2"><input tabindex="1" class="q" name="full" id="full" type="text" value="<%=
  38. + Util.formQuoteEscape(queryParams.getFreetext()) %>"/></td>
  39. + </tr>
  40. + <tr>
  41. + <td><label for="defs" title="Definition of function/variable/class">Definition</label></td>
  42. + <td colspan="2"><input class="q" tabindex="2" name="defs" id="defs" type="text" value="<%=
  43. + Util.formQuoteEscape(queryParams.getDefs()) %>"/></td>
  44. + </tr>
  45. + <tr>
  46. + <td><label for="refs" title="Usage of function/variable/class">Symbol</label></td>
  47. + <td colspan="2"><input class="q" tabindex="3" name="refs" id="refs" type="text" value="<%=
  48. + Util.formQuoteEscape(queryParams.getRefs()) %>"/></td>
  49. + </tr>
  50. + <tr>
  51. + <td><label for="path" title="path or parts of it, no need to use dividers">File&nbsp;Path</label></td>
  52. + <td colspan="2"><input class="q" tabindex="4" name="path" id="path" type="text" value="<%=
  53. + Util.formQuoteEscape(queryParams.getPath()) %>"/></td>
  54. + </tr>
  55. + <%
  56. + if (cfg.getEnv().isHistoryEnabled()) {
  57. + %>
  58. + <tr>
  59. + <td><label for="hist" title="Search in log messages">History</label></td>
  60. + <td colspan="2"><input class="q" tabindex="5" name="hist" id="hist" type="text" value="<%=
  61. + Util.formQuoteEscape(queryParams.getHist()) %>"/></td>
  62. + </tr>
  63. + <%
  64. + }
  65. + %>
  66. + <tr>
  67. + <td id="typeLabelTd"><label for="type">Type</label></td>
  68. + <td><select class="q" tabindex="6" name="type" id="type"><%
  69. + String selection = queryParams.getType();
  70. + %>
  71. + <option value="">Any</option><%
  72. + for (Map.Entry<String, String> d : SearchHelper.getFileTypeDescriptions()) {
  73. + %>
  74. + <option value="<%= Util.formQuoteEscape(d.getKey()) %>"<%
  75. + if (d.getKey().equals(selection)) {
  76. + %> selected="selected"<%
  77. + }
  78. + %>><%= Util.htmlize(d.getValue()) %></option><%
  79. + }
  80. + %>
  81. + </select>
  82. + </td>
  83. + <td id="type-select-container">
  84. + <!-- filled with javascript -->
  85. + </td>
  86. + </tr>
  87. + <tr>
  88. + <td>
  89. + <div id="form-controls">
  90. + <input tabindex="9" class="submit btn" type="submit" value="Search"/>
  91. + <input tabindex="10" class="submit btn" onclick="javascript: clearSearchFrom();"
  92. + type="button" value="Clear"/>
  93. + <input tabindex="11" class="submit btn" onclick="window.open('help.jsp', '_blank');"
  94. + type="button" value="Help"/>
  95. + </div>
  96. + <div id="ltbl">
  97. + <!-- filled with javascript -->
  98. + </div>
  99.  
  100. - // TODO below "selected" has no effect if one refreshes the page
  101. - // with F5
  102. + </td>
  103. + </tr>
  104. + </table>
  105. + </td>
  106. + <td>
  107. + <div id="qtbl">
  108. + <table>
  109. + <%
  110. + if (projects.size() != 0) {
  111. + %>
  112. + <tbody id="ptbl">
  113. + <tr>
  114. + <td id="projectLabelTd">
  115. + <label for="project">Project(s)</label>
  116. + </td>
  117. + <td colspan="2">
  118. + <select tabindex="8" class="q" id="project"
  119. + name="project" multiple="multiple" size="<%=
  120. + Math.min(15, projectsSize) %>"><%
  121. + SortedSet<String> pRequested = cfg.getRequestedProjects();
  122. + for (Group group : ph.getGroups()) {
  123. + Set<Project> groupProjects = ph.getAllGrouped(group);
  124. + if (groupProjects.size() > 0) {
  125. + %><optgroup label="<%= group.getName() %>"><%
  126. + for (Project p : groupProjects) {
  127. + if (!p.isIndexed()) {
  128. + continue;
  129. + }
  130.  
  131. - %><option value="<%= p.getName() %>"<%
  132. - if (pRequested.contains(p.getName())) {
  133. - %> selected="selected"<%
  134. - pRequested.remove(p.getName());
  135. - }
  136. - if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
  137. - %> data-messages='<%= messages %>' <%
  138. - }
  139. - %>><%= Util.formQuoteEscape(p.getName()) %></option><%
  140. - }
  141. - %></optgroup><%
  142. - }
  143. - }
  144. + // TODO below "selected" has no effect if one refreshes the page
  145. + // with F5
  146.  
  147. - // Handle projects not listed in any group.
  148. - if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
  149. - %><optgroup label="Other"><%
  150. - }
  151. - for (Project p : ph.getAllUngrouped()) {
  152. - if (!p.isIndexed()) {
  153. - continue;
  154. - }
  155. + %><option value="<%= p.getName() %>"<%
  156. + if (pRequested.contains(p.getName())) {
  157. + %> selected="selected"<%
  158. + pRequested.remove(p.getName());
  159. + }
  160. + if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
  161. + %> data-messages='<%= messages %>' <%
  162. + }
  163. + %>><%= Util.formQuoteEscape(p.getName()) %></option><%
  164. + }
  165. + %></optgroup><%
  166. + }
  167. + }
  168.  
  169. - %><option value="<%= p.getName() %>"<%
  170. - if (pRequested.contains(p.getName())) {
  171. - %> selected="selected"<%
  172. - pRequested.remove(p.getName());
  173. - }
  174. - if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
  175. - %> data-messages='<%= messages %>' <%
  176. - }
  177. - %>><%= Util.formQuoteEscape(p.getName()) %></option><%
  178. - }
  179. - if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
  180. - %></optgroup><%
  181. - }
  182. - %></select>
  183. - </td>
  184. - </tr>
  185. - <tr>
  186. - <td colspan="3" >
  187. - <button tabindex="6" type="button"
  188. - onclick="javascript: selectAllProjects(); return false;"
  189. - >select all</button>
  190. - &nbsp;
  191. - <button tabindex="7" type="button"
  192. - onclick="javascript: invertAllProjects(); return false;"
  193. - >invert selection</button>
  194. - &nbsp;
  195. - <button tabindex="8" type="button"
  196. - onclick="javascript: deselectAllProjects(); return false;"
  197. - >clear</button>
  198. - </td>
  199. - </tr>
  200. - </tbody>
  201. - <%
  202. - }
  203. - %>
  204. - <tbody>
  205. - <tr>
  206. - <td><label for="full" title="The text token(s) or other fields to be found (lucene query, this is not full text!)">Full&nbsp;Search</label></td>
  207. - <td colspan="2"><input tabindex="1" class="q" name="full" id="full" type="text" value="<%=
  208. - Util.formQuoteEscape(queryParams.getFreetext()) %>"/></td>
  209. - </tr>
  210. - <tr>
  211. - <td><label for="defs" title="Definition of function/variable/class">Definition</label></td>
  212. - <td colspan="2"><input class="q" tabindex="2" name="defs" id="defs" type="text" value="<%=
  213. - Util.formQuoteEscape(queryParams.getDefs()) %>"/></td>
  214. - </tr>
  215. - <tr>
  216. - <td><label for="refs" title="Usage of function/variable/class">Symbol</label></td>
  217. - <td colspan="2"><input class="q" tabindex="3" name="refs" id="refs" type="text" value="<%=
  218. - Util.formQuoteEscape(queryParams.getRefs()) %>"/></td>
  219. - </tr>
  220. - <tr>
  221. - <td><label for="path" title="path or parts of it, no need to use dividers">File&nbsp;Path</label></td>
  222. - <td colspan="2"><input class="q" tabindex="4" name="path" id="path" type="text" value="<%=
  223. - Util.formQuoteEscape(queryParams.getPath()) %>"/></td>
  224. - </tr>
  225. - <%
  226. - if (cfg.getEnv().isHistoryEnabled()) {
  227. - %>
  228. - <tr>
  229. - <td><label for="hist" title="Search in log messages">History</label></td>
  230. - <td colspan="2"><input class="q" tabindex="5" name="hist" id="hist" type="text" value="<%=
  231. - Util.formQuoteEscape(queryParams.getHist()) %>"/></td>
  232. - </tr>
  233. - <%
  234. - }
  235. - %>
  236. - <tr>
  237. - <td id="typeLabelTd"><label for="type">Type</label></td>
  238. - <td><select class="q" tabindex="6" name="type" id="type"><%
  239. - String selection = queryParams.getType();
  240. - %>
  241. - <option value="">Any</option><%
  242. - for (Map.Entry<String, String> d : SearchHelper.getFileTypeDescriptions()) {
  243. - %>
  244. - <option value="<%= Util.formQuoteEscape(d.getKey()) %>"<%
  245. - if (d.getKey().equals(selection)) {
  246. - %> selected="selected"<%
  247. + if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
  248. + %><optgroup label="Other"><%
  249. + }
  250. + for (Project p : ph.getAllUngrouped()) {
  251. + if (!p.isIndexed()) {
  252. + continue;
  253. + }
  254. +
  255. + %><option value="<%= p.getName() %>"<%
  256. + if (pRequested.contains(p.getName())) {
  257. + %> selected="selected"<%
  258. + pRequested.remove(p.getName());
  259. + }
  260. + if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
  261. + %> data-messages='<%= messages %>' <%
  262. + }
  263. + %>><%= Util.formQuoteEscape(p.getName()) %></option><%
  264. + }
  265. + if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
  266. + %></optgroup><%
  267. + }
  268. + %></select>
  269. + </td>
  270. + </tr>
  271. + <tr>
  272. + <td colspan="3" >
  273. + <button tabindex="6" type="button"
  274. + onclick="javascript: selectAllProjects(); return false;"
  275. + >select all</button>
  276. + &nbsp;
  277. + <button tabindex="7" type="button"
  278. + onclick="javascript: invertAllProjects(); return false;"
  279. + >invert selection</button>
  280. + &nbsp;
  281. + <button tabindex="8" type="button"
  282. + onclick="javascript: deselectAllProjects(); return false;"
  283. + >clear</button>
  284. + </td>
  285. + </tr>
  286. + </tbody>
  287. + <%
  288. }
  289. - %>><%= Util.htmlize(d.getValue()) %></option><%
  290. - }
  291. - %>
  292. - </select>
  293. - </td>
  294. - <td id="type-select-container">
  295. - <!-- filled with javascript -->
  296. - </td>
  297. - </tr>
  298. + %>
  299. + </table>
  300. + </div>
  301. + </td>
  302. + </tr>
  303. </tbody>
  304. </table>
  305. -<div id="form-controls">
  306. - <input tabindex="9" class="submit btn" type="submit" value="Search"/>
  307. - <input tabindex="10" class="submit btn" onclick="javascript: clearSearchFrom();"
  308. - type="button" value="Clear"/>
  309. - <input tabindex="11" class="submit btn" onclick="window.open('help.jsp', '_blank');"
  310. - type="button" value="Help"/>
  311. -</div>
  312. -</div>
  313. -<div id="ltbl">
  314. - <!-- filled with javascript -->
  315. -</div>
  316. </form>
  317. <div class="clearfix"></div>
  318. <%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement