Repository: flex-asjs
Updated Branches:
  refs/heads/develop 6d496bcbd -> 5863a8c83


Continue refactor to classList


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

Branch: refs/heads/develop
Commit: 5863a8c830241751907bafe6fe28b3874952ee80
Parents: 6d496bc
Author: Carlos Rovira <carlosrov...@apache.org>
Authored: Thu Dec 1 14:27:07 2016 +0100
Committer: Carlos Rovira <carlosrov...@apache.org>
Committed: Thu Dec 1 14:27:07 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/Tabs.mxml   | 16 +++---
 .../src/main/flex/org/apache/flex/mdl/Button.as |  3 +-
 .../src/main/flex/org/apache/flex/mdl/Card.as   |  1 -
 .../flex/org/apache/flex/mdl/CardActions.as     |  3 +-
 .../main/flex/org/apache/flex/mdl/CardMedia.as  |  3 +-
 .../main/flex/org/apache/flex/mdl/CardMenu.as   |  3 +-
 .../org/apache/flex/mdl/CardSupportingText.as   |  3 +-
 .../main/flex/org/apache/flex/mdl/CardTitle.as  |  3 +-
 .../flex/org/apache/flex/mdl/CardTitleText.as   |  3 +-
 .../src/main/flex/org/apache/flex/mdl/Drawer.as |  1 -
 .../src/main/flex/org/apache/flex/mdl/Grid.as   |  1 -
 .../main/flex/org/apache/flex/mdl/GridCell.as   |  1 -
 .../src/main/flex/org/apache/flex/mdl/Header.as |  1 -
 .../main/flex/org/apache/flex/mdl/HeaderRow.as  |  1 -
 .../src/main/flex/org/apache/flex/mdl/List.as   |  1 -
 .../src/main/flex/org/apache/flex/mdl/Menu.as   |  5 +-
 .../main/flex/org/apache/flex/mdl/MenuItem.as   |  5 +-
 .../main/flex/org/apache/flex/mdl/Navigation.as |  1 -
 .../org/apache/flex/mdl/NavigationLayout.as     |  1 -
 .../apache/flex/mdl/NavigationLayoutContent.as  |  1 -
 .../flex/org/apache/flex/mdl/TabBarButton.as    |  5 +-
 .../src/main/flex/org/apache/flex/mdl/Tabs.as   |  1 -
 .../flex/org/apache/flex/mdl/beads/Badge.as     | 56 ++++++++++----------
 .../apache/flex/mdl/supportClasses/CardInner.as | 10 +++-
 24 files changed, 61 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml 
b/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
index e6ccfe5..06efb1e 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Tabs.mxml
@@ -25,13 +25,13 @@ limitations under the License.
     <mdl:Grid className="demo-grid">
         
         <mdl:Tabs width="400">
-            <mdl:TabBar ripple="true">
-                <mdl:TabBarButton text="Tab One" href="#tab1" isActive="true"/>
+            <mdl:TabBar>
+                <mdl:TabBarButton text="Tab One" href="#tab1"/>
                 <mdl:TabBarButton text="Tab Two" href="#tab2"/>
                 <mdl:TabBarButton text="Tab Three" href="#tab3"/>
             </mdl:TabBar>
             
-            <mdl:TabBarPanel id="tab1" isActive="true">
+            <mdl:TabBarPanel id="tab1">
                 <js:Label text="Tab 1"/>
             </mdl:TabBarPanel>
 
@@ -45,13 +45,13 @@ limitations under the License.
         </mdl:Tabs>
 
         <mdl:Tabs width="400" ripple="true">
-            <mdl:TabBar ripple="true">
-                <mdl:TabBarButton text="Starks" href="#starks_panel" 
isActive="true"/>
-                <mdl:TabBarButton text="Lannisters" href="#lannisters_panel"/>
+            <mdl:TabBar>
+                <mdl:TabBarButton text="Starks" href="#starks_panel"/>
+                <mdl:TabBarButton text="Lannisters" href="#lannisters_panel" 
isActive="true"/>
                 <mdl:TabBarButton text="Targaryens" href="#targaryens_panel"/>
             </mdl:TabBar>
             
-            <mdl:TabBarPanel id="starks_panel" isActive="true">
+            <mdl:TabBarPanel id="starks_panel">
                 <js:Ul>
                     <js:Li><js:Label text="Eddard"/></js:Li>
                     <js:Li><js:Label text="Catelyn"/></js:Li>
@@ -63,7 +63,7 @@ limitations under the License.
                 </js:Ul>
             </mdl:TabBarPanel>
 
