Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / apps / workbench / app / views / collections / _show_files.html.erb
index 39a1b36c3180c5415cd6782ee8a9d081daa864d6..603dc34f4fc6ab038ad727b95688ee8e9a6831fe 100644 (file)
@@ -1,21 +1,10 @@
 <script>
-// The "each" loop in select_all_files() and unselect_all_files()
-// is needed because .trigger("change") does not play well with clippy.
-// Once clippy has been retired, we should be able to compress this
-// into .filter(":visible").prop("checked", true).trigger("change").
-//
 function select_all_files() {
-  $("#collection_files :checkbox").filter(":visible").each(
-    function() {
-      $(this).prop("checked", true).trigger("change");
-    });
+  $("#collection_files :checkbox").filter(":visible").prop("checked", true).trigger("change");
 }
 
 function unselect_all_files() {
-  $("#collection_files :checkbox").filter(":visible").each(
-    function() {
-      $(this).prop("checked", false).trigger("change");
-    });
+  $("#collection_files :checkbox").filter(":visible").prop("checked", false).trigger("change");
 }
 </script>
 
@@ -38,12 +27,12 @@ function unselect_all_files() {
         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection... <span class="caret"></span></button>
         <ul class="dropdown-menu" role="menu">
           <li><%= link_to "Create new collection with selected files", '#',
+                  method: :post,
                   'data-href' => combine_selected_path(
                     action_data: {current_project_uuid: @object.owner_uuid}.to_json
                   ),
                   'data-selection-param-name' => 'selection[]',
                   'data-selection-action' => 'combine-collections',
-                  'method' => 'post',
                   'data-toggle' => 'dropdown'
             %></li>
         </ul>
@@ -75,7 +64,7 @@ function unselect_all_files() {
     <% if size.nil?  # This is a subdirectory. %>
       <% dirstack.push(File.join(dirname, filename)) %>
       <div class="collection_files_row">
-       <div class="collection_files_name><i class="fa fa-fw fa-folder-open"></i> <%= filename %></div>
+       <div class="collection_files_name"><i class="fa fa-fw fa-folder-open"></i> <%= filename %></div>
       </div>
       <ul class="collection_files">
     <% else %>