Sha256: a8ea19d3a2307f31a27161bfe8016d796346d2165215459f90133fb8430a3376

Contents?: true

Size: 1.91 KB

Versions: 5

Compression:

Stored size: 1.91 KB

Contents

<%=zone_locator%>

<div class="cltn">
  <a class="back" href="<%=@back_url%>">&laquo;&nbsp;back</a>
  
  <div class="title"><%=title_for( session[:path_names] )%></div>
    
  <div id="mgmt_actions">
    <img id="action_load" src="/images/loading.gif" style="width:25px;height:25px;vertical-align:sub;display:none"></img>        
    <button class="action clear" rel="#confirm_clear" title="Delete all records from collection">clear</button>
    <button class="action drop" rel="#confirm_drop" title="Drop the entire collection">drop</button>
  </div>
  <fieldset class="sep">
    <legend> indexes </legend>    
    <div id="indexes">
      <%= partial :'collections/indexes' %>
    </div>
  </fieldset>
  <fieldset class="sep">
    <legend> records </legend>
    <div id="results">
      <%= partial :'collections/results' %>
    </div>
  </fieldset>
<div>
  
<div class="modal" id="confirm_clear" style="font-size:1em">
   <p>Clearing out the whole collection. Are you sure?</p>
   <p style="margin:10px">
     <button class="close yes" id="clear"> Yes </button>
     <button class="close"> No </button>
   </p>     
</div>

<div class="modal" id="confirm_drop" style="font-size:1em">
   <p>Dropping the whole collection. Are you sure?</p>
   <p style="margin:10px">
     <button class="close yes" id="drop"> Yes </button>
     <button class="close"> No </button>
   </p>     
</div>

<script>
  $( function() {
    $('button.action' ).overlay( {
      expose: {
         color:     '#212021',
         loadSpeed: 200,
         opacity:   0.9 
      },
      closeOnClick: false
    });
        
    $( 'button.yes' ).click( function() {
      $.ajax({
        dataType:   'script',
        type:       'get',
        url:        '/collections/' + $(this).attr('id') + "/",
        beforeSend: function() { $('img#action_load').show(); },
        complete:   function() { $('img#action_load').hide(); }     
      });            
    });
  });
</script>
  

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mongo3-0.0.9 lib/views/collections/list.erb
mongo3-0.0.8 lib/views/collections/list.erb
mongo3-0.0.7 lib/views/collections/list.erb
mongo3-0.0.6 lib/views/collections/list.erb
mongo3-0.0.5 lib/views/collections/list.erb