You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2016/12/20 22:32:53 UTC
git commit: [flex-asjs] [refs/heads/develop] - First version of
snackbar - clean component
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 <pi...@apache.org>
Authored: Tue Dec 20 23:32:48 2016 +0100
Committer: piotrz <pi...@apache.org>
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;
+ }
+ }
+}