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] - Update all properties in MDL components to be added to typeNames when change, so avoid that users could remove them when assign class selectors
Date Sat, 14 Jan 2017 18:09:45 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 92ef3a7ef -> 40b2330f9


Update all properties in MDL components to be added to typeNames when change, so avoid that
users could remove them when assign class selectors


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

Branch: refs/heads/develop
Commit: 40b2330f9d4d021a84b243e181acbfc61b4509b4
Parents: 92ef3a7
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Sat Jan 14 19:09:41 2017 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sat Jan 14 19:09:41 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Button.as |   8 ++
 .../src/main/flex/org/apache/flex/mdl/Card.as   |   2 +
 .../main/flex/org/apache/flex/mdl/CheckBox.as   |   1 +
 .../src/main/flex/org/apache/flex/mdl/Grid.as   |   1 +
 .../main/flex/org/apache/flex/mdl/GridCell.as   |  31 ++++++
 .../src/main/flex/org/apache/flex/mdl/Header.as |   3 +
 .../main/flex/org/apache/flex/mdl/IconToggle.as | 106 +++++--------------
 .../src/main/flex/org/apache/flex/mdl/Menu.as   |   1 +
 .../org/apache/flex/mdl/NavigationLayout.as     |   2 +
 .../flex/org/apache/flex/mdl/ProgressBar.as     |  80 ++++++--------
 .../flex/org/apache/flex/mdl/RadioButton.as     |   1 +
 .../main/flex/org/apache/flex/mdl/Spinner.as    |  63 +++++------
 .../src/main/flex/org/apache/flex/mdl/Switch.as |   1 +
 .../src/main/flex/org/apache/flex/mdl/TabBar.as |   1 +
 .../flex/org/apache/flex/mdl/TabBarButton.as    |   1 +
 .../flex/org/apache/flex/mdl/TabBarPanel.as     |   1 +
 .../src/main/flex/org/apache/flex/mdl/Tabs.as   |   1 +
 .../flex/org/apache/flex/mdl/beads/Badge.as     |   2 +
 .../flex/mdl/supportClasses/TextFieldBase.as    |  23 ++--
 19 files changed, 146 insertions(+), 183 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
index 4ad120e..55fbe61 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
@@ -114,6 +114,7 @@ package org.apache.flex.mdl
              COMPILE::JS
              {
                  element.classList.toggle("mdl-button--fab", _fab);
+                 typeNames = element.className;
              }
         }
 
@@ -138,6 +139,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-button--raised", _raised);
+                typeNames = element.className;
             }
         }
 
@@ -163,6 +165,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-button--colored", _colored);
+                typeNames = element.className;
             } 
         }
 
@@ -188,6 +191,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-button--accent", _accent);
+                typeNames = element.className;
             } 
         }
 
@@ -213,6 +217,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-button--primary", _primary);
+                typeNames = element.className;
             }
         }
 
@@ -238,6 +243,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-button--mini-fab", _minifab);
+                typeNames = element.className;
             }
         }
 
@@ -263,6 +269,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-button--icon", _icon);
+                typeNames = element.className;
             }
         }
 
@@ -287,6 +294,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-js-ripple-effect", _ripple);
+                typeNames = element.className;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 c84c56a..9f024a7 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
@@ -105,6 +105,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-shadow--" + _shadow + "dp");
 				}
+
+				typeNames = element.className;
 			}
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 7799f49..52aeef2 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
@@ -151,6 +151,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-js-ripple-effect", _ripple);
+                typeNames = element.className;
             }
         }
         

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 3faf7b6..2e3bfa5 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
@@ -93,6 +93,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-grid--no-spacing", _nospacing);
+				typeNames = element.className;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 4971cae..d8e4348 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
@@ -99,6 +99,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _column + "-col");
 				}
+				
+				typeNames = element.className;
 			}  
         }
 
@@ -129,6 +131,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _columnDesktop + "-col-desktop");
 				}
+
+				typeNames = element.className;
 			} 
         }
 
@@ -159,6 +163,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _columnTablet + "-col-tablet");
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -189,6 +195,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _columnPhone + "-col-phone");
 				}
+
+				typeNames = element.className;
 			} 
         }
 
@@ -219,6 +227,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _offset + "-offset");
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -249,6 +259,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _offsetDesktop + "-offset-desktop");
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -279,6 +291,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _offsetTablet + "-offset-tablet");
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -309,6 +323,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--" + _offsetPhone + "-offset-phone");
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -339,6 +355,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--order-" + _order);
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -369,6 +387,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--order-" + _orderDesktop + "-desktop");
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -399,6 +419,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--order-" + _orderTablet + "-tablet");
 				}
