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 A24A2200BF6 for ; Tue, 10 Jan 2017 09:23:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A116F160B58; Tue, 10 Jan 2017 08:23:15 +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 CD1D1160B31 for ; Tue, 10 Jan 2017 09:23:14 +0100 (CET) Received: (qmail 15039 invoked by uid 500); 10 Jan 2017 08:23:14 -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 15031 invoked by uid 99); 10 Jan 2017 08:23:14 -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; Tue, 10 Jan 2017 08:23:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D6740DFC00; Tue, 10 Jan 2017 08:23:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bigosmallm@apache.org To: commits@flex.apache.org Date: Tue, 10 Jan 2017 08:23:13 -0000 Message-Id: <6bf2622248d1441484329643c2e81f6a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/18] git commit: [flex-asjs] [refs/heads/feature/fontawesome] - FooterSocialButton archived-at: Tue, 10 Jan 2017 08:23:15 -0000 Repository: flex-asjs Updated Branches: refs/heads/feature/fontawesome 1a4c53468 -> ffcc9a3dc FooterSocialButton Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/68928296 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/68928296 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/68928296 Branch: refs/heads/feature/fontawesome Commit: 689282967b579a5e9213b06ff39c407222433703 Parents: cf53944 Author: Carlos Rovira Authored: Sat Jan 7 01:34:02 2017 +0100 Committer: Carlos Rovira Committed: Sat Jan 7 01:34:02 2017 +0100 ---------------------------------------------------------------------- .../MDLExample/src/main/flex/MainFooter.mxml | 3 + .../org/apache/flex/mdl/FooterSocialButton.as | 108 +++++++++++++++++++ .../src/main/resources/mdl-manifest.xml | 1 + 3 files changed, 112 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/68928296/examples/flexjs/MDLExample/src/main/flex/MainFooter.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MDLExample/src/main/flex/MainFooter.mxml b/examples/flexjs/MDLExample/src/main/flex/MainFooter.mxml index 43b6c90..2b2b1f4 100644 --- a/examples/flexjs/MDLExample/src/main/flex/MainFooter.mxml +++ b/examples/flexjs/MDLExample/src/main/flex/MainFooter.mxml @@ -40,5 +40,8 @@ limitations under the License. + 1 + 2 + 3 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/68928296/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/FooterSocialButton.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/FooterSocialButton.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/FooterSocialButton.as new file mode 100644 index 0000000..ff2a8d8 --- /dev/null +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/FooterSocialButton.as @@ -0,0 +1,108 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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 +{ + import org.apache.flex.html.TextButton; + import org.apache.flex.mdl.supportClasses.IFooterSection; + import org.apache.flex.core.UIBase; + + COMPILE::JS + { + import org.apache.flex.core.WrappedHTMLElement; + } + + /** + * The FooterSocialButton class is a Container component capable of parenting other + * components + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public class FooterSocialButton extends TextButton + { + /** + * constructor. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function FooterSocialButton() + { + super(); + + className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user; + } + + /** + * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement + */ + COMPILE::JS + override protected function createElement():WrappedHTMLElement + { + typeNames = "mdl-mega-footer__social-btn"; + + element = document.createElement('button') as WrappedHTMLElement; + + positioner = element; + element.flexjs_wrapper = this; + + return element; + } + + /** + * Configuration depends on parent Footer. + * Check to see if is mega or mini. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + COMPILE::JS + override public function addedToParent():void + { + super.addedToParent(); + + if(parent is IFooterSection) + { + var parentSection:IFooterSection = parent as IFooterSection; + if(UIBase(parentSection).parent is Footer) + { + element.classList.remove(typeNames); + if(!Footer(UIBase(parentSection).parent).mini) + { + typeNames = "mdl-mega-footer__social-btn"; + } else + { + typeNames = "mdl-mini-footer__social-btn"; + } + element.classList.add(typeNames); + } + } + else + { + throw new Error("FooterSocialButton can not be used if parent is not a MDL Footer component."); + } + } + } +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/68928296/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 adfc1e7..cbc254f 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml +++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml @@ -87,6 +87,7 @@