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 69BA5200BC7 for ; Thu, 10 Nov 2016 09:49:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 685CD160B01; Thu, 10 Nov 2016 08:49:01 +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 67580160B16 for ; Thu, 10 Nov 2016 09:49:00 +0100 (CET) Received: (qmail 70021 invoked by uid 500); 10 Nov 2016 08:48:57 -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 69890 invoked by uid 99); 10 Nov 2016 08:48:57 -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, 10 Nov 2016 08:48:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 26815ED30E; Thu, 10 Nov 2016 08:48:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: cdutz@apache.org To: commits@flex.apache.org Date: Thu, 10 Nov 2016 08:49:17 -0000 Message-Id: <09a0cc0991654560bfd1090e65d02413@git.apache.org> In-Reply-To: <89f08392238e40c8bd6fb36d1ad72fe7@git.apache.org> References: <89f08392238e40c8bd6fb36d1ad72fe7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [22/50] git commit: [flex-asjs] [refs/heads/develop] - MDL EffectBead in place (for now using a string, maybe better change to boolean flags) archived-at: Thu, 10 Nov 2016 08:49:01 -0000 MDL EffectBead in place (for now using a string, maybe better change to boolean flags) Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/bc8218b2 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/bc8218b2 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/bc8218b2 Branch: refs/heads/develop Commit: bc8218b219e8a6bdd2f912f23035b6f021efd9af Parents: 8390928 Author: Carlos Rovira Authored: Wed Oct 26 12:57:18 2016 +0200 Committer: Carlos Rovira Committed: Sun Nov 6 13:15:38 2016 +0100 ---------------------------------------------------------------------- .../flexjs/MDLExample/src/main/flex/App.mxml | 45 ++++++-- .../src/main/flex/org/apache/flex/mdl/Button.as | 25 ----- .../main/flex/org/apache/flex/mdl/CheckBox.as | 16 --- .../flex/org/apache/flex/mdl/RadioButton.as | 17 --- .../main/flex/org/apache/flex/mdl/TextInput.as | 20 +--- .../org/apache/flex/mdl/beads/EffectBead.as | 107 +++++++++++++++++++ .../src/main/resources/mdl-manifest.xml | 1 + 7 files changed, 145 insertions(+), 86 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bc8218b2/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 9f1be78..82126a4 100644 --- a/examples/flexjs/MDLExample/src/main/flex/App.mxml +++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml @@ -37,21 +37,40 @@ limitations under the License. - + + + + add - + + + + face - + + + + + + - + + + + + - + + + + + @@ -60,18 +79,26 @@ limitations under the License. - + + - - + + + + + - + + + + + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bc8218b2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as index 7c17757..27116c4 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as @@ -67,30 +67,5 @@ package org.apache.flex.mdl return element; } - - /*public static const RAISED_EFFECT:String = "mdl-button--raised"; - public static const FAB_EFFECT:String = "mdl-button--fab"; - public static const MINI_FAB_EFFECT:String = "mdl-button--mini-fab"; - public static const ICON_EFFECT:String = "mdl-button--icon"; - public static const COLORED_EFFECT:String = "mdl-button--colored"; - public static const PRIMARY_EFFECT:String = "mdl-button--primary"; - public static const ACCENT_EFFECT:String = "mdl-button--accent"; - public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";*/ - - private var _mdlEffect:String = ""; - - public function get mdlEffect():String - { - return _mdlEffect; - } - - public function set mdlEffect(value:String):void - { - _mdlEffect = value; - COMPILE::JS - { - className = _mdlEffect; - } - } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bc8218b2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as index 60db161..58d3ba2 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as @@ -167,22 +167,6 @@ package org.apache.flex.mdl else checkbox.className = 'checkbox-icon';*/ } - - private var _mdlEffect:String = ""; - - public function get mdlEffect():String - { - return _mdlEffect; - } - - public function set mdlEffect(value:String):void - { - _mdlEffect = value; - COMPILE::JS - { - className = _mdlEffect; - } - } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bc8218b2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as index ee79872..0f8237d 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as @@ -236,23 +236,6 @@ package org.apache.flex.mdl } } } - - private var _mdlEffect:String = ""; - - public function get mdlEffect():String - { - return _mdlEffect; - } - - public function set mdlEffect(value:String):void - { - _mdlEffect = value; - COMPILE::JS - { - className = _mdlEffect; - } - } - } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bc8218b2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as index c8244a4..a53f31e 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as @@ -105,24 +105,6 @@ package org.apache.flex.mdl element.flexjs_wrapper = this; return element; - } - - private var _mdlEffect:String = ""; - - public function get mdlEffect():String - { - return _mdlEffect; - } - - public function set mdlEffect(value:String):void - { - _mdlEffect = value; - COMPILE::JS - { - positioner.className = positioner.className + " " + _mdlEffect; - } - } - - + } } } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bc8218b2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as new file mode 100644 index 0000000..b01538d --- /dev/null +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as @@ -0,0 +1,107 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.mdl.TextInput; + + /** + * The EffectBead class is a specialty bead that can be used with + * any MDL control to apply some MDL complementary effect. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class EffectBead implements IBead + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function EffectBead() + { + } + + /*public static const RAISED_EFFECT:String = "mdl-button--raised"; + public static const FAB_EFFECT:String = "mdl-button--fab"; + public static const MINI_FAB_EFFECT:String = "mdl-button--mini-fab"; + public static const ICON_EFFECT:String = "mdl-button--icon"; + public static const COLORED_EFFECT:String = "mdl-button--colored"; + public static const PRIMARY_EFFECT:String = "mdl-button--primary"; + public static const ACCENT_EFFECT:String = "mdl-button--accent"; + public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";*/ + + private var _mdlEffect:String = ""; + + /** + * The string to use as the MDL effect. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get mdlEffect():String + { + return _mdlEffect; + } + + public function set mdlEffect(value:String):void + { + _mdlEffect = value; + } + + 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 + { + if (value is TextInput) { + var mdTi:TextInput = value as TextInput; + mdTi.positioner.className = mdTi.positioner.className + " " + mdlEffect; + } else { + var host:UIBase = value as UIBase; + host.className = mdlEffect; + } + } + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bc8218b2/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 9f47fea..aca9380 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml +++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml @@ -26,5 +26,6 @@ +