[ARVADOS] updated: c2a1539e64937b126c0090bc5d9fe8d65411be8f

Git user git at public.curoverse.com
Fri Jun 23 13:33:20 EDT 2017


Summary of changes:
 apps/workbench/app/assets/javascripts/edit_collection_tags.js | 3 +++
 apps/workbench/app/assets/stylesheets/collections.css.scss    | 4 ++++
 apps/workbench/app/controllers/collections_controller.rb      | 2 ++
 apps/workbench/app/views/collections/save_tags.js.erb         | 2 ++
 4 files changed, 11 insertions(+)

       via  c2a1539e64937b126c0090bc5d9fe8d65411be8f (commit)
      from  b7b408b33fee197dcc6e04353a58959595a4156d (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 c2a1539e64937b126c0090bc5d9fe8d65411be8f
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 23 13:30:42 2017 -0400

    9426: suppress new lines in the tag content editable field
    
    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 f13c54c..dc8c033 100644
--- a/apps/workbench/app/assets/javascripts/edit_collection_tags.js
+++ b/apps/workbench/app/assets/javascripts/edit_collection_tags.js
@@ -61,5 +61,8 @@ jQuery(function($){
       var $collection_tags = $(this).closest('.collection-tags-container');
       var $clone = $collection_tags.find('tr.hide').clone(true).removeClass('hide');
       $collection_tags.find('table').append($clone);
+    }).
+    on('keypress', '.collection-tag-field', function(event){
+      return event.which != 13;
     });
 });
diff --git a/apps/workbench/app/assets/stylesheets/collections.css.scss b/apps/workbench/app/assets/stylesheets/collections.css.scss
index 2d2d0f2..dadf4ea 100644
--- a/apps/workbench/app/assets/stylesheets/collections.css.scss
+++ b/apps/workbench/app/assets/stylesheets/collections.css.scss
@@ -70,3 +70,7 @@ $active-bg: #39b3d7;
     padding: .5em 2em;
     margin: 0 1em;
 }
+
+.collection-tag-field * {
+  display: inline-block;
+}
diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index 6b5e613..99399bc 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -364,6 +364,8 @@ class CollectionsController < ApplicationController
       props[:tags] = tags
 
       if @object.update_attributes properties: props
+        @saved_tags = true
+        render
       else
         self.render_error status: 422
       end
diff --git a/apps/workbench/app/views/collections/save_tags.js.erb b/apps/workbench/app/views/collections/save_tags.js.erb
index e2faff1..5fc84d7 100644
--- a/apps/workbench/app/views/collections/save_tags.js.erb
+++ b/apps/workbench/app/views/collections/save_tags.js.erb
@@ -1 +1,3 @@
+<% if @saved_tags %>
 $(".collection-tag-rows").html("<%= escape_javascript(render partial: 'show_tag_rows', locals: {object: @object}) %>");
+<% end %>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list