flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Use classList in MDL Chips components and Switch
Date Thu, 01 Dec 2016 21:46:15 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop a84c987f6 -> 0fe93b781


Use classList in MDL Chips components and Switch


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

Branch: refs/heads/develop
Commit: 0fe93b781f1b355276b2f74311a454ef3c716550
Parents: a84c987
Author: piotrz <piotrz@apache.org>
Authored: Thu Dec 1 22:46:10 2016 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Thu Dec 1 22:46:10 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/ButtonChip.as            | 2 +-
 .../src/main/flex/org/apache/flex/mdl/Chip.as                  | 2 +-
 .../src/main/flex/org/apache/flex/mdl/Switch.as                | 5 +++--
 .../src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as   | 6 ++++--
 4 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fe93b78/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ButtonChip.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ButtonChip.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ButtonChip.as
index ab497df..b426834 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ButtonChip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/ButtonChip.as
@@ -72,7 +72,7 @@ package org.apache.flex.mdl
             typeNames = "mdl-chip";
 
             chipTextSpan = document.createElement("span") as HTMLSpanElement;
-            chipTextSpan.classList.toggle("mdl-chip__text");
+            chipTextSpan.classList.add("mdl-chip__text");
 
             textNode = document.createTextNode('') as Text;
             chipTextSpan.appendChild(textNode);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fe93b78/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Chip.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Chip.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Chip.as
index b6b7126..294b551 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Chip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Chip.as
@@ -71,7 +71,7 @@ package org.apache.flex.mdl
             typeNames = "mdl-chip";
 
             chipTextSpan = document.createElement("span") as HTMLSpanElement;
-            chipTextSpan.classList.toggle("mdl-chip__text");
+            chipTextSpan.classList.add("mdl-chip__text");
 
             textNode = document.createTextNode('') as Text;
             chipTextSpan.appendChild(textNode);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fe93b78/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 311fd01..dd43270 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
@@ -112,11 +112,12 @@ package org.apache.flex.mdl
 
             input = document.createElement("input") as HTMLInputElement;
             input.type = "checkbox";
-            input.className = "mdl-switch__input";
+            input.classList.add("mdl-switch__input");
+
             label.appendChild(input);
 
             span = document.createElement("span") as HTMLSpanElement;
-            span.className = "mdl-switch__label";
+            span.classList.add("mdl-switch__label");
 
             label.appendChild(span);
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0fe93b78/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
index cc53531..f5a5329 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
@@ -68,11 +68,13 @@ package org.apache.flex.mdl.beads
 
                 if (isValidElement && element.className.search("mdl-chip") > -1)
                 {
-                    host.className += " mdl-chip--deletable";
+                    element.classList.add("mdl-chip--deletable");
 
                     deleteButton = new Button();
                     deleteButton.icon = true;
-                    deleteButton.className += " mdl-chip__action";
+
+                    var htmlButton:HTMLElement = (deleteButton.element as HTMLElement)
+                    htmlButton.classList.add("mdl-chip__action");
 
                     element.appendChild(deleteButton.element as HTMLElement);
                 }


Mime
View raw message