cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/master to 667347d
Date Tue, 01 Jul 2014 18:45:56 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 4f5df54d5 -> 667347d17


List view: Fix issue with multiple selection actions

Fixes issue where duplicate and/or incorrect list view entries were
being passed due to list view object not being referenced relatively for
multi-select actions, causing more than one list being passed at times.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/667347d1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/667347d1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/667347d1

Branch: refs/heads/master
Commit: 667347d17e440517fe8fc1594599eaf5a6777a08
Parents: 4f5df54
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Jul 1 11:44:38 2014 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Jul 1 11:44:38 2014 -0700

----------------------------------------------------------------------
 ui/scripts/ui/widgets/listView.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/667347d1/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index 0e91b45..2ea817a 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -786,7 +786,7 @@
             content.click(function() {
                 var checked = $(this).is(':checked');
                 $('.multiSelectCheckbox').attr('checked', checked);
-                toggleMultiSelectActions(checked);
+                toggleMultiSelectActions($table.closest('.list-view'), checked);
             });
         }
 
@@ -1076,7 +1076,8 @@
                         var numRows = $(this).parents('tbody').find('input.multiSelectCheckbox').size();
                         var numRowsChecked = $(this).parents('tbody').find('input.multiSelectCheckbox:checked').size();
                         var enabled = checked || (numRowsChecked > 0);
-                        toggleMultiSelectActions(enabled);
+
+                        toggleMultiSelectActions($td.closest('.list-view'), enabled);
 
                         $td.closest('.list-view').find('input.multiSelectMasterCheckbox').attr('checked',
(numRows === numRowsChecked));
                     });
@@ -2123,7 +2124,7 @@
                     $tr = $target.closest('div.list-view').find('tr:first'); // Dummy row
                 } else {
                     if (listViewData.actions[actionID].isMultiSelectAction) {
-                        $tr = $('div.list-view').find('input.multiSelectCheckbox:checked').parents('tr');
+                        $tr = $listView.find('input.multiSelectCheckbox:checked').parents('tr');
                     } else {
                         $tr = $target.closest('tr');
                     }
@@ -2236,8 +2237,7 @@
         return $newRow;
     };
 
-    var toggleMultiSelectActions = function(enabled) {
-        var $listView = $('div.list-view');
+    var toggleMultiSelectActions = function($listView, enabled) {
         $listView.find('div.action.add')[enabled ? 'hide' : 'show']();
         $listView.find('div.main-action:not(.multiSelectAction)')[enabled ? 'hide' : 'show']();
         $listView.find('div.main-action.multiSelectAction')[enabled ? 'show' : 'hide']();


Mime
View raw message