cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject [21/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a
Date Thu, 28 Mar 2013 11:16:31 GMT
List view: Fix when no actions are present

Fix case where list view breaks on column creation, when no
actions are defined.


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

Branch: refs/heads/scaleupvm
Commit: fcf9b57f081c7ec9e183341a9e98f342db417c2e
Parents: ae3a048
Author: Brian Federle <brian.federle@citrix.com>
Authored: Mon Mar 25 11:11:48 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Mon Mar 25 11:12:03 2013 -0700

----------------------------------------------------------------------
 ui/scripts/ui/widgets/listView.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fcf9b57f/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index bb3a424..4b88647 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -648,13 +648,13 @@
     }
 
     // Actions column
-    var actionsArray = $.map(actions, function(v, k) {
+    var actionsArray = actions ? $.map(actions, function(v, k) {
       if (k == 'add') {
         v.isAdd = true;
       }
 
       return v;
-    });
+    }) : [];
     var headerActionsArray = $.grep(
       actionsArray,
       function(action) {
@@ -1028,13 +1028,13 @@
       $tr.data('jsonObj', dataItem);
       $tr.data('list-view-action-filter', options.actionFilter);
 
-      var actionsArray = $.map(actions, function(v, k) {
+      var actionsArray = actions ? $.map(actions, function(v, k) {
         if (k == 'add') {
           v.isAdd = true;
         }
 
         return v;
-      });
+      }) : [];
       var headerActionsArray = $.grep(
         actionsArray,
         function(action) {


Mime
View raw message