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 C0FAF200BC4 for ; Fri, 4 Nov 2016 23:49:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BFA66160B07; Fri, 4 Nov 2016 22:49:07 +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 138D1160AFE for ; Fri, 4 Nov 2016 23:49:06 +0100 (CET) Received: (qmail 47587 invoked by uid 500); 4 Nov 2016 22:49:03 -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 47037 invoked by uid 99); 4 Nov 2016 22:49:02 -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; Fri, 04 Nov 2016 22:49:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D2BBAEEE30; Fri, 4 Nov 2016 22:49:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: carlosrovira@apache.org To: commits@flex.apache.org Date: Fri, 04 Nov 2016 22:49:28 -0000 Message-Id: In-Reply-To: <333893bd332b4addafffbc6d3b3bf00f@git.apache.org> References: <333893bd332b4addafffbc6d3b3bf00f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [27/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Disabled bead archived-at: Fri, 04 Nov 2016 22:49:07 -0000 Disabled bead Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/77e03cff Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/77e03cff Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/77e03cff Branch: refs/heads/feature/mdl Commit: 77e03cff7cfc4863cbd0643039242776aa3143b9 Parents: f5a37d4 Author: Carlos Rovira Authored: Wed Oct 26 23:19:29 2016 +0200 Committer: Carlos Rovira Committed: Fri Nov 4 23:48:31 2016 +0100 ---------------------------------------------------------------------- .../flexjs/MDLExample/src/main/flex/App.mxml | 3 +- .../flex/org/apache/flex/mdl/beads/Disabled.as | 80 ++++++++++++++++++++ .../src/main/resources/mdl-manifest.xml | 1 + 3 files changed, 83 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77e03cff/examples/flexjs/MDLExample/src/main/flex/App.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MDLExample/src/main/flex/App.mxml b/examples/flexjs/MDLExample/src/main/flex/App.mxml index 0507f21..472f556 100644 --- a/examples/flexjs/MDLExample/src/main/flex/App.mxml +++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml @@ -65,10 +65,11 @@ limitations under the License. - + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77e03cff/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as new file mode 100644 index 0000000..46067ff --- /dev/null +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as @@ -0,0 +1,80 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +package org.apache.flex.mdl.beads +{ + import org.apache.flex.core.IBead; + import org.apache.flex.core.IStrand; + import org.apache.flex.core.UIBase; + import org.apache.flex.events.Event; + import org.apache.flex.events.IEventDispatcher; + + /** + * The Disabled bead class is a specialty bead that can be used to disable a MDL control. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class Disabled implements IBead + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function Disabled() + { + } + + private var _strand:IStrand; + + /** + * @copy org.apache.flex.core.IBead#strand + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + * @flexjsignorecoercion HTMLInputElement + * @flexjsignorecoercion org.apache.flex.core.UIBase; + */ + public function set strand(value:IStrand):void + { + _strand = value; + + COMPILE::JS + { + var host:UIBase = value as UIBase; + var input:HTMLInputElement; + //if (host.element is HTMLInputElement) + //{ + input = host.element as HTMLInputElement; + input.disabled = "disabled"; + //} else + //{ + // throw new Error("Host element component in not type input"); + //} + } + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77e03cff/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml index 8d30325..2d14e56 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml +++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml @@ -29,5 +29,6 @@ +