3661: proposed change of the selection javascript to use the new copies_to_projects...
authorPhil Hodgson <bitbucket@philhodgson.net>
Wed, 17 Sep 2014 14:51:06 +0000 (10:51 -0400)
committerPhil Hodgson <bitbucket@philhodgson.net>
Wed, 17 Sep 2014 14:51:06 +0000 (10:51 -0400)
apps/workbench/app/assets/javascripts/selection.js.erb [moved from apps/workbench/app/assets/javascripts/selection.js with 96% similarity]

similarity index 96%
rename from apps/workbench/app/assets/javascripts/selection.js
rename to apps/workbench/app/assets/javascripts/selection.js.erb
index c82b6ef2718a5f149ab9d5d6f92039d067cdfc63..535708089efa45e46a1670f7254e85803af84136 100644 (file)
@@ -212,11 +212,13 @@ function enable_disable_selection_actions() {
         toggleClass('disabled',
                     ($checked.filter('[value*=-d1hrv-]').length < 2) ||
                     ($checked.not('[value*=-d1hrv-]').length > 0));
-    $('[data-selection-action=copy]').
-        closest('li').
-        toggleClass('disabled',
-                    ($checked.filter('[value*=-j7d0g-]').length > 0) ||
-                    ($checked.length < 1));
+    <% unless Group.copies_to_projects? %>
+        $('[data-selection-action=copy]').
+            closest('li').
+            toggleClass('disabled',
+                        ($checked.filter('[value*=-j7d0g-]').length > 0) ||
+                        ($checked.length < 1));
+    <% end %>
 }
 
 $(document).