You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ca...@apache.org on 2016/11/06 01:27:29 UTC
git commit: [flex-asjs] [refs/heads/feature/mdl] - CardMenu
Repository: flex-asjs
Updated Branches:
refs/heads/feature/mdl 88bc82f56 -> 39c81573e
CardMenu
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/39c81573
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/39c81573
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/39c81573
Branch: refs/heads/feature/mdl
Commit: 39c81573e2d27c2f072b3d8e22497b222c16126a
Parents: 88bc82f
Author: Carlos Rovira <ca...@apache.org>
Authored: Sun Nov 6 02:27:24 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Sun Nov 6 02:27:24 2016 +0100
----------------------------------------------------------------------
.../flexjs/MDLExample/src/main/flex/App.mxml | 5 ++
.../main/flex/org/apache/flex/mdl/CardMenu.as | 80 ++++++++++++++++++++
.../src/main/resources/mdl-manifest.xml | 3 +-
3 files changed, 87 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/39c81573/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 50f8ee9..0bacef4 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -126,6 +126,11 @@ limitations under the License.
<mdl:CardActions border="true">
<mdl:Button text="Get Started" ripple="true" colored="true"/>
</mdl:CardActions>
+ <mdl:CardMenu>
+ <mdl:Button icon="true" ripple="true">
+ <i class="material-icons">share</i>
+ </mdl:Button>
+ </mdl:CardMenu>
</mdl:Card>
</js:Form>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/39c81573/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMenu.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMenu.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMenu.as
new file mode 100644
index 0000000..e974492
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMenu.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
+{
+ import org.apache.flex.mdl.supportClasses.CardInner;
+
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ /**
+ * The CardMenu class is a Container component capable of parenting other.
+ * The Panel uses the following bead types:
+ *
+ * org.apache.flex.core.IBeadModel: the data model for the Card.
+ * org.apache.flex.core.IBeadView: creates the parts of the Card.
+ *
+ * @see PanelWithControlBar
+ * @see ControlBar
+ * @see TitleBar
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CardMenu extends CardInner
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CardMenu()
+ {
+ super();
+ }
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ element = document.createElement('div') as WrappedHTMLElement;
+
+ positioner = element;
+
+ // absolute positioned children need a non-null
+ // position value in the parent. It might
+ // get set to 'absolute' if the container is
+ // also absolutely positioned
+ //positioner.style.position = 'relative';
+ element.flexjs_wrapper = this;
+
+ className = "mdl-card__menu";
+
+ return element;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/39c81573/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 0064d51..9e4c6c4 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -35,5 +35,6 @@
<component id="CardSupportingText" class="org.apache.flex.mdl.CardSupportingText"/>
<component id="CardMedia" class="org.apache.flex.mdl.CardMedia"/>
<component id="CardActions" class="org.apache.flex.mdl.CardActions"/>
-
+ <component id="CardMenu" class="org.apache.flex.mdl.CardMenu"/>
+
</componentPackage>