flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Refactor to classList management
Date Thu, 01 Dec 2016 00:01:59 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 0b0ec4488 -> ec680f760


Refactor to classList management


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

Branch: refs/heads/develop
Commit: ec680f7603419de82756e6994b4b87d8bf66faec
Parents: 0b0ec44
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Thu Dec 1 01:01:52 2016 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Thu Dec 1 01:01:52 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Card.as   |  13 +-
 .../main/flex/org/apache/flex/mdl/CheckBox.as   |   5 +-
 .../src/main/flex/org/apache/flex/mdl/Grid.as   |   5 +-
 .../main/flex/org/apache/flex/mdl/GridCell.as   | 193 +++++++++++++------
 .../src/main/flex/org/apache/flex/mdl/Header.as |  15 +-
 .../main/flex/org/apache/flex/mdl/MenuItem.as   |   5 +-
 .../org/apache/flex/mdl/NavigationLayout.as     |  10 +-
 .../flex/org/apache/flex/mdl/RadioButton.as     |   5 +-
 .../src/main/flex/org/apache/flex/mdl/Switch.as |   5 +-
 .../src/main/flex/org/apache/flex/mdl/TabBar.as |  10 +-
 .../flex/org/apache/flex/mdl/TabBarButton.as    |   4 +-
 .../flex/org/apache/flex/mdl/TabBarPanel.as     |   5 +-
 .../src/main/flex/org/apache/flex/mdl/Tabs.as   |   5 +-
 .../main/flex/org/apache/flex/mdl/TextField.as  |  28 +--
 14 files changed, 200 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/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 751e0ae..3e277c3 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
@@ -96,13 +96,16 @@ package org.apache.flex.mdl
         }
         public function set shadow(value:Number):void
         {
-			if(value == 2 || value == 3 || value == 4 || value == 6 || value == 8 || value == 16)
+			COMPILE::JS
 			{
-				_shadow = value;
+				element.classList.remove("mdl-shadow--" + _shadow + "dp");
+				
+				if(value == 2 || value == 3 || value == 4 || value == 6 || value == 8 || value == 16)
+				{
+					_shadow = value;
 
-				className += " mdl-shadow--" + _shadow + "dp";
-			} else {
-				className += "";
+					element.classList.add("mdl-shadow--" + _shadow + "dp");
+				}
 			}
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
index 640dfdc..7799f49 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
@@ -148,7 +148,10 @@ package org.apache.flex.mdl
         {
             _ripple = value;
 
-            className += (_ripple ? " mdl-js-ripple-effect" : "");
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-js-ripple-effect", _ripple);
+            }
         }
         
         public function get text():String

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Grid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Grid.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Grid.as
index 1b402d2..1c236f9 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Grid.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Grid.as
@@ -91,7 +91,10 @@ package org.apache.flex.mdl
         {
             _nospacing = value;
 
-            className += (_nospacing ? " mdl-grid--no-spacing" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-grid--no-spacing", _nospacing);
+            }
         }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/GridCell.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/GridCell.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/GridCell.as
index 4ac59d6..8bcb9a4 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/GridCell.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/GridCell.as
@@ -90,11 +90,16 @@ package org.apache.flex.mdl
         }
         public function set column(value:Number):void
         {
-			if(value > 0 || value < 13)
+			COMPILE::JS
 			{
-				_column = value;
-
-				className += " mdl-cell--" + _column + "-col";
+				element.classList.remove("mdl-cell--" + _column + "-col");
+				
+				if(value > 0 || value < 13)
+				{
+					_column = value;
+
+					element.classList.add("mdl-cell--" + _column + "-col");
+				}
 			}  
         }
 
@@ -115,12 +120,17 @@ package org.apache.flex.mdl
         }
         public function set columnDesktop(value:Number):void
         {
-			if(value > 0 || value < 13)
+			COMPILE::JS
 			{
-				_columnDesktop = value;
+				element.classList.remove("mdl-cell--" + _columnDesktop + "-col-desktop");
+				
+				if(value > 0 || value < 13)
+				{
+					_columnDesktop = value;
 
-				className += " mdl-cell--" + _columnDesktop + "-col-desktop";
-			}  
+					element.classList.add("mdl-cell--" + _columnDesktop + "-col-desktop");
+				}
+			} 
         }
 
 		protected var _columnTablet:Number;
