Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A84B2200B8F for ; Thu, 25 Aug 2016 17:32:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A6EA1160AA4; Thu, 25 Aug 2016 15:32:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F0855160ABE for ; Thu, 25 Aug 2016 17:32:15 +0200 (CEST) Received: (qmail 36863 invoked by uid 500); 25 Aug 2016 15:32:10 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 36339 invoked by uid 99); 25 Aug 2016 15:32:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2016 15:32:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 13319E1075; Thu, 25 Aug 2016 15:32:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Thu, 25 Aug 2016 15:32:30 -0000 Message-Id: <5da1557cf41c437caf9363d06dcdb291@git.apache.org> In-Reply-To: <619280efc71747239489fc38c5a551db@git.apache.org> References: <619280efc71747239489fc38c5a551db@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [22/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Found a couple of minor bugs while fixing an example. archived-at: Thu, 25 Aug 2016 15:32:16 -0000 Found a couple of minor bugs while fixing an example. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f57cfc42 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f57cfc42 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f57cfc42 Branch: refs/heads/spark Commit: f57cfc42ea8a18772940b95668e13ea7cb8b2f87 Parents: 6e9672b Author: Peter Ent Authored: Wed Aug 3 17:27:27 2016 -0400 Committer: Peter Ent Committed: Wed Aug 3 17:27:27 2016 -0400 ---------------------------------------------------------------------- .../HTML/src/main/flex/org/apache/flex/html/beads/ListView.as | 4 ++-- .../org/apache/flex/html/supportClasses/DataItemRenderer.as | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f57cfc42/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as index cab97f8..3018600 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as @@ -165,12 +165,12 @@ package org.apache.flex.html.beads if (lastSelectedIndex != -1) { var ir:ISelectableItemRenderer = dataGroup.getItemRendererForIndex(lastSelectedIndex) as ISelectableItemRenderer; - ir.selected = false; + if (ir != null) ir.selected = false; } if (listModel.selectedIndex != -1) { ir = dataGroup.getItemRendererForIndex(listModel.selectedIndex) as ISelectableItemRenderer; - ir.selected = true; + if (ir != null) ir.selected = true; } lastSelectedIndex = listModel.selectedIndex; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f57cfc42/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as index 796e6b7..71d534a 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as @@ -148,10 +148,12 @@ package org.apache.flex.html.supportClasses COMPILE::JS { if (selected) { - element.className = "StringItemRenderer selected"; + element.className = element.className + " selected"; } else { - element.className = "StringItemRenderer"; + if (element.className.endsWith(" selected")) { + element.className = element.className.replace(" selected", ""); + } } } }