Sha256: 04148d838137db0e925e1a51fa5e58989069790f3c8e42fa6c93ef8e0c6be6fd

Contents?: true

Size: 858 Bytes

Versions: 5

Compression:

Stored size: 858 Bytes

Contents

<div id="search">
  <form id="search_form">
    <input id="search_term" class="search" type="text" size="50" name="search_filter[search_terms]"/>
    <%= image_tag 'loading.gif', :border => 0, :size => "20x20", :id => "search_loader" %>
	  <input type="submit" value="Search" style="display: none;" name="commit"/>
  </form>
</div>

<script>
  $(document).ready( function() {
    $('input#search_term').example( 'Search...' );
    
    $('form#search_form' ).submit( function() {
      $.ajax( {
        beforeSend: function(request){ $('img#search_loader' ).show(); }, 
        complete:   function(request){ $('img#search_loader' ).hide(); }, 
        data:       $.param( $(this).serializeArray() ), 
        dataType:   'script', 
        type:       'post', 
        url:        '<%=@search_path%>'
      }); 
      return false;
    });
  });
</script>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wackamole-0.0.8 views/shared/_search.erb
wackamole-0.0.7 views/shared/_search.erb
wackamole-0.0.6 views/shared/_search.erb
wackamole-0.0.5 views/shared/_search.erb
wackamole-0.0.4 views/shared/_search.erb