@@ -140,12 +150,17 @@ package org.apache.flex.mdl
         }
         public function set columnTablet(value:Number):void
         {
-			if(value > 0 || value < 9)
+			COMPILE::JS
 			{
-				_columnTablet = value;
-
-				className += " mdl-cell--" + _columnTablet + "-col-tablet";
-			}  
+				element.classList.remove("mdl-cell--" + _columnTablet + "-col-tablet");
+				
+				if(value > 0 || value < 9)
+				{
+					_columnTablet = value;
+
+					element.classList.add("mdl-cell--" + _columnTablet + "-col-tablet");
+				}
+			}
         }
 
 		protected var _columnPhone:Number;
@@ -165,12 +180,17 @@ package org.apache.flex.mdl
         }
         public function set columnPhone(value:Number):void
         {
-			if(value > 0 || value < 5)
+			COMPILE::JS
 			{
-				_columnPhone = value;
+				element.classList.remove("mdl-cell--" + _columnPhone + "-col-phone");
+				
+				if(value > 0 || value < 5)
+				{
+					_columnPhone = value;
 
-				className += " mdl-cell--" + _columnPhone + "-col-phone";
-			}  
+					element.classList.add("mdl-cell--" + _columnPhone + "-col-phone");
+				}
+			} 
         }
 
 		protected var _offset:Number;
@@ -190,11 +210,16 @@ package org.apache.flex.mdl
         }
         public function set offset(value:Number):void
         {
-			if(value > 0 || value < 12)
+			COMPILE::JS
 			{
-				_offset = value;
-
-				className += " mdl-cell--" + _offset + "-offset";
+				element.classList.remove("mdl-cell--" + _offset + "-offset");
+				
+				if(value > 0 || value < 12)
+				{
+					_offset = value;
+
+					element.classList.add("mdl-cell--" + _offset + "-offset");
+				}
 			}
         }
 
@@ -215,11 +240,16 @@ package org.apache.flex.mdl
         }
         public function set offsetDesktop(value:Number):void
         {
-			if(value > 0 || value < 12)
+			COMPILE::JS
 			{
-				_offsetDesktop = value;
-
-				className += " mdl-cell--" + _offsetDesktop + "-offset-desktop";
+				element.classList.remove("mdl-cell--" + _offsetDesktop + "-offset-desktop");
+				
+				if(value > 0 || value < 12)
+				{
+					_offsetDesktop = value;
+
+					element.classList.add("mdl-cell--" + _offsetDesktop + "-offset-desktop");
+				}
 			}
         }
 
@@ -240,11 +270,16 @@ package org.apache.flex.mdl
         }
         public function set offsetTablet(value:Number):void
         {
-			if(value > 0 || value < 12)
+			COMPILE::JS
 			{
-				_offsetTablet = value;
-
-				className += " mdl-cell--" + _offsetTablet + "-offset-tablet";
+				element.classList.remove("mdl-cell--" + _offsetTablet + "-offset-tablet");
+				
+				if(value > 0 || value < 12)
+				{
+					_offsetTablet = value;
+
+					element.classList.add("mdl-cell--" + _offsetTablet + "-offset-tablet");
+				}
 			}
         }
 
@@ -265,11 +300,16 @@ package org.apache.flex.mdl
         }
         public function set offsetPhone(value:Number):void
         {
-			if(value > 0 || value < 12)
+			COMPILE::JS
 			{
-				_offsetPhone = value;
-
-				className += " mdl-cell--" + _offsetPhone + "-offset-phone";
+				element.classList.remove("mdl-cell--" + _offsetPhone + "-offset-phone");
+				
+				if(value > 0 || value < 12)
+				{
+					_offsetPhone = value;
+
+					element.classList.add("mdl-cell--" + _offsetPhone + "-offset-phone");
+				}
 			}
         }
 
@@ -290,11 +330,16 @@ package org.apache.flex.mdl
         }
         public function set order(value:Number):void
         {
-			if(value > 0 || value < 13)
+			COMPILE::JS
 			{
-				_order = value;
-
-				className += " mdl-cell--order-" + _order;
+				element.classList.remove("mdl-cell--order-" + _order);
+				
+				if(value > 0 || value < 13)
+				{
+					_order = value;
+
+					element.classList.add("mdl-cell--order-" + _order);
+				}
 			}
         }
 
@@ -315,11 +360,16 @@ package org.apache.flex.mdl
         }
         public function set orderDesktop(value:Number):void
         {
-			if(value > 0 || value < 13)
+			COMPILE::JS
 			{
-				_orderDesktop = value;
-
-				className += " mdl-cell--order-" + _orderDesktop + "-desktop";
+				element.classList.remove("mdl-cell--order-" + _orderDesktop + "-desktop");
+				
+				if(value > 0 || value < 13)
+				{
+					_orderDesktop = value;
+
+					element.classList.add("mdl-cell--order-" + _orderDesktop + "-desktop");
+				}
 			}
         }
 
