[ARVADOS] updated: 2722ac872d89c9cab89c6e453b79c69790f97208

git at public.curoverse.com git at public.curoverse.com
Wed Dec 3 12:09:12 EST 2014


Summary of changes:
 apps/workbench/app/assets/javascripts/selection.js.erb | 11 +++++++++--
 apps/workbench/app/assets/javascripts/tab_panes.js     |  1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

       via  2722ac872d89c9cab89c6e453b79c69790f97208 (commit)
      from  6bc895c1aa2015562b0ad98f2905cdd2a5fc0a38 (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 2722ac872d89c9cab89c6e453b79c69790f97208
Author: radhika <radhika at curoverse.com>
Date:   Wed Dec 3 12:08:12 2014 -0500

    4525: when project tabs are switched, the correct selection actions should be enabled.

diff --git a/apps/workbench/app/assets/javascripts/selection.js.erb b/apps/workbench/app/assets/javascripts/selection.js.erb
index a9028b0..9897002 100644
--- a/apps/workbench/app/assets/javascripts/selection.js.erb
+++ b/apps/workbench/app/assets/javascripts/selection.js.erb
@@ -23,7 +23,7 @@ function dispatch_selection_action() {
     var param_name = $(this).attr('data-selection-param-name');
     var href = $(this).attr('data-href');
     if ($(this).closest('.disabled').length > 0) {
-	return false;
+      return false;
     }
     $(this).
         closest('.selection-action-container').
@@ -42,7 +42,8 @@ function dispatch_selection_action() {
 
 function enable_disable_selection_actions() {
     var $container = $(this).closest('.selection-action-container');
-    var $checked = $('.persistent-selection:checkbox:checked', $container);
+    var $checked = $('.persistent-selection:checkbox:checked:visible', $container);
+
     $('[data-selection-action]').
         closest('div.btn-group-sm').
         find('ul li').
@@ -66,6 +67,12 @@ function enable_disable_selection_actions() {
                     ($checked.length != $checked.filter('[value*=-4zz18-]').length));
 }
 
+function update_selection_actions() {
+    var $btn = $('[data-selection-action]');
+    $btn.click(dispatch_selection_action);
+    enable_disable_selection_actions.call($btn);
+}
+
 $(document).
     on('selections-updated ready ajax:complete', function() {
         var $btn = $('[data-selection-action]');
diff --git a/apps/workbench/app/assets/javascripts/tab_panes.js b/apps/workbench/app/assets/javascripts/tab_panes.js
index 07e46fe..11990b0 100644
--- a/apps/workbench/app/assets/javascripts/tab_panes.js
+++ b/apps/workbench/app/assets/javascripts/tab_panes.js
@@ -2,6 +2,7 @@
 
 // Fire when a tab is selected/clicked.
 $(document).on('shown.bs.tab', '[data-toggle="tab"]', function(event) {
+    update_selection_actions();
     // reload the pane (unless it's already loaded)
     $($(event.target).attr('href')).
         not('.pane-loaded').

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list