You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/03/25 19:12:05 UTC
git commit: refs/heads/master - List view: Fix when no actions are
present
Updated Branches:
refs/heads/master ae3a04835 -> fcf9b57f0
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/master
Commit: fcf9b57f081c7ec9e183341a9e98f342db417c2e
Parents: ae3a048
Author: Brian Federle <br...@citrix.com>
Authored: Mon Mar 25 11:11:48 2013 -0700
Committer: Brian Federle <br...@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) {