@@ -340,11 +390,16 @@ package org.apache.flex.mdl
         }
         public function set orderTablet(value:Number):void
         {
-			if(value > 0 || value < 13)
+			COMPILE::JS
 			{
-				_orderTablet = value;
-
-				className += " mdl-cell--order-" + _orderTablet + "-tablet";
+				element.classList.remove("mdl-cell--order-" + _orderTablet + "-tablet");
+				
+				if(value > 0 || value < 13)
+				{
+					_orderTablet = value;
+
+					element.classList.add("mdl-cell--order-" + _orderTablet + "-tablet");
+				}
 			}
         }
 
@@ -365,11 +420,16 @@ package org.apache.flex.mdl
         }
         public function set orderPhone(value:Number):void
         {
-			if(value > 0 || value < 13)
+			COMPILE::JS
 			{
-				_orderPhone = value;
-
-				className += " mdl-cell--order-" + _orderPhone + "-phone";
+				element.classList.remove("mdl-cell--order-" + _orderPhone + "-phone");
+				
+				if(value > 0 || value < 13)
+				{
+					_orderPhone = value;
+
+					element.classList.add("mdl-cell--order-" + _orderPhone + "-phone");
+				}
 			}
         }
 		
@@ -391,7 +451,10 @@ package org.apache.flex.mdl
         {
             _hideDesktop = value;
 
-            className += (_hideDesktop ? " mdl-cell--hide-desktop" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-cell--hide-desktop", _hideDesktop);
+            }
         }
 
 		protected var _hideTablet:Boolean = false;
@@ -412,7 +475,10 @@ package org.apache.flex.mdl
         {
             _hideTablet = value;
 
-            className += (_hideTablet ? " mdl-cell--hide-tablet" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-cell--hide-tablet", _hideTablet);
+            }
         }
 
 		protected var _hidePhone:Boolean = false;
@@ -433,7 +499,10 @@ package org.apache.flex.mdl
         {
             _hidePhone = value;
 
-            className += (_hidePhone ? " mdl-cell--hide-phone" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-cell--hide-phone", _hidePhone);
+            }
         }
 
 		protected var _strech:Boolean = false;
@@ -455,7 +524,10 @@ package org.apache.flex.mdl
         {
             _strech = value;
 
-            className += (_strech ? " mdl-cell--stretch" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-cell--stretch", _strech);
+            }
         }
 
 		protected var _alignTop:Boolean = false;
@@ -476,7 +548,10 @@ package org.apache.flex.mdl
         {
             _alignTop = value;
 
-            className += (_alignTop ? " mdl-cell--top" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-cell--top", _alignTop);
+            }
         }
 
 		protected var _alignMiddle:Boolean = false;
@@ -497,7 +572,10 @@ package org.apache.flex.mdl
         {
             _alignMiddle = value;
 
-            className += (_alignMiddle ? " mdl-cell--middle" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-cell--middle", _alignMiddle);
+            }
         }
 
 		protected var _alignBottom:Boolean = false;
@@ -518,7 +596,10 @@ package org.apache.flex.mdl
         {
             _alignBottom = value;
 
-            className += (_alignBottom ? " mdl-cell--bottom" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-cell--bottom", _alignBottom);
+            }
         }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Header.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Header.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Header.as
index eeecffe..dcf2af7 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Header.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Header.as
@@ -91,7 +91,10 @@ package org.apache.flex.mdl
         {
 			_transparent = value;
 
-			className += (_transparent ? " mdl-layout__header--transparent" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-layout__header--transparent", _transparent);
+            }
         }
 
 		protected var _scrollable:Boolean;
@@ -112,7 +115,10 @@ package org.apache.flex.mdl
         {
 			_scrollable = value;
 
-			className += (_scrollable ? " mdl-layout__header--scroll" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-layout__header--scroll", _scrollable);
+            }
         }
 
 		protected var _waterfall:Boolean;
@@ -133,7 +139,10 @@ package org.apache.flex.mdl
         {
 			_waterfall = value;
 
-			className += (_waterfall ? " mdl-layout__header--waterfall" : "");
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-layout__header--waterfall", _waterfall);
+            }
         }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/MenuItem.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/MenuItem.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/MenuItem.as
