[ARVADOS] updated: 02717e4b0875ac5dd204bad1ca034e5814dc237d

Git user git at public.curoverse.com
Tue Jun 20 13:54:19 EDT 2017


Summary of changes:
 apps/workbench/app/assets/javascripts/edit_collection_tags.js | 8 +++++++-
 apps/workbench/app/controllers/collections_controller.rb      | 9 ++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

       via  02717e4b0875ac5dd204bad1ca034e5814dc237d (commit)
      from  8b65f2e07df818663ec328fab7a77f6e759a3ba4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 02717e4b0875ac5dd204bad1ca034e5814dc237d
Author: radhika <radhika at curoverse.com>
Date:   Tue Jun 20 13:54:03 2017 -0400

    9426: delete all tags
    
    Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika at curoverse.com>

diff --git a/apps/workbench/app/assets/javascripts/edit_collection_tags.js b/apps/workbench/app/assets/javascripts/edit_collection_tags.js
index 8dc9d61..9a7ebec 100644
--- a/apps/workbench/app/assets/javascripts/edit_collection_tags.js
+++ b/apps/workbench/app/assets/javascripts/edit_collection_tags.js
@@ -31,9 +31,15 @@ $(document).
         }
       });
 
+      if(jQuery.isEmptyObject(tag_data)){
+        tag_data["empty"]=true
+      } else {
+        tag_data = {tag_data}
+      }
+
       $.ajax($(location).attr('pathname')+'/save_tags', {
           type: 'POST',
-          data: {tag_data}
+          data: tag_data
       }).success(function(data, status, jqxhr) {
         $('.collection-tags-status').append('<div class="collection-tags-status-label alert alert-success"><p class="contain-align-left">Saved successfully.</p></div>');
       }).fail(function(jqxhr, status, error) {
diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index 8e1e8a5..bfba2f5 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -350,9 +350,16 @@ class CollectionsController < ApplicationController
   end
 
   def save_tags
+    tags = nil
     if params['tag_data']
+      tags = params['tag_data']
+    elsif params['empty']
+      tags = {}
+    end
+
+    if tags
       props = @object.properties
-      props[:tags] = params['tag_data']
+      props[:tags] = tags
 
       if @object.update_attributes properties: props
       else

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list