+
+				typeNames = element.className;
 			}
         }
 
@@ -429,6 +451,8 @@ package org.apache.flex.mdl
 
 					element.classList.add("mdl-cell--order-" + _orderPhone + "-phone");
 				}
+
+				typeNames = element.className;
 			}
         }
 		
@@ -453,6 +477,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-cell--hide-desktop", _hideDesktop);
+				typeNames = element.className;
             }
         }
 
@@ -477,6 +502,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-cell--hide-tablet", _hideTablet);
+				typeNames = element.className;
             }
         }
 
@@ -501,6 +527,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-cell--hide-phone", _hidePhone);
+				typeNames = element.className;
             }
         }
 
@@ -526,6 +553,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-cell--stretch", _strech);
+				typeNames = element.className;
             }
         }
 
@@ -550,6 +578,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-cell--top", _alignTop);
+				typeNames = element.className;
             }
         }
 
@@ -574,6 +603,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-cell--middle", _alignMiddle);
+				typeNames = element.className;
             }
         }
 
@@ -598,6 +628,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-cell--bottom", _alignBottom);
+				typeNames = element.className;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 1002cb7..93348b6 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
@@ -93,6 +93,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-layout__header--transparent", _transparent);
+				typeNames = element.className;
             }
         }
 
@@ -117,6 +118,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-layout__header--scroll", _scrollable);
+				typeNames = element.className;
             }
         }
 
