Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF229FD1A for ; Thu, 28 Mar 2013 11:16:21 +0000 (UTC) Received: (qmail 69877 invoked by uid 500); 28 Mar 2013 11:16:18 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 69320 invoked by uid 500); 28 Mar 2013 11:16:17 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 67763 invoked by uid 99); 28 Mar 2013 11:16:12 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Mar 2013 11:16:12 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AD8CB828DBA; Thu, 28 Mar 2013 11:16:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nitin@apache.org To: commits@cloudstack.apache.org Date: Thu, 28 Mar 2013 11:16:31 -0000 Message-Id: <66f4d225dc6d4dc68d122b885cde511e@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [21/50] [abbrv] git commit: updated refs/heads/scaleupvm to 2423d4a 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 Authored: Mon Mar 25 11:11:48 2013 -0700 Committer: Brian Federle 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) {