flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [34/40] git commit: [flex-asjs] [refs/heads/feature/mdl] - Fix badges to conform to MDL
Date Sun, 06 Nov 2016 12:18:00 GMT
Fix badges to conform to MDL


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

Branch: refs/heads/feature/mdl
Commit: 5a5d97d2cc130793b654d2a3422f6fc7e89fc7c1
Parents: 37286bc
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Fri Nov 4 17:42:13 2016 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Sun Nov 6 13:15:38 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml     | 19 ++++++++++++++++---
 .../main/flex/org/apache/flex/mdl/beads/Badge.as |  6 +++---
 2 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5a5d97d2/examples/flexjs/MDLExample/src/main/flex/App.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/App.mxml b/examples/flexjs/MDLExample/src/main/flex/App.mxml
index 34aacb8..f0bae30 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -109,17 +109,30 @@ limitations under the License.
                 <mdl:Slider minimum="0" maximum="10" value="2" stepSize="2" width="200"/>
 
                 <js:VContainer>
-                    <js:A text="This is a Badge" href="http://flex.apache.org">
+                    <js:Div text="account_box" className="material-icons" style="color:
rgba(0, 0, 0, 0.24);">
                         <js:beads>
-                            <mdl:Badge dataBadge="5" overlap="true" noBackground="true"/>
+                            <mdl:Badge dataBadge="1" overlap="true"/>
+                        </js:beads>
+                    </js:Div>
+
+                    <js:Span text="Inbox" className="mdl-badge" style="color: rgba(0,
0, 0, 0.24);">
+                        <js:beads>
+                            <mdl:Badge dataBadge="4"/>
+                        </js:beads>
+                    </js:Span>
+
+                    <js:A text="Badge No Bg" href="http://flex.apache.org">
+                        <js:beads>
+                            <mdl:Badge dataBadge="5" noBackground="true"/>
                         </js:beads>
                     </js:A>
 
-                    <js:A id="badge1" text="Loving this." href="http://flex.apache.org">
+                    <js:A id="badge1" text="Badge Normal" href="http://flex.apache.org">
                         <js:beads>
                             <mdl:Badge dataBadge="1"/>
                         </js:beads>
                     </js:A>
+                    
                 </js:VContainer>
 
                 <mdl:Card width="512">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5a5d97d2/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 02fdfe6..66f5f8a 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
@@ -135,17 +135,17 @@ package org.apache.flex.mdl.beads
 				if (host.element is HTMLSpanElement)
 				{
 					var span:HTMLSpanElement = host.element as HTMLSpanElement;
-					span.className = "mdl-badge " + _noBackground + _overlap;
+					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.className += " mdl-badge " + _noBackground + _overlap;
 					div.setAttribute('data-badge', _dataBadge.toString());
 				} else if (host.element is HTMLElement)
 				{
 					var a:HTMLElement = host.element as HTMLElement;
-					a.className = "mdl-badge " + _noBackground + _overlap;
+					a.className += " mdl-badge " + _noBackground + _overlap;
 					a.setAttribute('data-badge', _dataBadge.toString());
 				} else
 				{


Mime
View raw message