@@ -141,6 +143,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-layout__header--waterfall", _waterfall);
+				typeNames = element.className;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
index bf5a994..20b901c 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
@@ -20,10 +20,10 @@ package org.apache.flex.mdl
 {
     import org.apache.flex.mdl.materialIcons.IMaterialIcon;
     import org.apache.flex.mdl.supportClasses.MaterialIconBase;
+    import org.apache.flex.core.UIBase;
 
     COMPILE::JS
-    {
-        import org.apache.flex.core.UIBase;
+    {    
         import org.apache.flex.core.WrappedHTMLElement;
     }
     /**
@@ -34,22 +34,24 @@ package org.apache.flex.mdl
      *  @playerversion Flash 10.2
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
-     */
-    COMPILE::SWF
-    public class IconToggle implements IMaterialIcon
+     */    
+    public class IconToggle extends UIBase implements IMaterialIcon
     {
-        /**
-         *  Constructor.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-         public function IconToggle() {}
+        public function IconToggle()
+        {
+            super();
+
+            className = "";
+        }
+
+        COMPILE::JS
+        private var label:HTMLLabelElement;
+
+        COMPILE::JS
+        private var input:HTMLInputElement;
 
-        private var _ripple:Boolean;
         private var _dataMdlFor:String = "icon-toggle-1";
+        private var _ripple:Boolean = false;
         private var _materialIcon:MaterialIconBase;
         
         /**
@@ -65,10 +67,18 @@ package org.apache.flex.mdl
         {
             return _dataMdlFor;
         }
-
         public function set dataMdlFor(value:String):void
         {
             _dataMdlFor = value;
+
+            COMPILE::JS
+            {
+                if (input)
+                {
+                    input.id = _dataMdlFor;
+                }
+                element.setAttribute('for', _dataMdlFor);
+            }
         }
 
         /**
@@ -88,73 +98,14 @@ package org.apache.flex.mdl
         public function set ripple(value:Boolean):void
         {
             _ripple = value;
-        }
-
-        /**
-         *  A material icon. Optional
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-        public function get materialIcon():MaterialIconBase
-        {
-            return _materialIcon;
-        }
-        public function set materialIcon(value:MaterialIconBase):void
-        {
-            _materialIcon = value;
-        }
-    }
-        
-    COMPILE::JS
-    public class IconToggle extends UIBase
-    {
-        public function IconToggle()
-        {
-            super();
-
-            className = "";
-        }
-
-        private var label:HTMLLabelElement;
-        private var input:HTMLInputElement;
-
-        private var _dataMdlFor:String = "icon-toggle-1";
-        private var _ripple:Boolean = false;
-        private var _materialIcon:MaterialIconBase;
-        
-        public function get dataMdlFor():String
-        {
-            return _dataMdlFor;
-        }
-        public function set dataMdlFor(value:String):void
-        {
-            _dataMdlFor = value;
 
             COMPILE::JS
             {
-                if (input)
-                {
-                    input.id = _dataMdlFor;
-                }
-                element.setAttribute('for', _dataMdlFor);
+                element.classList.toggle("mdl-js-ripple-effect", _ripple);
+                typeNames = element.className;
             }
         }
 
-        public function get ripple():Boolean
-        {
-            return _ripple;
-        }
-
-        public function set ripple(value:Boolean):void
-        {
-            _ripple = value;
-
-            element.classList.toggle("mdl-js-ripple-effect", _ripple);
-        }
-
         /**
          *  A material icon. Optional
          *
@@ -183,6 +134,7 @@ package org.apache.flex.mdl
          * @flexjsignorecoercion HTMLLabelElement
          * @flexjsignorecoercion HTMLInputElement
          */
+        COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
             typeNames = "mdl-icon-toggle mdl-js-icon-toggle";

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
index 77df29a..6fed733 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Menu.as
@@ -244,6 +244,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-js-ripple-effect", _ripple);
+                typeNames = element.className;
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 b434aaa..52d9f23 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
@@ -93,6 +93,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-layout--fixed-header", _fixedHeader);
+				typeNames = element.className;
             } 
         }
 
@@ -117,6 +118,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("mdl-layout--fixed-drawer", _fixedDrawer);
+				typeNames = element.className;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ProgressBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ProgressBar.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ProgressBar.as
index 1f18bc2..4c1e102 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ProgressBar.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ProgressBar.as
@@ -18,10 +18,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
+    import org.apache.flex.core.UIBase;
+    import org.apache.flex.events.Event;
+
     COMPILE::JS
-    {
-        import org.apache.flex.events.Event;
-        import org.apache.flex.core.UIBase;
+    {        
         import org.apache.flex.core.WrappedHTMLElement;
     }
     /**
@@ -33,9 +34,17 @@ package org.apache.flex.mdl
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::SWF
-    public class ProgressBar
+    public class ProgressBar extends UIBase
     {
+        public function ProgressBar()
+        {
+            super();
+
+            className = "";
+        }
+
+        private var materialProgress:Object;
+
         private var _currentProgress:Number;
         private var _currentBuffer:Number;
         private var _indeterminate:Boolean;
@@ -56,6 +65,8 @@ package org.apache.flex.mdl
         public function set currentProgress(value:Number):void
         {
             _currentProgress = value;
+
+            setCurrentProgress(value);
         }
 
         /**
@@ -74,65 +85,34 @@ package org.apache.flex.mdl
         public function set currentBuffer(value:Number):void
         {
             _currentBuffer = value;
-        }
-
-        public function set indeterminate(value:Boolean):void
-        {
-            _indeterminate = value;
-        }
-    }
-
-    COMPILE::JS
-    public class ProgressBar extends UIBase
-    {
-        public function ProgressBar()
-        {
-            super();
-
-            className = "";
-        }
-
-        private var materialProgress:Object;
-
-        private var _currentProgress:Number;
-        private var _currentBuffer:Number;
-        private var _indeterminate:Boolean;
-
-        public function get currentProgress():Number
-        {
-            return _currentProgress;
-        }
-
-        public function set currentProgress(value:Number):void
-        {
-            _currentProgress = value;
-
-            setCurrentProgress(value);
-        }
-
-        public function get currentBuffer():Number
-        {
-            return _currentBuffer;
-        }
-
-        public function set currentBuffer(value:Number):void
-        {
-            _currentBuffer = value;
 
             setCurrentProgress(value);
         }
 
+        /**
+         *  Indeterminate state.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
         public function set indeterminate(value:Boolean):void
         {
             _indeterminate = value;
 
-            element.classList.toggle("mdl-progress__indeterminate", value);
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-progress__indeterminate", value);
+                typeNames = element.className;
+            }
         }
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          *
          * @return
          */
+        COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
             typeNames = "mdl-progress mdl-js-progress";

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 41ce163..24037b0 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
@@ -160,6 +160,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-js-ripple-effect", _ripple);
+                typeNames = element.className;
             }
         }
         

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as
index fac128a..abe6200 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Spinner.as
@@ -18,9 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
+    import org.apache.flex.core.UIBase;
+
     COMPILE::JS