index 105d0db..5c18a5f 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/MenuItem.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/MenuItem.as
@@ -145,7 +145,10 @@ package org.apache.flex.mdl
         {
             _ripple = value;
 
-            className += (_ripple ? " mdl-js-ripple-effect" : "");
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-js-ripple-effect", _ripple);
+            }
         }     
 
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayout.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayout.as
index 246330a..a5a611a 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayout.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayout.as
@@ -91,7 +91,10 @@ package org.apache.flex.mdl
         {
 			_fixedHeader = value;
 
-			className += (_fixedHeader ? " mdl-layout--fixed-header" : "");  
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-layout--fixed-header", _fixedHeader);
+            } 
         }
 
 		protected var _fixedDrawer:Boolean;
@@ -112,7 +115,10 @@ package org.apache.flex.mdl
         {
 			_fixedDrawer = value;
 
-			className += (_fixedDrawer ? " mdl-layout--fixed-drawer" : "");  
+			COMPILE::JS
+            {
+                element.classList.toggle("mdl-layout--fixed-drawer", _fixedDrawer);
+            }
         }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
index cbdbd75..41ce163 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
@@ -157,7 +157,10 @@ package org.apache.flex.mdl
         {
             _ripple = value;
 
-            className += (_ripple ? " mdl-js-ripple-effect" : "");
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-js-ripple-effect", _ripple);
+            }
         }
         
         /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
index 8fe1fce..311fd01 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
@@ -149,7 +149,10 @@ package org.apache.flex.mdl
         {
             _ripple = value;
 
-            className += (_ripple ? " mdl-js-ripple-effect" : "");
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-js-ripple-effect", _ripple);
+            }
         }
 
         public function get text():String

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
index b8d7c9e..4558abc 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
@@ -89,9 +89,8 @@ package org.apache.flex.mdl
 			} else {
 				typeNames = "mdl-layout__tab-bar";
 			}
-
-			element.className = typeNames;
-			className += (_ripple ? " mdl-js-ripple-effect" : "");
+			
+			element.classList.add(typeNames);			
         }
 
 		protected var _ripple:Boolean = false;
@@ -112,7 +111,10 @@ package org.apache.flex.mdl
         {
             _ripple = value;
 
-            className += (_ripple ? " mdl-js-ripple-effect" : "");
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-js-ripple-effect", _ripple);
+            }
         }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as
index 590fa0b..c3b0566 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarButton.as
@@ -70,9 +70,9 @@ package org.apache.flex.mdl
 		{
             _isActive = value;
             
-            COMPILE::JS
+			COMPILE::JS
             {
-				className += (_isActive ? " is-active" : "");
+                element.classList.toggle("is-active", _isActive);
             }
 		}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as
index 4574e03..9141eaf 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBarPanel.as
@@ -93,8 +93,7 @@ package org.apache.flex.mdl
 				typeNames = "mdl-layout__tab-panel";
 			}
 			
-			element.className = typeNames;
-			className += (_isActive ? " is-active" : "");
+			element.classList.add(typeNames);
         }
 
 		private var _isActive:Boolean;
@@ -117,7 +116,7 @@ package org.apache.flex.mdl
             
             COMPILE::JS
             {
-				className += (_isActive ? " is-active" : "");
+                element.classList.toggle("is-active", _isActive);
             }
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
index b309f20..9b019fe 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Tabs.as
@@ -91,7 +91,10 @@ package org.apache.flex.mdl
         {
             _ripple = value;
 
-            className += (_ripple ? " mdl-js-ripple-effect" : "");
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-js-ripple-effect", _ripple);
+            }
         }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec680f76/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
index 710c25b..810f5b0 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextField.as
@@ -79,8 +79,6 @@ package org.apache.flex.mdl
                 _input = value;
             }
         }
-        
-
 
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
@@ -163,32 +161,8 @@ package org.apache.flex.mdl
 
             COMPILE::JS
             {
-                className += (_floatingLabel ? " mdl-textfield--floating-label" : "");
+                positioner.classList.toggle("mdl-textfield--floating-label", _floatingLabel);
             }
         }
-
-        protected var _ripple:Boolean = false;
-        /**
-		 *  A boolean flag to activate "mdl-js-ripple-effect" effect selector.
-         *  Applies ripple click effect. May be used in combination with any other classes
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get ripple():Boolean
-        {
-            return _ripple;
-        }
-        public function set ripple(value:Boolean):void
-        {
-            _ripple = value;
-
-            COMPILE::JS
-            {
-                className += (_ripple ? " mdl-js-ripple-effect" : "");
-            }
-        } 
 	}
 }


Mime
View raw message