-            <mdl:TabBarPanel id="lannisters_panel">
+            <mdl:TabBarPanel id="lannisters_panel" isActive="true">
                 <js:Ul>
                     <js:Li><js:Label text="Tywin"/></js:Li>
                     <js:Li><js:Label text="Cersei"/></js:Li>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 cf2d873..98c0970 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
@@ -61,8 +61,7 @@ package org.apache.flex.mdl
             typeNames = "mdl-button mdl-js-button";
             
             element = document.createElement('button') as WrappedHTMLElement;
-            element.className = typeNames;
-
+            
             positioner = element;
             element.flexjs_wrapper = this;
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 3e277c3..c84c56a 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
@@ -67,7 +67,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-card";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 6f373ff..c6eeee9 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
@@ -64,8 +64,7 @@ package org.apache.flex.mdl
                        typeNames = "mdl-card__actions";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
-
+            
             positioner = element;
             
             // absolute positioned children need a non-null

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 af9232d..8a959c4 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
@@ -64,8 +64,7 @@ package org.apache.flex.mdl
                        typeNames = "mdl-card__media";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
-
+            
             positioner = element;
             
             // absolute positioned children need a non-null

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 1b61ea9..d9cc281 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
@@ -64,8 +64,7 @@ package org.apache.flex.mdl
                        typeNames = "mdl-card__menu";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
-
+            
             positioner = element;
             
             // absolute positioned children need a non-null

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 9f8f5ba..8f79351 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
@@ -64,8 +64,7 @@ package org.apache.flex.mdl
                        typeNames = "mdl-card__supporting-text";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
-
+            
             positioner = element;
             
             // absolute positioned children need a non-null

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 c48745e..856dd58 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
@@ -64,8 +64,7 @@ package org.apache.flex.mdl
                        typeNames = "mdl-card__title";
 
             element = document.createElement('div') as WrappedHTMLElement;
-                       element.className = typeNames;
-            
+                       
             positioner = element;
             
             // absolute positioned children need a non-null

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitleText.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitleText.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitleText.as
index 466f8db..68b08bc 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitleText.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitleText.as
@@ -67,8 +67,7 @@ package org.apache.flex.mdl
             h2.appendChild(textNode); 
 
                        element = h2 as WrappedHTMLElement;
-            element.className = typeNames;
-
+            
             positioner = element;
                        element.flexjs_wrapper = this;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Drawer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Drawer.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Drawer.as
index f6c0253..3e71c5e 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Drawer.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Drawer.as
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-layout__drawer";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 1c236f9..3faf7b6 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
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-grid";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 8bcb9a4..4971cae 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
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-cell";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 dcf2af7..1002cb7 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
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-layout__header";
 
             element = document.createElement('header') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/HeaderRow.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/HeaderRow.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/HeaderRow.as
index 4cd4403..c024807 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/HeaderRow.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/HeaderRow.as
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-layout__header-row";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
index 067ee8e..ad4076e 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/List.as
@@ -62,7 +62,6 @@ package org.apache.flex.mdl
             typeNames = "mdl-list";
             
             element = document.createElement('ul') as WrappedHTMLElement;
-            element.className = typeNames;
             //(element as HTMLSelectElement).size = 5;
             //goog.events.listen(element, 'change',changeHandler);
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 a438316..9a4a956 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
@@ -181,7 +181,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/5863a8c8/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 5c18a5f..62881fa 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
@@ -125,7 +125,10 @@ package org.apache.flex.mdl
                {
                        _divider = value;
 
-            className += (_divider ? " mdl-menu__item--full-bleed-divider" : 
"");
+            COMPILE::JS
+            {
+                element.classList.toggle("mdl-menu__item--full-bleed-divider", 
_divider);
+            }
                }
 
         protected var _ripple:Boolean = false;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Navigation.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Navigation.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Navigation.as
index e170f93..25cac28 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Navigation.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Navigation.as
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-navigation";
 
             element = document.createElement('nav') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 a5a611a..b434aaa 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
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-layout mdl-js-layout";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayoutContent.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayoutContent.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayoutContent.as
index a0444ba..43428b3 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayoutContent.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/NavigationLayoutContent.as
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-layout__content";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 c3b0566..0d183c1 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
@@ -51,7 +51,7 @@ package org.apache.flex.mdl
                        className = ""; //set to empty string avoid 'undefined' 
output when no class selector is assigned by user;
                }
                
