Skip to content

search.jsp cleanup #3851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions opengrok-web/src/main/webapp/search.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ include file="httpheader.jspf"
<label for="sortby">Sort by</label>
<%
{
PageConfig cfg = PageConfig.get(request);
SearchHelper searchHelper = (SearchHelper) request.getAttribute(SearchHelper.REQUEST_ATTR);
StringBuilder url = createUrl(request, searchHelper, true).append("&amp;").
append(QueryParameters.SORT_PARAM_EQ);
Expand Down Expand Up @@ -149,7 +148,6 @@ include file="menu.jspf"

<div id="results"> <%
{
PageConfig cfg = PageConfig.get(request);
SearchHelper searchHelper = (SearchHelper) request.getAttribute(SearchHelper.REQUEST_ATTR);
// TODO spellchecking cycle below is not that great and we only create
// suggest links for every token in query, not for a query as whole
Expand All @@ -171,7 +169,7 @@ include file="menu.jspf"
} else if (searchHelper.getHits().length == 0) {
List<Suggestion> hints = searchHelper.getSuggestions();
for (Suggestion hint : hints) {
%><p class="suggestions"><font color="#cc0000">Did you mean (for <%= hint.getName() %>)</font>:<%
%><p class="suggestions"><span style="color: #cc0000; ">Did you mean (for <%= hint.getName() %>)</span>:<%
if (hint.getFreetext() != null) {
for (String word : hint.getFreetext()) {
%> <a href="search?<%= QueryParameters.FULL_SEARCH_PARAM_EQ %>
Expand Down