Improve the save constraints feature to only show the save box when save is clicked

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@540563 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-05-22 12:38:46 +00:00
parent 756b88e8f8
commit 766f825fe6
1 changed files with 6 additions and 4 deletions

View File

@ -82,15 +82,17 @@
<%=link_to '[clear constraints]', :action => 'clear'%> <%=link_to '[clear constraints]', :action => 'clear'%>
</div> </div>
<% form_tag(:action=>'save') do %> <% form_tag({:action=>'save'},{:id => 'savesearch', :style => "display:none;"}) do %>
<%= text_field_tag :name %> <%= text_field_tag :name, "", {:size => 10, :id => "savesearch_name"} %>
<%=submit_tag "save"%> <%= link_to_function "save", "document.forms['savesearch'].submit();" -%>
<%= link_to_function "cancel", "Element.toggle('savesearch'); Element.toggle('savesearch_link')" -%>
<% end %> <% end %>
<%= link_to_function "[save these constraints]", "Element.toggle('savesearch'); Element.toggle('savesearch_link'); $('savesearch_name').focus()", {:id => "savesearch_link"} -%>
</div> </div>
<% if @flare.empty_constraints? %> <% if @flare.empty_constraints? %>
click click click search or facet to see results
<% else %> <% else %>
<div class="resultsheader">Results <strong><%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%></strong> of <strong><%=@response.total_hits%></strong></div> <div class="resultsheader">Results <strong><%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%></strong> of <strong><%=@response.total_hits%></strong></div>