-               private var _isActive:Boolean;
+               private var _isActive:Boolean = false;
 
         /**
          *  Marks this Button as the active one in the TabBar
@@ -120,8 +120,7 @@ package org.apache.flex.mdl
                                        typeNames = "mdl-layout__tab";
                                }
 
-                               element.className = typeNames;
-                               className += (_isActive ? " is-active" : "");
+                               element.classList.add(typeNames);
                        }
         }
        }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 9b019fe..4c456d9 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
@@ -60,7 +60,6 @@ package org.apache.flex.mdl
                        typeNames = "mdl-tabs mdl-js-tabs";
 
             element = document.createElement('div') as WrappedHTMLElement;
-            element.className = typeNames;
             
                        positioner = element;
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 66f5f8a..4abb3ed 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
@@ -67,7 +67,7 @@ package org.apache.flex.mdl.beads
                        _dataBadge = value;
                }
 
-               private var _noBackground:String = "";
+               private var _noBackground:Boolean = false;
         /**
                 *  A boolean flag to activate "mdl-badge--no-background" 
effect selector.
                 *  Applies open-circle effect to badge
@@ -83,14 +83,18 @@ package org.apache.flex.mdl.beads
         }
         public function set noBackground(value:Boolean):void
         {
-            if(value) {
-                _noBackground = " mdl-badge--no-background";
-            } else {
-                _noBackground = "";
+                       _noBackground = value;
+                       
+                       COMPILE::JS
+            {
+                               if(host)
+                               {
+                       
host.element.classList.toggle("mdl-badge--no-background", _noBackground);
+                               }
             }   
         }
 
-        private var _overlap:String = "";
+        private var _overlap:Boolean = false;
         /**
                 *  A boolean flag to activate "mdl-badge--overlap" effect 
selector.
                 *  Make the badge overlap with its container
@@ -106,15 +110,20 @@ package org.apache.flex.mdl.beads
         }
         public function set overlap(value:Boolean):void
         {
-            if(value) {
-                _overlap = " mdl-badge--overlap";
-            } else {
-                _overlap = "";
-            }   
+                       _overlap = value;
+                       
+                       COMPILE::JS
+            {
+                               if(host) 
+                               {
+                       host.element.classList.toggle("mdl-badge--overlap", 
_overlap);
+                               }
+            }
         }
 
-               private var _strand:IStrand;
-               
+               private var host:UIBase;
+
+               private var _strand:IStrand;            
                /**
                 *  @copy org.apache.flex.core.IBead#strand
                 *  
@@ -130,23 +139,14 @@ package org.apache.flex.mdl.beads
                        
                        COMPILE::JS
                        {
-                               var host:UIBase = value as UIBase;
+                               host = value as UIBase;
                                
-                               if (host.element is HTMLSpanElement)
-                               {
-                                       var span:HTMLSpanElement = host.element 
as HTMLSpanElement;
-                                       span.className += " mdl-badge " + 
_noBackground + _overlap;
-                                       span.setAttribute('data-badge', 
_dataBadge.toString());
-                               } else if (host.element is HTMLDivElement)
-                               {
-                                       var div:HTMLDivElement = host.element 
as HTMLDivElement;
-                                       div.className += " mdl-badge " + 
_noBackground + _overlap;
-                                       div.setAttribute('data-badge', 
_dataBadge.toString());
-                               } else if (host.element is HTMLElement)
+                               if (host.element is HTMLSpanElement || 
host.element is HTMLDivElement || host.element is HTMLElement)
                                {
-                                       var a:HTMLElement = host.element as 
HTMLElement;
-                                       a.className += " mdl-badge " + 
_noBackground + _overlap;
-                                       a.setAttribute('data-badge', 
_dataBadge.toString());
+                                       host.element.classList.add("mdl-badge");
+                                       
host.element.classList.toggle("mdl-badge--no-background", _noBackground);
+                                       
host.element.classList.toggle("mdl-badge--overlap", _overlap);
+                                       host.element.setAttribute('data-badge', 
_dataBadge.toString());
                                } else
                                {
                                        throw new Error("Host component must be 
an MDL Host for Badges.");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5863a8c8/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 8afeaa5..48d077d 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
@@ -95,7 +95,10 @@ package org.apache.flex.mdl.supportClasses
         {
                        _border = value;
 
-            className += (_border ? " mdl-card--border" : "");  
+                       COMPILE::JS
+               {
+                               element.classList.toggle("mdl-card--border", 
_border);
+                       }
         }
 
                private var _expand:Boolean = false;
@@ -117,7 +120,10 @@ package org.apache.flex.mdl.supportClasses
         {
                        _expand = value;
 
-            className += (_expand ? " mdl-card--expand" : "");  
+                       COMPILE::JS
+               {
+                               element.classList.toggle("mdl-card--expand", 
_expand);
+                       }
         } 
        }
 }

Reply via email to