flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [02/40] git commit: [flex-asjs] [refs/heads/feature/mdl] - removed CardEffect bead and incorporated to Card component
Date Sun, 06 Nov 2016 12:17:28 GMT
removed CardEffect bead and incorporated to Card 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/b926a7c3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b926a7c3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b926a7c3

Branch: refs/heads/feature/mdl
Commit: b926a7c34dafd86f8bf16ed2cde88e3df08597f2
Parents: 65ff758
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Sat Nov 5 02:01:27 2016 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sun Nov 6 13:15:38 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |   5 +-
 .../src/main/flex/org/apache/flex/mdl/Card.as   |  26 ++++-
 .../org/apache/flex/mdl/beads/CardEffect.as     | 100 -------------------
 .../src/main/resources/mdl-manifest.xml         |   1 -
 4 files changed, 26 insertions(+), 106 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b926a7c3/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 3393a5e..9b3f6fe 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -113,10 +113,7 @@ limitations under the License.
                     
                 </js:VContainer>
 
-                <mdl:Card width="512">
-                    <js:beads>
-                        <mdl:CardEffect shadow="2"/>
-                    </js:beads>
+                <mdl:Card width="512" shadow="2">
                     <mdl:CardTitle style="color: #666;height: 176px; backgroundImage:
url('../../../../src/main/resources/Unknown.jpeg') center / cover;">
                         <js:H2 text="Welcome" className="mdl-card__title-text"/>
                     </mdl:CardTitle>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b926a7c3/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Card.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Card.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Card.as
index c8c1dd2..3835d86 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Card.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Card.as
@@ -76,6 +76,30 @@ package org.apache.flex.mdl
             className = typeNames = "mdl-card";
 
             return element;
-        }    
+        }
+		
+		protected var _shadow:Number = 0;
+        /**
+		 *  A boolean flag to activate "mdl-shadow--4dp" effect selector.
+		 *  Assigns variable shadow depths (0, 2, 3, 4, 6, 8, or 16) to card
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get shadow():Number
+        {
+            return _shadow;
+        }
+        public function set shadow(value:Number):void
+        {
+			if(value == 0 || value == 2 || value == 3 || value == 4 || value == 6 || value == 8 ||
value == 16)
+			{
+				_shadow = value;
+
+				className += _shadow != 0 ? " mdl-shadow--" + _shadow + "dp" : "";
+			}  
+        }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b926a7c3/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
deleted file mode 100644
index 19e3396..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
+++ /dev/null
@@ -1,100 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.beads
-{
-	import org.apache.flex.core.IStrand;
-    import org.apache.flex.core.IBead;
-	import org.apache.flex.mdl.Card;
-	
-	
-	/**
-	 *  The CardEffect class is a specialty bead that can be used with
-	 *  a MDL Card control to apply some MDL complementary effect.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class CardEffect implements IBead
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function CardEffect()
-		{
-		}
-
-		private var _shadow:Number = 0;
-		private var _shadowStyle:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-shadow--4dp" effect selector.
-		 *  Assigns variable shadow depths (0, 2, 3, 4, 6, 8, or 16) to card
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get shadow():Number
-        {
-            return _shadow;
-        }
-        public function set shadow(value:Number):void
-        {
-            if(value == 0) {
-				_shadowStyle = "";
-			} else {
-				_shadow = value;
-                _shadowStyle = " mdl-shadow--" + _shadow + "dp";
-            }  
-        }
-
-		private var _strand:IStrand;
-		
-		/**
-		 *  @copy org.apache.flex.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
-		 */
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			
-			COMPILE::JS
-			{
-				if (value is Card) {
-					var card:Card = value as Card;
-					card.className =  _shadowStyle;
-				} else {
-					throw new Error("Host component must be an MDL Card.");
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b926a7c3/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 e45ef84..0bcb2c7 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -35,7 +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="CardEffect" class="org.apache.flex.mdl.beads.CardEffect"/>
     <component id="CardInnerEffect" class="org.apache.flex.mdl.beads.CardInnerEffect"/>
 
 </componentPackage>


Mime
View raw message