flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [3/6] git commit: [flex-asjs] [refs/heads/feature/mdl] - Fix classNames/TypeNames in Card component and subcomponents
Date Sat, 12 Nov 2016 09:07:24 GMT
Fix classNames/TypeNames in Card component and subcomponents


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8abc939b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8abc939b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8abc939b

Branch: refs/heads/feature/mdl
Commit: 8abc939b07366dc0c1ee7f2d6afea4bdeb260290
Parents: ed6fdc9
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Thu Nov 10 20:48:25 2016 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sat Nov 12 10:06:54 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Card.as            | 11 +++++++----
 .../src/main/flex/org/apache/flex/mdl/CardActions.as     |  7 ++++---
 .../src/main/flex/org/apache/flex/mdl/CardMedia.as       |  7 ++++---
 .../src/main/flex/org/apache/flex/mdl/CardMenu.as        |  7 ++++---
 .../main/flex/org/apache/flex/mdl/CardSupportingText.as  |  7 ++++---
 .../src/main/flex/org/apache/flex/mdl/CardTitle.as       |  5 +++--
 .../flex/org/apache/flex/mdl/supportClasses/CardInner.as |  4 ++--
 7 files changed, 28 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8abc939b/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 fbfde40..6d482b6 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
@@ -54,6 +54,8 @@ package org.apache.flex.mdl
 		public function Card()
 		{
 			super();
+
+			className = ""; //set to empty string avoid 'undefined' output when no class selector
is assigned by user;
 		}
 		
         /**
@@ -62,9 +64,12 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
+			typeNames = "mdl-card";
+
             element = document.createElement('div') as WrappedHTMLElement;
+            element.className = typeNames;
             
-            positioner = element;
+			positioner = element;
             
             // absolute positioned children need a non-null
             // position value in the parent.  It might
@@ -72,8 +77,6 @@ package org.apache.flex.mdl
             // also absolutely positioned
             positioner.style.position = 'relative';
             element.flexjs_wrapper = this;
-            
-            className = "mdl-card";
 
             return element;
         }
@@ -98,7 +101,7 @@ package org.apache.flex.mdl
 			{
 				_shadow = value;
 
-				className += _shadow != 0 ? " mdl-shadow--" + _shadow + "dp" : "";
+				className += (_shadow != 0 ? " mdl-shadow--" + _shadow + "dp" : "");
 			}  
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8abc939b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardActions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardActions.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardActions.as
index 01703b1..1db5c5f 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardActions.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardActions.as
@@ -61,8 +61,11 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
+			typeNames = "mdl-card__actions";
+
             element = document.createElement('div') as WrappedHTMLElement;
-            
+            element.className = typeNames;
+
             positioner = element;
             
             // absolute positioned children need a non-null
@@ -72,8 +75,6 @@ package org.apache.flex.mdl
             positioner.style.position = 'relative';
             element.flexjs_wrapper = this;
             
-            className = "mdl-card__actions";
-
             return element;
         }    
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8abc939b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMedia.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMedia.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMedia.as
index 96489e6..83da9fa 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMedia.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMedia.as
@@ -61,8 +61,11 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
+			typeNames = "mdl-card__media";
+
             element = document.createElement('div') as WrappedHTMLElement;
-            
+            element.className = typeNames;
+
             positioner = element;
             
             // absolute positioned children need a non-null
@@ -72,8 +75,6 @@ package org.apache.flex.mdl
             positioner.style.position = 'relative';
             element.flexjs_wrapper = this;
             
-            className = "mdl-card__media";
-
             return element;
         }    
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8abc939b/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
index e974492..eac8088 100644
--- 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
@@ -61,8 +61,11 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
+			typeNames = "mdl-card__menu";
+
             element = document.createElement('div') as WrappedHTMLElement;
-            
+            element.className = typeNames;
+
             positioner = element;
             
             // absolute positioned children need a non-null
@@ -72,8 +75,6 @@ package org.apache.flex.mdl
             //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/8abc939b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardSupportingText.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardSupportingText.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardSupportingText.as
index b39e64f..3660bef 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardSupportingText.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardSupportingText.as
@@ -61,8 +61,11 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
+			typeNames = "mdl-card__supporting-text";
+
             element = document.createElement('div') as WrappedHTMLElement;
-            
+            element.className = typeNames;
+
             positioner = element;
             
             // absolute positioned children need a non-null
@@ -72,8 +75,6 @@ package org.apache.flex.mdl
             positioner.style.position = 'relative';
             element.flexjs_wrapper = this;
             
-            className = "mdl-card__supporting-text";
-
             return element;
         }    
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8abc939b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitle.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitle.as
index 8e9339b..64bc3a8 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitle.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitle.as
@@ -61,7 +61,10 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
+			typeNames = "mdl-card__title";
+
             element = document.createElement('div') as WrappedHTMLElement;
+			element.className = typeNames;
             
             positioner = element;
             
@@ -72,8 +75,6 @@ package org.apache.flex.mdl
             positioner.style.position = 'relative';
             element.flexjs_wrapper = this;
             
-            className = "mdl-card__title";
-
             return element;
         }    
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8abc939b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
index 6a57ae1..c254126 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
@@ -54,6 +54,8 @@ package org.apache.flex.mdl.supportClasses
 		public function CardInner()
 		{
 			super();
+
+			className = ""; //set to empty string avoid 'undefined' output when no class selector
is assigned by user;
 		}
 		
         /**
@@ -72,8 +74,6 @@ package org.apache.flex.mdl.supportClasses
             // also absolutely positioned
             positioner.style.position = 'relative';
             element.flexjs_wrapper = this;
-            
-            className = "mdl-card";
 
             return element;
         }


Mime
View raw message