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 D6D85200BE7 for ; Tue, 20 Dec 2016 23:32:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D5831160B29; Tue, 20 Dec 2016 22:32:54 +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 2CF32160B12 for ; Tue, 20 Dec 2016 23:32:54 +0100 (CET) Received: (qmail 44863 invoked by uid 500); 20 Dec 2016 22:32:53 -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 44855 invoked by uid 99); 20 Dec 2016 22:32:53 -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, 20 Dec 2016 22:32:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3A21DDFB86; Tue, 20 Dec 2016 22:32:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: piotrz@apache.org To: commits@flex.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [flex-asjs] [refs/heads/develop] - First version of snackbar - clean component Date: Tue, 20 Dec 2016 22:32:53 +0000 (UTC) archived-at: Tue, 20 Dec 2016 22:32:55 -0000 Repository: flex-asjs Updated Branches: refs/heads/develop fb61e236f -> 3e0a71bb0 First version of snackbar - clean component Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3e0a71bb Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3e0a71bb Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3e0a71bb Branch: refs/heads/develop Commit: 3e0a71bb0492acc33bd7b2b586c6862ec7b1ad0b Parents: fb61e23 Author: piotrz Authored: Tue Dec 20 23:32:48 2016 +0100 Committer: piotrz Committed: Tue Dec 20 23:32:48 2016 +0100 ---------------------------------------------------------------------- .../main/flex/org/apache/flex/mdl/Snackbar.as | 73 ++++++++++++++++++++ 1 file changed, 73 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3e0a71bb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Snackbar.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Snackbar.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Snackbar.as new file mode 100644 index 0000000..5dd70f2 --- /dev/null +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Snackbar.as @@ -0,0 +1,73 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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.core.UIBase; + import org.apache.flex.core.WrappedHTMLElement; + + COMPILE::SWF + public class Snackbar + { + public function Snackbar() + { + + } + } + + COMPILE::JS + public class Snackbar extends UIBase + { + public function Snackbar() + { + super(); + + className = ""; + } + + private var snackbarText:HTMLDivElement; + private var snackbarAction:HTMLButtonElement; + + /** + * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement + * @flexjsignorecoercion HTMLDivElement + * @flexjsignorecoercion HTMLButtonElement + * + * @return + */ + override protected function createElement():WrappedHTMLElement + { + typeNames = "mdl-js-snackbar mdl-snackbar"; + + element = document.createElement("div"); + + snackbarText = document.createElement("div") as HTMLDivElement; + snackbarText.classList.add("mdl-snackbar__text"); + element.appendChild(snackbarText); + + snackbarAction = document.createElement("button") as HTMLButtonElement; + snackbarAction.classList.add("mdl-snackbar__action"); + element.appendChild(snackbarAction); + + positioner = element; + element.flexjs_wrapper = this; + + return element; + } + } +}