Commit 5b66899faad18f1aeaee09880c1d2d9c23dd33a8
1 parent
8eeb74c2
Exists in
master
and in
28 other branches
ActionItem25: better search box
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1025 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -194,11 +194,10 @@ module ApplicationHelper |
194 | 194 | end |
195 | 195 | |
196 | 196 | def search_box |
197 | - [form_tag( :controller => 'search', :action => 'index'), | |
198 | - submit_tag(_('Search'), :id => 'button_search'), | |
199 | - text_field_tag( 'query', _(' '), :id => "input_search"), | |
197 | + [form_tag({:controller => 'search', :action => 'index'}, :method => 'get'), | |
198 | + submit_tag(_('Search'), :id => 'button_search', :name => ''), | |
199 | + text_field_tag( 'query', _('your search here'), :id => "input_search", :onfocus => 'javascript: if (this.value == %s) { this.value = ""; }' % _('your search here').inspect, :onblur => "javascript: if (this.value == '') { this.value = %s}" % _('your search here').inspect), | |
200 | 200 | '</form>', |
201 | - # observe_field('input_search', :function => "element.value=''", :on => :focus) | |
202 | 201 | ].join("\n") |
203 | 202 | end |
204 | 203 | ... | ... |