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] - Fine tuning ContactChip - no background color, no text color
Date Sun, 04 Dec 2016 22:02:17 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop ff87745d7 -> da528c09f


Fine tuning ContactChip - no background color, no text color


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

Branch: refs/heads/develop
Commit: da528c09f3e584ced91c749ea25bdcea49a2b111
Parents: ff87745
Author: piotrz <piotrz@apache.org>
Authored: Sun Dec 4 23:02:08 2016 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Sun Dec 4 23:02:08 2016 +0100

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/mdl/ButtonChip.as | 36 ++++++++++++--------
 .../src/main/flex/org/apache/flex/mdl/Chip.as   | 36 ++++++++++++--------
 .../org/apache/flex/mdl/beads/ContactChip.as    |  3 +-
 .../org/apache/flex/mdl/beads/DeletableChip.as  |  2 +-
 4 files changed, 45 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da528c09/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 b426834..f462349 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
@@ -58,9 +58,25 @@ package org.apache.flex.mdl
         }
 
         private var chip:HTMLButtonElement;
-        private var chipTextSpan:HTMLSpanElement;
         private var textNode:Text;
 
+        private var _chipTextSpan:HTMLSpanElement;
+
+        public function get chipTextSpan():HTMLSpanElement
+        {
+            return _chipTextSpan;
+        }
+
+        public function get text():String
+        {
+            return textNode.nodeValue;
+        }
+
+        public function set text(value:String):void
+        {
+            textNode.nodeValue = value;
+        }
+
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          * @flexjsignorecoercion HTMLSpanElement
@@ -71,14 +87,14 @@ package org.apache.flex.mdl
         {
             typeNames = "mdl-chip";
 
-            chipTextSpan = document.createElement("span") as HTMLSpanElement;
-            chipTextSpan.classList.add("mdl-chip__text");
+            _chipTextSpan = document.createElement("span") as HTMLSpanElement;
+            _chipTextSpan.classList.add("mdl-chip__text");
 
             textNode = document.createTextNode('') as Text;
-            chipTextSpan.appendChild(textNode);
+            _chipTextSpan.appendChild(textNode);
 
             chip = document.createElement("button") as HTMLButtonElement;
-            chip.appendChild(chipTextSpan);
+            chip.appendChild(_chipTextSpan);
 
             element = chip as WrappedHTMLElement;
 
@@ -87,15 +103,5 @@ package org.apache.flex.mdl
 
             return element;
         }
-
-        public function get text():String
-        {
-            return textNode.nodeValue;
-        }
-
-        public function set text(value:String):void
-        {
-            textNode.nodeValue = value;
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da528c09/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 294b551..14e7557 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
@@ -58,9 +58,25 @@ package org.apache.flex.mdl
         }
 
         private var chip:HTMLSpanElement;
-        private var chipTextSpan:HTMLSpanElement;
         private var textNode:Text;
 
+        private var _chipTextSpan:HTMLSpanElement;
+
+        public function get chipTextSpan():HTMLSpanElement
+        {
+           return _chipTextSpan;
+        }
+
+        public function get text():String
+        {
+            return textNode.nodeValue;
+        }
+
+        public function set text(value:String):void
+        {
+            textNode.nodeValue = value;
+        }
+
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
          * @flexjsignorecoercion HTMLSpanElement
@@ -70,14 +86,14 @@ package org.apache.flex.mdl
         {
             typeNames = "mdl-chip";
 
-            chipTextSpan = document.createElement("span") as HTMLSpanElement;
-            chipTextSpan.classList.add("mdl-chip__text");
+            _chipTextSpan = document.createElement("span") as HTMLSpanElement;
+            _chipTextSpan.classList.add("mdl-chip__text");
 
             textNode = document.createTextNode('') as Text;
-            chipTextSpan.appendChild(textNode);
+            _chipTextSpan.appendChild(textNode);
 
             chip = document.createElement("span") as HTMLSpanElement;
-            chip.appendChild(chipTextSpan);
+            chip.appendChild(_chipTextSpan);
 
             element = chip as WrappedHTMLElement;
 
@@ -86,15 +102,5 @@ package org.apache.flex.mdl
 
             return element;
         }
-
-        public function get text():String
-        {
-            return textNode.nodeValue;
-        }
-
-        public function set text(value:String):void
-        {
-            textNode.nodeValue = value;
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da528c09/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ContactChip.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ContactChip.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ContactChip.as
index b119c51..f2dabb3 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ContactChip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ContactChip.as
@@ -97,9 +97,10 @@ package org.apache.flex.mdl.beads
                     
                     contact = document.createElement("span") as HTMLSpanElement;
                     contact.classList.add("mdl-chip__contact");
+
                     contact.appendChild(textNode);
 
-                    element.appendChild(contact);
+                    element.insertBefore(contact, host["chipTextSpan"]);
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/da528c09/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 e21a0d3..1799531 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
@@ -95,7 +95,7 @@ package org.apache.flex.mdl.beads
             var iconBead:IBead = StrandUtils.loadBead(MaterialIconBase, "MaterialIconBase",
_strand);
             if (iconBead == null)
             {
-                throw new Error("MaterialIconBase bead does not exists");
+                throw new Error("Missing material icon bead");
             }
 
             var delButton:Button = new Button();


Mime
View raw message