flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [40/41] git commit: [flex-asjs] [refs/heads/feature/mdl] - CardMenu
Date Sun, 06 Nov 2016 01:30:56 GMT
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/f5600a09
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f5600a09
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f5600a09

Branch: refs/heads/feature/mdl
Commit: f5600a09e42c541bb8a716f7f289b7a0674987eb
Parents: 8840058
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Sun Nov 6 02:27:24 2016 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sun Nov 6 02:28:52 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/f5600a09/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/f5600a09/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/f5600a09/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>


Mime
View raw message