From e2bee889bc406f30b66337d823242869abe7e98d Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Fri, 21 Feb 2014 17:12:08 -0500 Subject: [PATCH] Added selection box to collections --- apps/workbench/app/assets/javascripts/application.js | 4 ++-- apps/workbench/app/views/collections/_index_tbody.html.erb | 3 +++ apps/workbench/app/views/collections/_show_recent.html.erb | 7 +++++++ .../app/views/pipeline_instances/_show_recent.html.erb | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/workbench/app/assets/javascripts/application.js b/apps/workbench/app/assets/javascripts/application.js index 1108aba70f..fb6fe9a667 100644 --- a/apps/workbench/app/assets/javascripts/application.js +++ b/apps/workbench/app/assets/javascripts/application.js @@ -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([]); diff --git a/apps/workbench/app/views/collections/_index_tbody.html.erb b/apps/workbench/app/views/collections/_index_tbody.html.erb index 9252886bb2..0a3732a943 100644 --- a/apps/workbench/app/views/collections/_index_tbody.html.erb +++ b/apps/workbench/app/views/collections/_index_tbody.html.erb @@ -1,6 +1,9 @@ <% @collections.each do |c| %> + + <%= check_box_tag 'uuids[]', c.uuid, false, :class => 'persistent-selection' %> + <%= link_to_if_arvados_object c.uuid %> diff --git a/apps/workbench/app/views/collections/_show_recent.html.erb b/apps/workbench/app/views/collections/_show_recent.html.erb index 125f413a9d..d94b169039 100644 --- a/apps/workbench/app/views/collections/_show_recent.html.erb +++ b/apps/workbench/app/views/collections/_show_recent.html.erb @@ -15,8 +15,11 @@
+<%= form_tag do |f| %> + + @@ -26,6 +29,7 @@ + @@ -38,6 +42,9 @@ <%= render partial: 'index_tbody' %>
uuid contents owner
+ +<% end %> +
<% content_for :footer_js do %> diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb index bfb3dc840e..5d31701272 100644 --- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb @@ -39,7 +39,7 @@ - <%= check_box_tag 'uuids[]', ob.uuid, false %> + <%= check_box_tag 'uuids[]', ob.uuid, false, :class => 'persistent-selection' %> <% if ob.success %> success -- 2.30.2