Added selection box to collections
authorPeter Amstutz <peter.amstutz@curoverse.com>
Fri, 21 Feb 2014 22:12:08 +0000 (17:12 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Fri, 21 Feb 2014 22:12:08 +0000 (17:12 -0500)
apps/workbench/app/assets/javascripts/application.js
apps/workbench/app/views/collections/_index_tbody.html.erb
apps/workbench/app/views/collections/_show_recent.html.erb
apps/workbench/app/views/pipeline_instances/_show_recent.html.erb

index 1108aba70f1a612269e101ce4fb84222b909856b..fb6fe9a66772e3217ad8d1bf7ab6de0803ed5b01 100644 (file)
@@ -100,8 +100,8 @@ jQuery(function($){
             $('.loading').fadeOut('fast', 0);
         }).
         on('change', '.persistent-selection:checkbox', function(e) {
-            console.log($(this));
-            console.log($(this).val());
+            //console.log($(this));
+            //console.log($(this).val());
 
             if (!localStorage.persistentSelection) {
                 localStorage.persistentSelection = JSON.stringify([]);
index 9252886bb2094cf05ee6819ce9dbab290471d16b..0a3732a943d88fb1a22f5903dc34c36c95bcc247 100644 (file)
@@ -1,6 +1,9 @@
 <% @collections.each do |c| %>
 
 <tr class="collection">
+  <td>
+    <%= check_box_tag 'uuids[]', c.uuid, false, :class => 'persistent-selection' %>
+  </td>
   <td>
     <%= link_to_if_arvados_object c.uuid %>
   </td>
index 125f413a9d1f1b6de1f69ea227de4301790cf00e..d94b169039aaa59205fe4a82bf7278421b341545 100644 (file)
 
 <div style="padding-right: 1em">
 
+<%= form_tag do |f| %>
+
 <table id="collections-index" class="topalign table table-condensed table-fixedlayout table-fixed-header-row">
   <colgroup>
+    <col width="4%" />
     <col width="10%" />
     <col width="36%" />
     <col width="22%" />
@@ -26,6 +29,7 @@
   </colgroup>
   <thead>
     <tr class="contain-align-left">
+      <th></th>
       <th>uuid</th>
       <th>contents</th>
       <th>owner</th>
@@ -38,6 +42,9 @@
     <%= render partial: 'index_tbody' %>
   </tbody>
 </table>
+
+<% end %>
+
 </div>
 
 <% content_for :footer_js do %>
index bfb3dc840e3bc9e8647e1d4cff40eeaa7b1ef027..5d3170127289a4a1bc51806f09f87c45b030c786 100644 (file)
@@ -39,7 +39,7 @@
 
     <tr data-object-uuid="<%= ob.uuid %>">
       <td>
-        <%= check_box_tag 'uuids[]', ob.uuid, false %>
+        <%= check_box_tag 'uuids[]', ob.uuid, false, :class => 'persistent-selection' %>
       </td><td>
         <% if ob.success %>
         <span class="label label-success">success</span>