Sha256: 8de7a03a2e0ae18e54bbc019a70545e2acd3f5da85691fb5260bbe664abf8bd3

Contents?: true

Size: 1.85 KB

Versions: 6

Compression:

Stored size: 1.85 KB

Contents

<div id="summary" style="clear:both">
  <%= page_entries_info @cltn, :entry_name => 'item' %>
</div>  

<%= partial :'collections/search_form' %>

<div class="borders" style="padding:10px;">
  <table id="cltn" class="cltn" border="0" cellspacing="10">
    <thead>
      <tr>
        <th width="5%">&nbsp;</td>
        <% @selected_cols.each do |col| %>
          <th width="20%" align="<%=align_for( @cltn[0][col] )%>"><%=col%></th>
        <% end %>
      </tr>
    </thead>
    <tbody>
      <% @cltn.each do |cltn| %>
        <% id = cltn['_id'] %>
        <tr id="<%=id%>" valign="top">
          <td id="<%=id%>" style="margin:0px;padding:0px">
            <img class="delete" id="<%=id%>" src="/images/delete.png" title="delete this record"/>
            <img class="wait" id="wait_<%=id%>" src="/images/loading.gif"></img>          
          </td>
          <% @selected_cols.each do |k| %>
            <td align="<%=align_for( cltn[k] ) %>"><%= format_value(cltn[k]) %></td>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>

<div id="links">
  <%= will_paginate @cltn, :params => { :url => '/collections' } %>
</div>      

<script>
  $( function() {
    $("table#cltn tbody tr" ).hover( 
      function() { 
        $(this).addClass( 'highlight' );
        $("td#" + $(this).attr('id') + " img.delete" ).show();
      }, 
      function() { 
        $(this).removeClass( 'highlight' );      
        $("td#" + $(this).attr('id') + " img.delete" ).hide();
      });
    $( "img.delete" ).click( function() {
      var id = $(this).attr('id');
      $.ajax({
        data:     {id: id},
        dataType: 'script',
        type:     'post',
        url:      '/collections/delete/',
        beforeSend: function() { $('img#_wait_' + id ).show(); },
        complete:   function() { $('img#_wait_' + id ).hide(); }
      });
    });    
  });
</script>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongo3-0.1.5 lib/views/collections/_rows_table.erb
mongo3-0.1.4 lib/views/collections/_rows_table.erb
mongo3-0.1.3 lib/views/collections/_rows_table.erb
mongo3-0.1.2 lib/views/collections/_rows_table.erb
mongo3-0.1.1 lib/views/collections/_rows_table.erb
mongo3-0.1.0 lib/views/collections/_rows_table.erb