-    {
-        import org.apache.flex.core.UIBase;
+    {    
         import org.apache.flex.core.WrappedHTMLElement;
     }
     /**
@@ -32,12 +33,16 @@ package org.apache.flex.mdl
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::SWF
-    public class Spinner
+    public class Spinner extends UIBase
     {
-        private var _isActive:Boolean;
-        private var _singleColor:Boolean;
+        public function Spinner()
+        {
+            super();
 
+            className = "";
+        }
+
+        private var _isActive:Boolean;
         /**
          *  Indicates whether Spinner is active and visible
          *
@@ -54,9 +59,15 @@ package org.apache.flex.mdl
         public function set isActive(value:Boolean):void
         {
             _isActive = value;
-        }
 
+            COMPILE::JS
+            {
+                element.classList.toggle("is-active", _isActive);
+                typeNames = element.className;
+            }
+        }
 
+        private var _singleColor:Boolean;   
         /**
          *  Make Spinner in a single color
          *
@@ -68,39 +79,12 @@ package org.apache.flex.mdl
         public function set singleColor(value:Boolean):void
         {
             _singleColor = value;
-        }
-    }
-
-    COMPILE::JS
-    public class Spinner extends UIBase
-    {
-        public function Spinner()
-        {
-            super();
-
-            className = "";
-        }
-
-        private var _isActive:Boolean;
-        private var _singleColor:Boolean;
-
-        public function get isActive():Boolean
-        {
-            return _isActive;
-        }
-
-        public function set isActive(value:Boolean):void
-        {
-            _isActive = value;
-
-            element.classList.toggle("is-active", _isActive);
-        }
-
-        public function set singleColor(value:Boolean):void
-        {
-            _singleColor = value;
 
-            element.classList.toggle("mdl-spinner--single-color", _singleColor);
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-spinner--single-color", _singleColor);
+                typeNames = element.className;
+            }
         }
 
         /**
@@ -108,6 +92,7 @@ package org.apache.flex.mdl
          *
          * @return
          */
+        COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
             typeNames = "mdl-spinner mdl-js-spinner";

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 af27d9b..3570866 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
@@ -144,6 +144,7 @@ package org.apache.flex.mdl
             _ripple = value;
 
             element.classList.toggle("mdl-js-ripple-effect", _ripple);
+            typeNames = element.className;
         }
 
         public function get text():String

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 b2f7da5..273738a 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
@@ -222,6 +222,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-js-ripple-effect", _ripple);
+                typeNames = element.className;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 07d4682..f207177 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
@@ -73,6 +73,7 @@ package org.apache.flex.mdl
 			COMPILE::JS
             {
                 element.classList.toggle("is-active", _isActive);
+				typeNames = element.className;
             }
 		}
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 98db21e..2099699 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
@@ -118,6 +118,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("is-active", _isActive);
+				typeNames = element.className;
             }
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/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 4f64e8d..0007793 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
@@ -190,6 +190,7 @@ package org.apache.flex.mdl
             COMPILE::JS
             {
                 element.classList.toggle("mdl-js-ripple-effect", _ripple);
+                typeNames = element.className;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Badge.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Badge.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Badge.as
index 49feb2a..540ca8f 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Badge.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Badge.as
@@ -90,6 +90,7 @@ package org.apache.flex.mdl.beads
 				if(host)
 				{
                 	host.element.classList.toggle("mdl-badge--no-background", _noBackground);
+					host.typeNames = host.element.className;
 				}
             }   
         }
@@ -117,6 +118,7 @@ package org.apache.flex.mdl.beads
 				if(host) 
 				{
                 	host.element.classList.toggle("mdl-badge--overlap", _overlap);
+					host.typeNames = host.element.className;
 				}
             }
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40b2330f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/TextFieldBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/TextFieldBase.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/TextFieldBase.as
index a11ed6b..bcae565 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/TextFieldBase.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/TextFieldBase.as
@@ -36,7 +36,7 @@ package org.apache.flex.mdl.supportClasses
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */    
-	public class TextFieldBase extends org.apache.flex.html.TextInput implements ITextField
+	public class TextFieldBase extends TextInput implements ITextField
 	{
         /**
          *  Constructor.
@@ -108,23 +108,10 @@ package org.apache.flex.mdl.supportClasses
             }
         }
 
-        private var _className:String;
-
-        /**
-         * since we have a div surronding the main input, we need to 
-         * route the class assignaments to div
-         */
-        override public function set className(value:String):void
+        COMPILE::JS
+		override protected function setClassName(value:String):void
 		{
-			if (_className != value)
-			{
-                COMPILE::JS
-                {
-                    positioner.className = typeNames ? value + ' ' + typeNames : value; 
           
-                }
-				_className = value;
-				dispatchEvent(new Event("classNameChanged"));
-			}
+			positioner.className = value;           
 		}
 
         private var _floatingLabel:Boolean = false;
@@ -148,6 +135,7 @@ package org.apache.flex.mdl.supportClasses
             COMPILE::JS
             {
                 positioner.classList.toggle("mdl-textfield--floating-label", _floatingLabel);
+                typeNames = positioner.className;
             }
         }
 
@@ -172,6 +160,7 @@ package org.apache.flex.mdl.supportClasses
             COMPILE::JS
             {
                 positioner.classList.toggle("is-invalid", _isInvalid);
+                typeNames = positioner.className;
             }
         }
 	}


Mime
View raw message