Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- menu.jspf.1.2.2 2019-02-19 11:29:49.000000000 -0800
- +++ menu.jspf 2019-02-19 12:46:56.000000000 -0800
- @@ -72,157 +72,171 @@
- /* ]]> */
- </script>
- <form action="<%= request.getContextPath() %>/search" id="sbox" onsubmit="searchSubmit(this)">
- -<div id="qtbl">
- - <table>
- - <%
- - if (projects.size() != 0) {
- - %>
- - <tbody id="ptbl">
- - <tr>
- - <td id="projectLabelTd">
- - <label for="project">Project(s)</label>
- - </td>
- - <td colspan="2">
- - <select tabindex="8" class="q" id="project"
- - name="project" multiple="multiple" size="<%=
- - Math.min(15, projectsSize) %>"><%
- - SortedSet<String> pRequested = cfg.getRequestedProjects();
- - for (Group group : ph.getGroups()) {
- - Set<Project> groupProjects = ph.getAllGrouped(group);
- - if (groupProjects.size() > 0) {
- - %><optgroup label="<%= group.getName() %>"><%
- - for (Project p : groupProjects) {
- - if (!p.isIndexed()) {
- - continue;
- - }
- +<table>
- + <tbody>
- + <tr>
- + <td>
- + <table class="table table-striped table-bordered">
- + <tr>
- + <td><label for="full" title="The text token(s) or other fields to be found (lucene query, this is not full text!)">Full Search</label></td>
- + <td colspan="2"><input tabindex="1" class="q" name="full" id="full" type="text" value="<%=
- + Util.formQuoteEscape(queryParams.getFreetext()) %>"/></td>
- + </tr>
- + <tr>
- + <td><label for="defs" title="Definition of function/variable/class">Definition</label></td>
- + <td colspan="2"><input class="q" tabindex="2" name="defs" id="defs" type="text" value="<%=
- + Util.formQuoteEscape(queryParams.getDefs()) %>"/></td>
- + </tr>
- + <tr>
- + <td><label for="refs" title="Usage of function/variable/class">Symbol</label></td>
- + <td colspan="2"><input class="q" tabindex="3" name="refs" id="refs" type="text" value="<%=
- + Util.formQuoteEscape(queryParams.getRefs()) %>"/></td>
- + </tr>
- + <tr>
- + <td><label for="path" title="path or parts of it, no need to use dividers">File Path</label></td>
- + <td colspan="2"><input class="q" tabindex="4" name="path" id="path" type="text" value="<%=
- + Util.formQuoteEscape(queryParams.getPath()) %>"/></td>
- + </tr>
- + <%
- + if (cfg.getEnv().isHistoryEnabled()) {
- + %>
- + <tr>
- + <td><label for="hist" title="Search in log messages">History</label></td>
- + <td colspan="2"><input class="q" tabindex="5" name="hist" id="hist" type="text" value="<%=
- + Util.formQuoteEscape(queryParams.getHist()) %>"/></td>
- + </tr>
- + <%
- + }
- + %>
- + <tr>
- + <td id="typeLabelTd"><label for="type">Type</label></td>
- + <td><select class="q" tabindex="6" name="type" id="type"><%
- + String selection = queryParams.getType();
- + %>
- + <option value="">Any</option><%
- + for (Map.Entry<String, String> d : SearchHelper.getFileTypeDescriptions()) {
- + %>
- + <option value="<%= Util.formQuoteEscape(d.getKey()) %>"<%
- + if (d.getKey().equals(selection)) {
- + %> selected="selected"<%
- + }
- + %>><%= Util.htmlize(d.getValue()) %></option><%
- + }
- + %>
- + </select>
- + </td>
- + <td id="type-select-container">
- + <!-- filled with javascript -->
- + </td>
- + </tr>
- + <tr>
- + <td>
- + <div id="form-controls">
- + <input tabindex="9" class="submit btn" type="submit" value="Search"/>
- + <input tabindex="10" class="submit btn" onclick="javascript: clearSearchFrom();"
- + type="button" value="Clear"/>
- + <input tabindex="11" class="submit btn" onclick="window.open('help.jsp', '_blank');"
- + type="button" value="Help"/>
- + </div>
- + <div id="ltbl">
- + <!-- filled with javascript -->
- + </div>
- - // TODO below "selected" has no effect if one refreshes the page
- - // with F5
- + </td>
- + </tr>
- + </table>
- + </td>
- + <td>
- + <div id="qtbl">
- + <table>
- + <%
- + if (projects.size() != 0) {
- + %>
- + <tbody id="ptbl">
- + <tr>
- + <td id="projectLabelTd">
- + <label for="project">Project(s)</label>
- + </td>
- + <td colspan="2">
- + <select tabindex="8" class="q" id="project"
- + name="project" multiple="multiple" size="<%=
- + Math.min(15, projectsSize) %>"><%
- + SortedSet<String> pRequested = cfg.getRequestedProjects();
- + for (Group group : ph.getGroups()) {
- + Set<Project> groupProjects = ph.getAllGrouped(group);
- + if (groupProjects.size() > 0) {
- + %><optgroup label="<%= group.getName() %>"><%
- + for (Project p : groupProjects) {
- + if (!p.isIndexed()) {
- + continue;
- + }
- - %><option value="<%= p.getName() %>"<%
- - if (pRequested.contains(p.getName())) {
- - %> selected="selected"<%
- - pRequested.remove(p.getName());
- - }
- - if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
- - %> data-messages='<%= messages %>' <%
- - }
- - %>><%= Util.formQuoteEscape(p.getName()) %></option><%
- - }
- - %></optgroup><%
- - }
- - }
- + // TODO below "selected" has no effect if one refreshes the page
- + // with F5
- - // Handle projects not listed in any group.
- - if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
- - %><optgroup label="Other"><%
- - }
- - for (Project p : ph.getAllUngrouped()) {
- - if (!p.isIndexed()) {
- - continue;
- - }
- + %><option value="<%= p.getName() %>"<%
- + if (pRequested.contains(p.getName())) {
- + %> selected="selected"<%
- + pRequested.remove(p.getName());
- + }
- + if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
- + %> data-messages='<%= messages %>' <%
- + }
- + %>><%= Util.formQuoteEscape(p.getName()) %></option><%
- + }
- + %></optgroup><%
- + }
- + }
- - %><option value="<%= p.getName() %>"<%
- - if (pRequested.contains(p.getName())) {
- - %> selected="selected"<%
- - pRequested.remove(p.getName());
- - }
- - if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
- - %> data-messages='<%= messages %>' <%
- - }
- - %>><%= Util.formQuoteEscape(p.getName()) %></option><%
- - }
- - if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
- - %></optgroup><%
- - }
- - %></select>
- - </td>
- - </tr>
- - <tr>
- - <td colspan="3" >
- - <button tabindex="6" type="button"
- - onclick="javascript: selectAllProjects(); return false;"
- - >select all</button>
- -
- - <button tabindex="7" type="button"
- - onclick="javascript: invertAllProjects(); return false;"
- - >invert selection</button>
- -
- - <button tabindex="8" type="button"
- - onclick="javascript: deselectAllProjects(); return false;"
- - >clear</button>
- - </td>
- - </tr>
- - </tbody>
- - <%
- - }
- - %>
- - <tbody>
- - <tr>
- - <td><label for="full" title="The text token(s) or other fields to be found (lucene query, this is not full text!)">Full Search</label></td>
- - <td colspan="2"><input tabindex="1" class="q" name="full" id="full" type="text" value="<%=
- - Util.formQuoteEscape(queryParams.getFreetext()) %>"/></td>
- - </tr>
- - <tr>
- - <td><label for="defs" title="Definition of function/variable/class">Definition</label></td>
- - <td colspan="2"><input class="q" tabindex="2" name="defs" id="defs" type="text" value="<%=
- - Util.formQuoteEscape(queryParams.getDefs()) %>"/></td>
- - </tr>
- - <tr>
- - <td><label for="refs" title="Usage of function/variable/class">Symbol</label></td>
- - <td colspan="2"><input class="q" tabindex="3" name="refs" id="refs" type="text" value="<%=
- - Util.formQuoteEscape(queryParams.getRefs()) %>"/></td>
- - </tr>
- - <tr>
- - <td><label for="path" title="path or parts of it, no need to use dividers">File Path</label></td>
- - <td colspan="2"><input class="q" tabindex="4" name="path" id="path" type="text" value="<%=
- - Util.formQuoteEscape(queryParams.getPath()) %>"/></td>
- - </tr>
- - <%
- - if (cfg.getEnv().isHistoryEnabled()) {
- - %>
- - <tr>
- - <td><label for="hist" title="Search in log messages">History</label></td>
- - <td colspan="2"><input class="q" tabindex="5" name="hist" id="hist" type="text" value="<%=
- - Util.formQuoteEscape(queryParams.getHist()) %>"/></td>
- - </tr>
- - <%
- - }
- - %>
- - <tr>
- - <td id="typeLabelTd"><label for="type">Type</label></td>
- - <td><select class="q" tabindex="6" name="type" id="type"><%
- - String selection = queryParams.getType();
- - %>
- - <option value="">Any</option><%
- - for (Map.Entry<String, String> d : SearchHelper.getFileTypeDescriptions()) {
- - %>
- - <option value="<%= Util.formQuoteEscape(d.getKey()) %>"<%
- - if (d.getKey().equals(selection)) {
- - %> selected="selected"<%
- + if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
- + %><optgroup label="Other"><%
- + }
- + for (Project p : ph.getAllUngrouped()) {
- + if (!p.isIndexed()) {
- + continue;
- + }
- +
- + %><option value="<%= p.getName() %>"<%
- + if (pRequested.contains(p.getName())) {
- + %> selected="selected"<%
- + pRequested.remove(p.getName());
- + }
- + if (!(messages = MessagesUtils.messagesToJson(p)).isEmpty()) {
- + %> data-messages='<%= messages %>' <%
- + }
- + %>><%= Util.formQuoteEscape(p.getName()) %></option><%
- + }
- + if (ph.getGroups().size() > 0 && ph.getAllUngrouped().size() > 0) {
- + %></optgroup><%
- + }
- + %></select>
- + </td>
- + </tr>
- + <tr>
- + <td colspan="3" >
- + <button tabindex="6" type="button"
- + onclick="javascript: selectAllProjects(); return false;"
- + >select all</button>
- +
- + <button tabindex="7" type="button"
- + onclick="javascript: invertAllProjects(); return false;"
- + >invert selection</button>
- +
- + <button tabindex="8" type="button"
- + onclick="javascript: deselectAllProjects(); return false;"
- + >clear</button>
- + </td>
- + </tr>
- + </tbody>
- + <%
- }
- - %>><%= Util.htmlize(d.getValue()) %></option><%
- - }
- - %>
- - </select>
- - </td>
- - <td id="type-select-container">
- - <!-- filled with javascript -->
- - </td>
- - </tr>
- + %>
- + </table>
- + </div>
- + </td>
- + </tr>
- </tbody>
- </table>
- -<div id="form-controls">
- - <input tabindex="9" class="submit btn" type="submit" value="Search"/>
- - <input tabindex="10" class="submit btn" onclick="javascript: clearSearchFrom();"
- - type="button" value="Clear"/>
- - <input tabindex="11" class="submit btn" onclick="window.open('help.jsp', '_blank');"
- - type="button" value="Help"/>
- -</div>
- -</div>
- -<div id="ltbl">
- - <!-- filled with javascript -->
- -</div>
- </form>
- <div class="clearfix"></div>
- <%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement