Sha256: 075e2b0ee438f644778d0b04d8a0ffafff21929f2a767d1f6b20b5a955c3df40

Contents?: true

Size: 1.77 KB

Versions: 3

Compression:

Stored size: 1.77 KB

Contents

<div id="filters">
  <form id="filter_form">
  	<fieldset id="submit">
  	  <label>
  	    &nbsp;
    	  <input type="submit" name="commit" value="Filter"/>
        <%= image_tag 'loading.gif', :border => '0', :size => '24x24', :id => 'loading' %>
  	  </label>
  	</fieldset>

    <fieldset class="inline">
  		<label for="time_frame">
  		  Time range:
  			<select id="time_frame" name="filter[time_frame]">
  		    <%= options_for_select Wackamole::SearchFilter.time_frames, @filter.time_frame %>
  		  </select>  			  
  	  </label>
    </fieldset>	                

  	<fieldset class="inline">
  		<label for="type">
  		  Type:
  			<select id="type" name="filter[type]">
  		    <%= options_for_select Wackamole::SearchFilter.mole_types, @filter.type %>
  		  </select>						  
  	  </label>
  	</fieldset>

  	<fieldset class="inline">
  		<label for="browser_type">
  		  Browser:
  			<select id="browser_type" name="filter[browser_type]">
  		    <%= options_for_select Wackamole::SearchFilter.browser_types, @filter.browser_type %>
  		  </select>						  
  	  </label>
  	</fieldset>

  	<fieldset class="inline">
  		<label for="feature">
  		  Context:
  			<select id="feature" name="filter[feature_id]">
  		    <%= options_for_select @filter.features, @filter.feature_id %>
  		  </select>						  
  	  </label>
  	</fieldset>
  </form>
</div>

<%= partial :'shared/search' %>

<script>
  $( function() {
    $('form#filter_form').submit( function() {
      $.ajax( { beforeSend: function(request){ $('#loading' ).show(); },
        complete:   function(request){ $('#loading' ).hide(); },
        data:       $.param( $(this).serializeArray() ),
        dataType:   'script',
        type:       'post',
        url:        '<%=@filter_path%>' }); 
        return false;
    });
  });
</script>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wackamole-0.0.3 views/shared/_filter.erb
wackamole-0.0.2 views/shared/_filter.erb
wackamole-0.0.1 views/shared/_filter.erb