You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ca...@apache.org on 2016/11/04 22:49:02 UTC

[01/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Adding TeamPage example. [Forced Update!]

Repository: flex-asjs
Updated Branches:
  refs/heads/feature/mdl 1975a7e01 -> 53c4f9d44 (forced update)


Adding TeamPage example.


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

Branch: refs/heads/feature/mdl
Commit: 82a6f7cd5f02ac6f3e125cb0c86bf06c0c1cbd34
Parents: 5de45af
Author: Peter Ent <pe...@apache.org>
Authored: Fri Nov 4 16:04:25 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Fri Nov 4 16:04:25 2016 -0400

----------------------------------------------------------------------
 examples/build_example.xml                      |   1 +
 examples/flexjs/TeamPage/build.xml              |  61 +++
 .../TeamPage/src/MemberDataJSONItemConverter.as |  55 +++
 .../flexjs/TeamPage/src/MemberItemRenderer.mxml |  87 ++++
 examples/flexjs/TeamPage/src/MyInitialView.mxml |  76 +++
 .../TeamPage/src/NoSelectionController.as       |  38 ++
 examples/flexjs/TeamPage/src/TeamPage.mxml      |  52 ++
 .../flexjs/TeamPage/src/models/MemberList.as    |  64 +++
 examples/flexjs/TeamPage/src/models/Person.as   | 110 +++++
 examples/flexjs/TeamPage/src/team.json          | 485 +++++++++++++++++++
 10 files changed, 1029 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/build_example.xml
----------------------------------------------------------------------
diff --git a/examples/build_example.xml b/examples/build_example.xml
index 756b06c..87657ad 100644
--- a/examples/build_example.xml
+++ b/examples/build_example.xml
@@ -138,6 +138,7 @@
             <fileset dir="${basedir}/src">
                 <include name="**/*.png" />
                 <include name="**/*.jpg" />
+                <include name="**/*.json" />
             </fileset>
         </copy>
         <copy todir="${basedir}/bin-debug/fonts">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/build.xml b/examples/flexjs/TeamPage/build.xml
new file mode 100644
index 0000000..81f109c
--- /dev/null
+++ b/examples/flexjs/TeamPage/build.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="TeamPage" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../.."/>
+    <property name="example" value="TeamPage" />
+    
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    <property name="opt1_arg" value="-remove-circulars" />
+    
+    <include file="${basedir}/../../build_example.xml" />
+
+    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
+        <and>
+            <not>
+                <isset property="extlib_arg" />
+            </not>
+            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
+        </and>
+    </condition>
+    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
+        <and>
+            <not>
+                <isset property="extlib_arg" />
+            </not>
+            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
+        </and>
+    </condition>
+    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
+
+    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/MemberDataJSONItemConverter.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/MemberDataJSONItemConverter.as b/examples/flexjs/TeamPage/src/MemberDataJSONItemConverter.as
new file mode 100644
index 0000000..cafb4a9
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/MemberDataJSONItemConverter.as
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+    import models.Person;
+    
+    import org.apache.flex.collections.converters.JSONItemConverter;
+
+    public class MemberDataJSONItemConverter extends JSONItemConverter
+    {
+        public function MemberDataJSONItemConverter()
+        {
+            super();
+        }
+
+        override public function convertItem(data:String):Object
+        {
+            var obj:Object = super.convertItem(data);
+			var person:Person = new Person();
+			person.name = obj["name"];
+			person.title = obj["title"];
+			person.apacheID = obj["apacheID"];
+			person.bio = obj["bio"];
+			person.photoURL = "http://flex.apache.org/"+obj["photoURL"];
+			person.url = obj["url"];
+			
+			var social:Array = ["twitter","facebook","googleplus","linkedIn","github","wordpress","skype","rss","rss2","deviantart","blog"];
+			for (var i:int=0; i < social.length; i++) {
+				if (obj.hasOwnProperty(social[i])) {
+					var url:String = obj[social[i]];
+					if (url.length > 0) {
+						person.addToSocial(social[i], obj[social[i]]);
+					}
+				}
+			}
+			return person;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/MemberItemRenderer.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/MemberItemRenderer.mxml b/examples/flexjs/TeamPage/src/MemberItemRenderer.mxml
new file mode 100644
index 0000000..a3ab4a0
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/MemberItemRenderer.mxml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:MXMLItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:local="*"
+				xmlns:js="library://ns.apache.org/flexjs/basic">
+	
+	<fx:Script>
+		<![CDATA[
+			import models.Person;
+			
+			import org.apache.flex.events.MouseEvent;
+			import org.apache.flex.html.TextButton;
+			import org.apache.flex.utils.BrowserUtils;
+			
+			private var _member:Person;
+			
+			override public function set data(value:Object):void
+			{
+				super.data = value;
+				
+				_member = value as Person;
+				memberPhoto.url = _member.photoURL;
+				memberName.text = _member.name;
+				memberBio.text = _member.bio;
+				memberID.text = _member.apacheID;
+				
+				if (_member.title != null && _member.title.length > 0) {
+					memberName.text = _member.name+", "+_member.title;
+				}
+				
+				for (var type:String in _member.social) {
+					var button:TextButton = new TextButton();
+					button.text = type;
+					button.className = type;
+					button.addEventListener("click", gotoSocialMedia);
+					socialMedia.addElement(button);
+				}
+			}
+			
+			private function gotoSocialMedia(event:org.apache.flex.events.MouseEvent):void
+			{
+				var button:TextButton = event.target as TextButton;
+				var url:String = _member.social[button.text];
+				BrowserUtils.executeJS("window.open('"+url+"')");
+			}
+			
+		]]>
+	</fx:Script>
+	
+	<js:beads>
+		<js:OneFlexibleChildHorizontalLayout id="mylayout" flexibleChild="contentArea" />
+	</js:beads>
+	
+	<js:Image id="memberPhoto" width="128" height="128" />
+	<js:Spacer width="10" />
+	
+	<js:VContainer id="contentArea" height="100%" >
+		<js:style>
+			<js:SimpleCSSStyles verticalAlign="top" />
+		</js:style>
+		
+		<js:Label id="memberName" width="100%" className="MemberName" />
+		<js:Label id="memberID" width="100%" className="ApacheID" />
+		<js:Spacer height="10" />
+		<js:HContainer id="socialMedia" />
+		<js:Spacer height="10"/>
+		<js:MultilineLabel id="memberBio" width="100%"/>
+	</js:VContainer>
+	
+</js:MXMLItemRenderer>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/MyInitialView.mxml b/examples/flexjs/TeamPage/src/MyInitialView.mxml
new file mode 100644
index 0000000..47ac02b
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/MyInitialView.mxml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:local="*"
+				xmlns:js="library://ns.apache.org/flexjs/basic" 
+				>
+	
+	
+	
+	<fx:Style>
+		@namespace js  "library://ns.apache.org/flexjs/basic";
+		
+		.Repeater {
+			IViewport: ClassReference("org.apache.flex.html.supportClasses.Viewport");
+			border: none;
+			border-width: 0px;
+		}
+		
+		.Heading1 {
+			font-size: 18pt;
+			font-weight: bold;
+			margin-bottom: 20px;
+		}
+		
+		.ApacheID {
+			font-size: 10pt;
+			color: #999999;
+		}
+		
+		.MemberName {
+			font-size: 14pt;
+			font-weight: bold;
+			color: #333333;
+		}
+	</fx:Style>
+	
+	<js:beads>
+		<js:ViewDataBinding />
+	</js:beads>
+	
+	
+	<js:VContainer id="output" width="800" height="100%">
+		<js:Label text="FlexJS Team Page" className="Heading1" />
+		<js:Spacer height="20" />
+		
+		<!-- This list does not use selections, so it has a special controller. -->
+		<js:List width="800" height="500" itemRenderer="MemberItemRenderer" rowHeight="250" className="Repeater">
+			<js:beads>
+				<local:NoSelectionController />
+				<js:SimpleBinding destinationPropertyName="dataProvider" 
+								  sourceID="applicationModel" 
+								  sourcePropertyName="members" 
+								  eventName="membersChanged" />
+			</js:beads>
+		</js:List>
+	</js:VContainer>
+	
+	
+</js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/NoSelectionController.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/NoSelectionController.as b/examples/flexjs/TeamPage/src/NoSelectionController.as
new file mode 100644
index 0000000..0a8af0a
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/NoSelectionController.as
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+	import org.apache.flex.core.IBeadController;
+	import org.apache.flex.core.IStrand;
+
+	/**
+	 * This controller replaces the List's normal mouse controllers because this example
+	 * does not need to track the mouse and handle selections or roll-overs.
+	 */
+	public class NoSelectionController implements IBeadController
+	{
+		public function NoSelectionController()
+		{
+		}
+
+		public function set strand(value:IStrand):void
+		{
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/TeamPage.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/TeamPage.mxml b/examples/flexjs/TeamPage/src/TeamPage.mxml
new file mode 100644
index 0000000..5d8f861
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/TeamPage.mxml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!---
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:local="*"
+				xmlns:models="models.*"
+				xmlns:js="library://ns.apache.org/flexjs/basic" 
+				xmlns:controller="controller.*">
+	
+	<js:valuesImpl>
+		<js:SimpleCSSValuesImpl />
+	</js:valuesImpl>
+	
+	<js:model>
+		<models:MemberList />
+	</js:model>
+	
+	<js:initialView>
+		<local:MyInitialView width="100%" height="100%" />
+	</js:initialView>
+	
+	<js:beads>
+		<js:HTTPService id="service" url="team.json">
+			<js:LazyCollection id="collection">
+				<js:inputParser>
+					<js:JSONInputParser />
+				</js:inputParser>
+				<js:itemConverter>
+					<local:MemberDataJSONItemConverter />
+				</js:itemConverter> 
+			</js:LazyCollection>
+		</js:HTTPService>
+	</js:beads>
+	
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/models/MemberList.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/models/MemberList.as b/examples/flexjs/TeamPage/src/models/MemberList.as
new file mode 100644
index 0000000..28c7dae
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/models/MemberList.as
@@ -0,0 +1,64 @@
+package models
+{
+	import org.apache.flex.collections.LazyCollection;
+	import org.apache.flex.core.Application;
+	import org.apache.flex.core.IBeadModel;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.EventDispatcher;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.net.HTTPService;
+
+	[Event(name="membersChanged", type="org.apache.flex.events.Event")]
+	public class MemberList extends EventDispatcher implements IBeadModel
+	{
+		public function MemberList(target:IEventDispatcher=null)
+		{
+			super(target);
+		}
+
+		public var members:Array = null;
+
+		private var app:Application;
+		private var service:HTTPService;
+		private var collection:LazyCollection;
+
+		private var _strand:IStrand;
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+
+			app = value as Application;
+			if (app) {
+				app.addEventListener("viewChanged", viewChangeHandler);
+			}
+		}
+
+		private function viewChangeHandler(event:Event):void
+		{
+			service = app["service"] as HTTPService;
+			collection = app["collection"] as LazyCollection;
+
+			loadMembers();
+		}
+
+		public function loadMembers():void
+		{
+			service.url = "team.json";
+			service.send();
+			service.addEventListener("complete", handleLoadComplete);
+		}
+
+		public function handleLoadComplete(event:org.apache.flex.events.Event):void
+		{
+			members = [];
+			trace("We got something back");
+			trace("Collection: "+collection.length+" items");
+			for (var i:int=0; i < collection.length; i++) {
+				var item:Object = collection.getItemAt(i);
+				members.push(item);
+			}
+			dispatchEvent( new Event("membersChanged") );
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/models/Person.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/models/Person.as b/examples/flexjs/TeamPage/src/models/Person.as
new file mode 100644
index 0000000..3bb34ac
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/models/Person.as
@@ -0,0 +1,110 @@
+package models
+{
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.EventDispatcher;
+
+	public class Person extends EventDispatcher
+	{
+		private var _name:String;
+		private var _apacheID:String;
+		private var _title:String;
+		private var _bio:String;
+		private var _photoURL:String;
+		private var _url:String;
+		private var _social:Object;
+
+		public function Person()
+		{
+			super();
+			_social = {};
+		}
+
+		[Bindable("nameChanged")]
+		public function get name():String
+		{
+			return _name;
+		}
+		public function set name(value:String):void
+		{
+			if (value != _name) {
+				_name = value;
+				dispatchEvent(new Event("nameChanged"));
+			}
+		}
+
+		[Bindable("titleChanged")]
+		public function get title():String
+		{
+			return _title;
+		}
+		public function set title(value:String):void
+		{
+			if (value != _title) {
+				_title = value;
+				dispatchEvent(new Event("titleChanged"));
+			}
+		}
+
+		[Bindable("apacheIDChanged")]
+		public function get apacheID():String
+		{
+			return _apacheID;
+		}
+		public function set apacheID(value:String):void
+		{
+			if (value != _apacheID) {
+				_apacheID = value;
+				dispatchEvent(new Event("apacheIDChanged"));
+			}
+		}
+
+		[Bindable("bioChanged")]
+		public function get bio():String
+		{
+			return _bio;
+		}
+		public function set bio(value:String):void
+		{
+			if (_bio != value) {
+				_bio = value;
+				dispatchEvent(new Event("bioChanged"));
+			}
+		}
+
+		[Bindable("photoURLChanged")]
+		public function get photoURL():String
+		{
+			return _photoURL;
+		}
+		public function set photoURL(value:String):void
+		{
+			if (_photoURL != value) {
+				_photoURL = value;
+				dispatchEvent(new Event("photoURLChanged"));
+			}
+		}
+
+		[Bindable("urlChanged")]
+		public function get url():String
+		{
+			return _url;
+		}
+		public function set url(value:String):void
+		{
+			if (_url != value) {
+				_url = value;
+				dispatchEvent(new Event("urlChanged"));
+			}
+		}
+		
+		public function addToSocial(type:String, url:String):void
+		{
+			_social[type] = url;
+		}
+		
+		public function get social():Object
+		{
+			return _social;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/82a6f7cd/examples/flexjs/TeamPage/src/team.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/team.json b/examples/flexjs/TeamPage/src/team.json
new file mode 100644
index 0000000..e7c2c3d
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/team.json
@@ -0,0 +1,485 @@
+{ "template": {
+	"name": "put here name here",
+	"title": "put your apache.org title here or leave blank",
+	"photoURL": "put the url to your uploaded photo here",
+	"url": "not used at the moment but should point to a personal site",
+	"bio": "put your official Apache Flex bio here. If you use HTML, be sure to use single quote (apostrophes)",
+	"twitter": "put your URL here or leave blank",
+	"facebook": "put your URL here or leave blank",
+	"github": "put your URL here or leave blank",
+	"googleplus": "put your URL here or leave blank",
+	"rss": "put your URL here or leave blank",
+	"wordpress": "put your URL here or leave blank"
+  },
+
+  "members": [
+	{"name": "Alex Harui",
+     "title": "PMC Chair of Apache Flex",
+     "apacheID": "aharui (C+P)",
+	 "photoURL": "images/headshots/aharui.jpg",
+     "url": "http://www.apache.org/alex",
+     "bio": "Alex Harui has been working on the Flex SDK since he joined Macromedia in 2002. He is now spending most of his time on a next-generation of Flex called FlexJS that cross-compiles MXML and ActionScript into JavaScript so your Flex apps can run without Flash and AIR",
+     "twitter":"",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+	{"name": "Carlos Rovira",
+     "title": "",
+     "apacheID": "carlosrovira",
+	 "photoURL": "images/headshots/carlosrovira.jpg",
+     "url": "http://www.apache.org/carlos",
+     "bio": "Carlos Rovira is a technologist, entrepreneur and businessman. He is passionate about advanced web interfaces and rich multi-device business applications. He is extremely happy when their applications are useful for people, combining functionality and usability. He's founder of various companies including carlosrovira.com in 2007 and Codeoscopic in 2009. He's the technical leader behind the Riality Flex/JEE Platform and other successful insurance software products like Direct Writer and Avant 2",
+     "twitter":"http://www.twitter.com/carlosrovira",
+     "linkedIn":"http://es.linkedin.com/in/carlosrovira/",
+     "facebook":"",
+     "github":"http://www.github.com/carlosrovira",
+     "googleplus":"https://plus.google.com/115670167046758349523",
+     "rss":"http://www.carlosrovira.com/blog/feed/"
+    },
+    
+    {"name": "Carol Frampton",
+     "title": "",
+     "apacheID": "cframpton (C+P)",
+     "photoURL": "images/headshots/cframpton.jpg",
+     "bio": "Carol is a software engineer at Adobe, based outside of Boston.  She worked on Adobe Flex for about five years - FTE and TLF text with Gordon, Spark DataGrid, mirroring and the top bug fixer for the last couple of years - then transitioned with Flex to Apache. Release manager for Apache Flex 4.8.0.  Being a generalist, she's worked on a wide variety of software, including ColdFusion and JRun, kernel-level networking code and distributed networking software. ",
+     "twitter":"",
+     "linkedIn":"http://www.linkedin.com/in/carolframpton",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Chema Balsas",
+     "title": "",
+     "apacheID": "jbalsas (C)",
+     "photoURL": "images/headshots/jbalsas.jpg",
+     "bio": "Web application developer. Focusing on JS right now and trying to help with Falcon and FalconJS as an Apache Flex Commiter.",
+     "twitter":"http://www.twitter.com/jbalsas",
+     "linkedIn":"http://www.linkedin.com/in/jbalsas",
+     "facebook":"",
+     "github":"http://www.github.com/jbalsas",
+     "googleplus":"https://plus.google.com/109872083963647761639",
+     "rss":""
+    },
+    
+    {"name": "Christofer Dutz",
+     "title": "",
+     "apacheID": "cdutz (C+P)",
+     "photoURL": "images/headshots/cdutz.jpg",
+     "bio": "Christofer is a software engineer secialized on Flex, Java, Spring and Maven. He is the lead developer of the <a href='https://flexmojos.atlassian.net/wiki/display/FLEXMOJOS/Home' target='_blank'>Flexmojos</a> project (Maven plugin for building Flex applications) after taking over from Velo in 2012. His main areas of contribution to the Apache Flex project is creating a tool for creating Mavenized versions of Flex SDKs, continuing to advance Flex' Maven support.",
+     "twitter":"http://de.twitter.com/ChristoferDutz",
+     "linkedIn":"http://www.linkedin.com/pub/christofer-dutz/49/9b6/424",
+     "facebook":"",
+     "github":"http://github.com/chrisdutz",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Chris Martin",
+     "title": "",
+     "apacheID": "chrsmrtn (C+P)",
+     "photoURL": "images/headshots/chrsmrtn.jpg",
+     "bio": "Chris has been doing Flex UI development since Flex 2 and is very excited to be apart of the Apache Flex Team. With the Apache Flex Team, he feels that the Flex SDK has a bright future. He looks to help with the flex sdk bug verification and patching.",
+     "twitter":"http://www.twitter.com/chrsmrtn",
+     "linkedIn":"http://es.linkedin.com/in/chrsmrtn/",
+     "facebook":"",
+     "github":"http://www.github.com/chrsmrtn-",
+     "googleplus":"https://plus.google.com/+chrismartinplus",
+     "wordpress":"http://chrsmrtn.azurewebsites.net",
+     "rss":""
+    },
+    
+    {"name": "DarkStone (\u5468\u6208)",
+     "title": "",
+     "apacheID": "darkstone (C)",
+     "photoURL": "images/headshots/darkstone.png",
+     "bio": "DarkStone has been doing Flash since 2002, doing Flex since 2006, doing PHP since 2007, he is both a designer and a developer.<br/><br/>He had several jobs, last job he was a product manager for 3 years, had done several RIA  products. <p>Since 2013 he quit his job and started his own studio, forging his own path.<br/><br/>Now he's goal is to develop mobile and desktop platform apps (using Flex and PHP etc.) and sell them to the AppStore.<br/><br/>Basically, make the money first, and try to change the world later ; )</p><p>He is now living in Wuhan city of China.",
+     "twitter":"",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Douglas Arthur",
+     "title": "",
+     "apacheID": "dougarthur (C+P)",
+     "photoURL": "images/headshots/dougarthur.jpg",
+     "bio": "Douglas passed away in May, 2012.  He is deeply missed within our community.",
+     "twitter":"",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Erik de Bruin",
+     "title": "",
+     "apacheID": "erikdebruin (C+P)",
+     "photoURL": "images/headshots/erikdebruin.jpg",
+     "bio": "Erik is a software engineer (Flex/Flash, PHP, Delphi, Authorware, to name a few), e-learning consultant and occassional project manager. For the Apache Flex project he is a committer and part of the PMC. He has contributed the SDK Installer Badge, was contributor and co-release manager on the first release of the SDK Installer and is currently busy getting the FalconJx and FlexJS projects off the ground.",
+     "twitter":"",
+     "linkedIn":"http://www.linkedin.com/pub/erik-de-bruin/1/281/176",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Espen Skogen",
+     "title": "",
+     "apacheID": "espenskogen (C+P)",
+     "photoURL": "images/headshots/espenskogen.jpg",
+     "bio": "Espen is a Vice President at JP Morgan, where he is leading the development of client facing trading technology. Espen was one of the initial committers and PMC members of Apache Flex. ",
+     "twitter":"",
+     "linkedIn":"http://uk.linkedin.com/in/espenskogen",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Fr�d�ric Thomas",
+     "title": "",
+     "apacheID": "fthomas (C+P)",
+     "photoURL": "images/headshots/fthomas.jpg",
+     "bio": "Freelancer, software architect, Apache Flex PMC Member, trying to make the Flex world better.<br>(French)",
+     "twitter":"http://www.twitter.com/webdoublefx",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"https://plus.google.com/116545614452242070442/posts",
+     "rss":""
+    },
+    
+    {"name": "Gordon Smith",
+     "title": "",
+     "apacheID": "gordonsmith (C+P)",
+     "photoURL": "images/headshots/gordonsmith.png",
+     "bio": "Gordon is currently working on completing MXML support in the new Falcon compiler. He lives in San Francisco and works for Adobe.</p><p>Gordon was one of the original four engineers on a 2002 Macromedia project that became Flex, and worked on the Flex framework for eight years:<ul><li>Developed components for Flex 1.0.</li><li>Built a customer application with Flex 1.5.</li><li>Led the port to AS3 for Flex 2.</li><li>Designed and implemented the ResourceManager for Flex 3.</li><li>Integrated the FTE and TLF text technologies into Flex 4.</li></ul></p><p>Since 2010 he has been part of the compiler team at Adobe.</p>",
+     "twitter":"",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Harbs",
+     "title": "",
+     "apacheID": "harbs (C+P)",
+     "photoURL": "images/headshots/harbs.jpg",
+     "bio": "Harbs comes from a print background and his primary interest is in publishing. He keeps himself busy with his multiple technology businesses: <a href='http://in-tools.com'>In-Tools</a>, <a href='http://printui.com'>PrintUI</a> and <a href='http://unhurdle.com/'>UnHurdle</a>.  All three businesses rely heavily on Flex as one of the active technologies, so Harbs has a strong interest in Flex.<br/><br/>Harbs also spends his time studying Talmud, and with his wife and kids. If there's any time left, he gets a bit of sleep.",
+     "twitter":"http://www.twitter.com/intools",
+     "linkedIn":"http://www.linkedin.com/profile/view?id=46698545",
+     "facebook":"http://www.facebook.com/gharbs",
+     "github":"https://github.com/Harbs",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Jeffry Houser",
+     "title": "",
+     "apacheID": "jhouser (C+P)",
+     "photoURL": "images/headshots/jhouser.jpg",
+     "bio": "<a href='http://www.jeffryhouser.com'>Jeffry Houser</a> is a technical entrepreneur that likes to share cool stuff with other people. Jeffry is the Brains behind <a href='http://www.flextras.com'>Flextras</a>, a library of Open Source Flex Components including a Calendar, AutoComplete, and a Mobile DropDownList.<br/><br/> Jeffry is one of the initial contributors to Apache Flex and his primary interest lies in expanding the component library, especially for use in mobile applications.<br/><br/>In his spare time, Jeffry runs <a href='http://www.dot-com-it.com.'>DotComIt</a>, a consulting firm developing Rich Internet Applications. He has spoken all over the US, is author of three books, over 30 articles, and hundreds of podcasts.",
+     "twitter":"http://www.twitter.com/reboog711",
+     "linkedIn":"http://www.linkedin.com/in/jeffryhouser",
+     "facebook":"http://www.facebook.com/reboog711",
+     "github":"https://github.com/Flextras/FlextrasComponents/",
+     "googleplus":"",
+     "rss":"http://www.jeffryhouser.com/rss.cfm?mode=full",
+     "rss2":"https://www.flextras.com/blog/rss.cfm?mode=full"
+    },
+    
+    {"name": "Jeremy Tellier",
+     "title": "",
+     "apacheID": "jtellier (C+P)",
+     "photoURL": "images/headshots/jtellier.jpg",
+     "bio": "Macromedia/Adobe Technology evangelist, architect, engineer, Jeremy has implemented a slew of Flash, Flex, & AIR based solutions for startups to fortune 100 companies over the past 15 years.<br/><br/>Jeremy works as a consultant at <a href='http://www.actieve.com' target='_blank'>Actieve</a> for Rich Mobile, Desktop & Web Based projects in which Flex is at the top of his preferred technology stack.<br/><br/>On a more personal note.... Jeremy feels awkward writing about himself in the third person.",
+     "twitter":"http://www.twitter.com/jtellier",
+     "linkedIn":"http://www.linkedin.com/in/jeremytellier/",
+     "facebook":"http://www.facebook.com/JeremyTellier",
+     "github":"",
+     "googleplus":"https://plus.google.com/115560858703396246574",
+     "rss":"",
+     "skype":"skype:JeremyTellier?chat"
+    },
+    
+    {"name": "Jose Barragan",
+     "title": "",
+     "apacheID": "josebarragan (C)",
+     "photoURL": "images/headshots/josebarragan.jpg",
+     "bio": "Jose Barragan is a Software Architect, with over 10 years experience in the enterprise sector. Has a big experience in design, development and implementation of high performance software in corporate environments. Has an extensive knowledge of Flex, Java, Spring, Hibernate, Maven, Git, being the technical co-leader behind the <a href='http://www.codeoscopic.com/tecnologia/riality/'>Riality</a> Flex/JEE Platform and other successful insurance software products like <a href='http://www.directwriter.es'>Direct Writer</a> and <a href='http://www.avant2.es'>Avant 2</a>. Restless mind and enthusiast of new technologies. Always learning from everything and everyone.",
+     "twitter":"http://www.twitter.com/morphx",
+     "linkedIn":"http://es.linkedin.com/in/pepebarragan/",
+     "facebook":"",
+     "github":"http://github.com/pepebarragan",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Joseph Labrecque",
+     "title": "",
+     "apacheID": "josephlabrecque (C)",
+     "photoURL": "images/headshots/josephlabrecque.jpg",
+     "bio": "Joseph Labrecque is primarily employed by the University of Denver as a senior interactive software engineer specializing in the creation of expressive desktop, web, and mobile solutions. He is also the proprietor of Fractured Vision Media, LLC. Joseph is an Adobe Education Leader and Adobe Community Professional.",
+     "twitter":"http://twitter.com/josephlabrecque",
+     "linkedIn":"http://www.linkedin.com/in/josephlabrecque",
+     "facebook":"https://www.facebook.com/joseph.labrecque",
+     "github":"https://github.com/josephlabrecque/",
+     "googleplus":"https://google.com/+JosephLabrecque/",
+     "rss":"http://www.lynda.com/JosephLabrecque",
+     "rss2":"http://inflagrantedelicto.memoryspiral.com/feed/",
+     "amazon":"http://www.amazon.com/-/e/B0057R7UO0",
+     "behance":"https://www.behance.net/JosephLabrecque",
+     "youtube":"https://www.youtube.com/channel/UCOznZ0dg3BwfhxwO2p90ejQ"
+    },
+    
+    {"name": "Josh Tynjala",
+     "title": "",
+     "apacheID": "joshtynjala (C+P)",
+     "photoURL": "images/headshots/joshtynjala.jpg",
+     "bio": "Josh Tynjala is the author of the open source <a href='http://feathersui.com/'>Feathers</a> user interface components for Starling Framework. In addition to improving the Apache FlexJS compilers, Josh teaches developers how to transpile ActionScript on his website, <a href='http://nextgenactionscript.com/'>NextGen ActionScript</a>",
+     "twitter":"https://twitter.com/joshtynjala",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"https://github.com/joshtynjala",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Jun Heider",
+     "title": "",
+     "apacheID": "junheider (C+P)",
+     "photoURL": "images/headshots/junheider.jpg",
+     "bio": "Helping Apache Flex grow through mentoring and community awareness. An officer of the Open Spoon Foundation. Cross-platform Flex mobile developer at RealEyes Media with a focus in video and multiuser applications. Adjunct Faculty at University of Denver, University College teaching students how to build native applications with Adobe AIR.",
+     "twitter":"http://twitter.com/coderjun",
+     "linkedIn":"http://www.linkedin.com/in/junheider",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Justin Mclean",
+     "title": "",
+     "apacheID": "jmclean (C+P)",
+     "photoURL": "images/headshots/jmclean.jpg",
+     "bio": "Experienced web application developer, certified trainer, international conference speaker and Arduino tinkerer. Interesting in making Apache Flex more international and work on a wider range of platforms. Added international postcode support and locales to Apache Flex 4.9.0. Release manager for Apache Flex 4.9.0.",
+     "twitter":"http://twitter.com/JustinMclean",
+     "linkedIn":"http://www.linkedin.com/in/justinmclean",
+     "facebook":"",
+     "github":"http://www.github.com/justinmclean",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Mahmoud Ali",
+     "title": "",
+     "apacheID": "akamud (C)",
+     "photoURL": "images/headshots/akamud.jpg",
+     "bio": ".NET and Apache Flex developer, working on Web and mobile applications. One of the creators of the <a href='https://github.com/akamud/FlatSpark'>FlatSpark</a> skin, a project to bring a more clean and modern look to Apache Flex applications, recently donated to Apache Software Foundation. His goal as a committer is to continue improving and creating new Skins and components for Flex.</p <p>Always interested in learning and sharing about new technologies. In his spare time wanders around the internet looking for open source projects that need help.<br/><br/>Also feels weird describing himself in the third person.</p>",
+     "twitter":"http://twitter.com/akamud",
+     "linkedIn":"http://www.linkedin.com/in/akamud/en",
+     "facebook":"",
+     "github":"https://github.com/akamud",
+     "googleplus":"",
+     "rss":"http://www.akamud.com.br/feed",
+     "wordpress":"http://www.akamud.com.br/"
+    },
+    
+    {"name": "Maurice Amsellem",
+     "title": "",
+     "apacheID": "mamsellem (C+P)",
+     "photoURL": "images/headshots/mamsellem.jpg",
+     "bio": "<p>Maurice has been working for <a href='http://www.systar.com'>Systar</a> since 1996 in various positions, and since 2009 as a software engineer on a Flex-based BAM application development framework.</p><p>Maurice is professionally interested in GUI design in general, and personally in clay modeling.<br/>He is based in Paris area, France.</p>",
+     "twitter":"",
+     "linkedIn":"http://www.linkedin.com/pub/maurice-amsellem/1/50a/b64",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Michael Schmalle",
+     "title": "",
+     "apacheID": "mschmalle (C+P)",
+     "photoURL": "images/headshots/mschmalle.jpg",
+     "bio": "<p>Past; ActionScript since 2001 and ui component developer. Created a read/write DOM for ActionScript in AS3 and Java, familiar with parsers and compilers.<br/><br/>Future; Working creating a framework to make synths and sequencers for techno music in Android and also Unity3D, WebAudio and JavaScript.<br/><br/>Leading the development of FalconJx to finally put the last nail in the Flash Player for myself. I don't claim to be anything I'm not, the third person scares me.</p>",
+     "twitter":"http://www.twitter.com/teotigraphix",
+     "linkedIn":"http://www.linkedin.com/pub/michael-schmalle/4/409/980",
+     "facebook":"",
+     "github":"https://github.com/teotigraphix",
+     "googleplus":"",
+     "rss":"http://blog.teotigraphix.com/feed"
+    },
+    
+    {"name": "Nicholas Kwiatkowski",
+     "title": "",
+     "apacheID": "quetwo (C+P)",
+     "photoURL": "images/headshots/quetwo.jpg",
+     "bio": "Working on components, website, marketing.",
+     "twitter":"http://www.twitter.com/quetwo",
+     "linkedIn":"",
+     "facebook":"http://www.facebook.com/quetwo",
+     "github":"",
+     "googleplus":"https://plus.google.com/106376488955804514674/",
+     "rss":"",
+     "blog":"http://www.quetwo.com",
+     "deviantart":"http://quetwo.deviantart.com"
+    },
+    
+    {"name": "Omar Gonzalez",
+     "title": "",
+     "apacheID": "s9tpepper (C+P)",
+     "photoURL": "images/headshots/s9tpepper.jpg",
+     "bio": "<p>Apache Flex committer and PMC member. Test driven development enthusiast. Wrestles code all day. Developing Flash since 2000, Flex since version 2 beta. Senior Architect for <a href='http://almerblank.com' target='_blank'>almer/blank</a> developing front-ends and back-ends in HTML5, JavaScript, Flash, Flex, Node.js, PHP, MySQL and MongoDB, just to name a few. Interested in expanding Apache Flex beyond the Flash Player plugin as well as other random experiments.</p>",
+     "twitter":"http://www.twitter.com/s9tpepper",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"https://github.com/s9tpepper",
+     "googleplus":"https://plus.google.com/109288512951904372418",
+     "rss":"http://omar.gy/rss"
+    },
+    
+    {"name": "OmPrakash Muppirala",
+     "title": "",
+     "apacheID": " bigosmallm (C + P)",
+     "photoURL": "images/headshots/bigosmallm.jpg",
+     "bio": "<p>Om 'bigosmallm' Muppirala is a UI architect with years of experience building Flex and Flash based applications. He has been working on various tools and utilities aimed at making life easier for Apache Flex developers and users(SDK Installer, OneClick Mustella, etc.)  Also interested in contributing more web and mobile Flex components.</p>",
+     "twitter":"http://twitter.com/bigosmallm",
+     "linkedIn":"http://www.linkedin.com/in/omprakashm/",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Peter Elst",
+     "title": "",
+     "apacheID": "peterelst (C + P)",
+     "photoURL": "images/headshots/peterelst.jpg",
+     "bio": "<p>Peter is a Web Solutions Engineer at Google, an author of multiple ActionScript books, speaker at various industry events and longtime supporter of Flex as a platform.</p><p>In his spare time, you can find him blogging at <a href='http://www.peterelst.com'>www.peterelst.com</a>.</p>",
+     "twitter":"http://www.twitter.com/peterelst",
+     "linkedIn":"http://www.linkedin.com/in/peterelst",
+     "facebook":"",
+     "github":"",
+     "googleplus":"https://www.google.com/+peterelst",
+     "rss":""
+    },
+    
+    {"name": "Piotr Zarzycki",
+     "title": "",
+     "apacheID": "piotrz (C + P)",
+     "photoURL": "images/headshots/piotrz.jpg",
+     "bio": "<p>Piotr has been working with Flex since 2008 in various project. He always stays open for self-development opportunity.</p><p>He currently lives in Cracow, Poland.</p>",
+     "twitter":"",
+     "linkedIn":"http://pl.linkedin.com/pub/piotr-zarzycki/52/535/92a/",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":"",
+     "skype":"skype:zarzycki10?call"
+    },
+    
+    {"name": "Stephan Plath",
+     "title": "",
+     "apacheID": "splath (C)",
+     "photoURL": "images/headshots/splath.jpg",
+     "bio": "",
+     "twitter":"http://www.twitter.com/xplath",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Tom Chiverton",
+     "title": "",
+     "apacheID": "tomc (P+C)",
+     "photoURL": "images/headshots/tomc.jpg",
+     "bio": "<p>Tom has been building internet applications since before the term RIA, and was part of the community contributing to Flex while it was looked after by Adobe.</p><p>Within Apache Flex his focus is on making sure the experience on Linux is on par with the other supported platforms, as well as pitching in keeping the Jenkins servers running.</p><p>He currently lives in Manchester, UK.</p>",
+     "twitter":"http://www.twitter.com/thefalken",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Maxim Solodovnik",
+     "title": "",
+     "apacheID": "solomax (C)",
+     "photoURL": "images/headshots/solomax.jpg",
+     "bio": "<p>Maxim developing desktop and mobile applications working with video components.</p><p>The main contribution so far was Russian translation of various Flex components</p><p>He currently lives in Novosibirsk, Russia.</p>",
+     "twitter":"http://www.twitter.com/solomax666",
+     "linkedIn":"https://www.linkedin.com/in/maximsolodovnik",
+     "facebook":"",
+     "github":"https://github.com/solomax",
+     "googleplus":"https://www.google.com/+MaximSolodovnik",
+     "rss":""
+    },
+    
+    {"name": "Olaf Krueger",
+     "title": "",
+     "apacheID": "okrueger (C)",
+     "photoURL": "images/headshots/okrueger.png",
+     "bio": "<p>Olaf believes in the power and beauty of simplicity in all respects.</p><p>Employed at a leading automotive supplier for hinge systems he creates software for internal use. For many years and still with great passion.</p><p>Olaf would like to help to bring the Material Design to Flex/FlexJS</p>",
+     "twitter":"http://www.twitter.com/openoli",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Bertrand Delacretaz",
+     "title": "Project Mentor",
+     "apacheID": "bdelacretaz (C+P)",
+     "photoURL": "images/headshots/bdelacretaz.jpg",
+     "bio": "<p>I'm happy to have been able to help Flex incubate at Apache, the team did a great job in creating a successful Apache project. I left the PMC on graduation to free some time for other podlings, wishing Flex a bright future!</p>",
+     "twitter":"",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Dave Fisher ",
+     "title": "Project Mentor",
+     "apacheID": "wave (C+P)",
+     "photoURL": "images/headshots/davefisher.jpg",
+     "bio": "<p>I'm fascinated by the communities that develop around projects at Apache I really enjoy the spirit here in the Apache Flex project. I am particularly interested in documents and am on the Apache POI and OpenOffice PMCs. Apache Flex for office documents anyone?</p><p>I live in San Francisco where the weather is mild.</p>",
+     "twitter":"",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    },
+    
+    {"name": "Greg Reddin",
+     "title": "Project Mentor",
+     "apacheID": "greddin (C+P)",
+     "photoURL": "images/staff-1.jpg",
+     "bio": "",
+     "twitter":"",
+     "linkedIn":"",
+     "facebook":"",
+     "github":"",
+     "googleplus":"",
+     "rss":""
+    }
+]
+  
+}
\ No newline at end of file


[14/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Use of mdl:TextInput

Posted by ca...@apache.org.
Use of mdl:TextInput


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

Branch: refs/heads/feature/mdl
Commit: bd9ca048e06b632fb84a1fc77ce945b9628bfad9
Parents: 44773cf
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 13:40:57 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/App.mxml | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bd9ca048/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 b94a0d7..937d8d2 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -53,6 +53,8 @@ limitations under the License.
 
                 <mdl:Button/>
 
+                <mdl:TextInput/>
+
             </js:Container>
 
             <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->


[18/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - CheckBox and RadioButton examples

Posted by ca...@apache.org.
CheckBox and RadioButton examples


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

Branch: refs/heads/feature/mdl
Commit: 3b70dd091491be75b973eb850ead27807612c7bb
Parents: f126b1c
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 17:59:17 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/App.mxml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3b70dd09/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 242df22..209efae 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -63,9 +63,11 @@ limitations under the License.
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
                 <mdl:TextInput id="mdlti" text="Something..." change="mdlchk.text = mdlti.text"/>
 
-                <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
+                <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
                 <mdl:CheckBox id="mdlchk" text="Hello" selected="true"/>
                 
+                <mdl:RadioButton groupName="g1" text="Black"/>
+                <mdl:RadioButton groupName="g1" text="White"/>
             </js:Form>
             
         </js:View>


[31/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Refactor Badge

Posted by ca...@apache.org.
Refactor Badge


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

Branch: refs/heads/feature/mdl
Commit: 258d1ec5ea0e250b0d26a59650329bac8177ab48
Parents: 0e73a69
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Nov 4 12:14:52 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  16 +-
 .../src/main/flex/org/apache/flex/mdl/Badge.as  | 233 -------------------
 .../src/main/flex/org/apache/flex/mdl/Link.as   | 137 +++++++++++
 .../flex/org/apache/flex/mdl/beads/Badge.as     | 157 +++++++++++++
 .../org/apache/flex/mdl/beads/BadgeEffect.as    | 121 ----------
 .../flex/org/apache/flex/mdl/beads/Disabled.as  |   2 +-
 .../src/main/resources/mdl-manifest.xml         |   4 +-
 7 files changed, 307 insertions(+), 363 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258d1ec5/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 111deed..abece5f 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -109,13 +109,17 @@ limitations under the License.
                 <mdl:Slider minimum="0" maximum="10" value="2" stepSize="2" width="200"/>
 
                 <js:VContainer>
-                    <mdl:Badge text="This is a Badge" dataBadge="5" linkUrl="http://flex.apache.org">
+                    <mdl:Link text="This is a Badge" linkUrl="http://flex.apache.org">
                         <js:beads>
-                            <mdl:BadgeEffect overlap="true" noBackground="true"/>
+                            <mdl:Badge dataBadge="5" overlap="true" noBackground="true"/>
                         </js:beads>
-                    </mdl:Badge>
+                    </mdl:Link>
 
-                    <mdl:Badge id="badge1" text="Loving this." dataBadge="1" linkUrl="http://flex.apache.org"/>
+                    <mdl:Link id="badge1" text="Loving this." linkUrl="http://flex.apache.org">
+                        <js:beads>
+                            <mdl:Badge dataBadge="1"/>
+                        </js:beads>
+                    </mdl:Link>
                 </js:VContainer>
 
                 <mdl:Card width="512">
@@ -129,7 +133,7 @@ limitations under the License.
                         <js:Image url="../../../../src/main/resources/Unknown.jpg"  height="176"/>
                     </mdl:CardMedia>
                     <mdl:CardSupportingText>
-                        <js:MultilineLabel text="This text might describe the photo and provide further information, such as where and when it was taken."/>
+                        <js:MultilineLabel text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sagittis pellentesque lacus eleifend lacinia..."/>
                     </mdl:CardSupportingText>
                     <mdl:CardActions>
                         <js:beads>
@@ -137,7 +141,7 @@ limitations under the License.
                         </js:beads>
                         <mdl:Button text="Get Started">
                             <js:beads>
-                                <mdl:ButtonEffect raised="true" colored="false"/>
+                                <mdl:ButtonEffect ripple="true" colored="true"/>
                             </js:beads>
                         </mdl:Button>
                     </mdl:CardActions>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258d1ec5/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as
deleted file mode 100644
index fa4ffd1..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as
+++ /dev/null
@@ -1,233 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mdl
-{
-	import org.apache.flex.core.UIBase;
-
-    COMPILE::JS
-    {
-        import org.apache.flex.core.WrappedHTMLElement;            
-    }
-
-	/**
-	 *  The Badge class provides a MDL UI-like appearance for a badge.
-	 *  A Badge is an onscreen notification element consists of a small circle, 
-     *  typically containing a number or other characters, that appears in 
-     *  proximity to another object
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class Badge extends UIBase
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function Badge()
-		{
-			super();
-		}
-		
-        private var _type:Number = 0;
-        public static const LINK_TYPE:Number = 0;
-        public static const TEXT_TYPE:Number = 1;
-        public static const CONTAINER_TYPE:Number = 2;
-
-        /**
-         *  the type of badge
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get type():Number
-		{
-            return _type;   
-		}
-
-		public function set type(value:Number):void
-		{
-            _type = value;
-            
-            COMPILE::JS
-            {
-                if(value == LINK_TYPE)
-                {
-                    var link:HTMLElement = document.createElement('a') as HTMLElement;
-                    link.setAttribute('href', linkUrl);
-                    link.setAttribute('data-badge', dataBadge);
-                    link.appendChild(textNode);
-                    link.className = 'mdl-badge';
-                    
-                    element.parentNode.replaceChild(link, element);
-
-
-                    element = link as WrappedHTMLElement;
-                } 
-                else if(value == TEXT_TYPE)
-                {  
-                    var span:HTMLSpanElement = document.createElement('span') as HTMLSpanElement;
-                    span.setAttribute('data-badge', dataBadge);
-                    span.appendChild(textNode); 
-                    span.className = 'mdl-badge';
-
-                    element.parentNode.replaceChild(span, element);
-                    
-                    element = span as WrappedHTMLElement;
-                } 
-                else if(value == CONTAINER_TYPE)
-                {
-                    var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
-                    div.setAttribute('data-badge', dataBadge);
-                    div.appendChild(textNode); 
-                    div.className = 'mdl-badge material-icons';
-
-                    element.parentNode.replaceChild(div, element);
-                    
-                    element = div as WrappedHTMLElement;
-                }
-                
-                positioner = element;
-                positioner.style.position = 'relative';
-                element.flexjs_wrapper = this;
-                
-            }
-		}
-
-        private var _text:String = "";
-
-        /**
-         *  The text of the link
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get text():String
-		{
-            COMPILE::SWF
-            {
-                return _text;
-            }
-            COMPILE::JS
-            {
-                return textNode.nodeValue;
-            }
-		}
-
-		public function set text(value:String):void
-		{
-            COMPILE::SWF
-            {
-                _text = value;
-            }
-            COMPILE::JS
-            {
-                textNode.nodeValue = value;
-            }
-		}
-        
-        private var _linkUrl:String = "#";
-
-        /**
-         *  the link url
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get linkUrl():String
-		{
-            return _linkUrl;   
-		}
-
-		public function set linkUrl(value:String):void
-		{
-            _linkUrl = value;
-            
-            COMPILE::JS
-            {
-                (element as HTMLElement).setAttribute('href', value);
-            }
-		}
-
-
-        private var _dataBadge:Number = 0;
-
-		/**
-		 *  The current value of the Badge that appers inside the circle.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function get dataBadge():Number
-		{
-			return _dataBadge;
-		}
-		public function set dataBadge(value:Number):void
-		{
-			_dataBadge = value;
-
-			COMPILE::JS
-			{
-				(element as HTMLElement).setAttribute('data-badge', _dataBadge.toString());
-			}
-		}
-		
-        COMPILE::JS
-        private var textNode:Text;
-		
-        /**
-         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-		 * @flexjsignorecoercion HTMLElement
-         */
-        COMPILE::JS
-        override protected function createElement():WrappedHTMLElement
-        {
-			var a:HTMLElement = document.createElement('a') as HTMLElement;
-            a.setAttribute('href', linkUrl);
-            a.setAttribute('data-badge', dataBadge);
-
-            textNode = document.createTextNode('') as Text;
-            a.appendChild(textNode); 
-
-			element = a as WrappedHTMLElement;
-            
-            positioner = element;
-            positioner.style.position = 'relative';
-			element.flexjs_wrapper = this;
-            
-            className = typeNames = 'mdl-badge';
-
-            return element;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258d1ec5/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as
new file mode 100644
index 0000000..b74f7cc
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as
@@ -0,0 +1,137 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.UIBase;
+
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+
+	/**
+	 *  The Link class 
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Link extends UIBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Link()
+		{
+			super();
+		}
+		
+        private var _text:String = "";
+
+        /**
+         *  The text of the link
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get text():String
+		{
+            COMPILE::SWF
+            {
+                return _text;
+            }
+            COMPILE::JS
+            {
+                return textNode.nodeValue;
+            }
+		}
+
+		public function set text(value:String):void
+		{
+            COMPILE::SWF
+            {
+                _text = value;
+            }
+            COMPILE::JS
+            {
+                textNode.nodeValue = value;
+            }
+		}
+        
+        private var _linkUrl:String = "#";
+
+        /**
+         *  the link url
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get linkUrl():String
+		{
+            return _linkUrl;   
+		}
+
+		public function set linkUrl(value:String):void
+		{
+            _linkUrl = value;
+            
+            COMPILE::JS
+            {
+                (element as HTMLElement).setAttribute('href', value);
+            }
+		}
+		
+        COMPILE::JS
+        private var textNode:Text;
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 * @flexjsignorecoercion HTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+			var a:HTMLElement = document.createElement('a') as HTMLElement;
+            a.setAttribute('href', linkUrl);
+            
+            textNode = document.createTextNode('') as Text;
+            a.appendChild(textNode); 
+
+			element = a as WrappedHTMLElement;
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+			element.flexjs_wrapper = this;
+            
+            //className = typeNames = 'Link';
+
+            return element;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258d1ec5/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
new file mode 100644
index 0000000..02fdfe6
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Badge.as
@@ -0,0 +1,157 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IBead;
+	import org.apache.flex.core.UIBase;
+	
+	
+	/**
+	 *  The Badge class provides a MDL UI-like appearance for a badge.
+	 *  A Badge is an onscreen notification element consists of a small circle, 
+     *  typically containing a number or other characters, that appears in 
+     *  proximity to another object
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Badge implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Badge()
+		{
+		}
+
+		private var _dataBadge:Number = 0;
+
+		/**
+		 *  The current value of the Badge that appers inside the circle.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get dataBadge():Number
+		{
+			return _dataBadge;
+		}
+		public function set dataBadge(value:Number):void
+		{
+			_dataBadge = value;
+		}
+
+		private var _noBackground:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-badge--no-background" effect selector.
+		 *  Applies open-circle effect to badge
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get noBackground():Boolean
+        {
+            return _noBackground;
+        }
+        public function set noBackground(value:Boolean):void
+        {
+            if(value) {
+                _noBackground = " mdl-badge--no-background";
+            } else {
+                _noBackground = "";
+            }   
+        }
+
+        private var _overlap:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-badge--overlap" effect selector.
+		 *  Make the badge overlap with its container
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get overlap():Boolean
+        {
+            return _overlap;
+        }
+        public function set overlap(value:Boolean):void
+        {
+            if(value) {
+                _overlap = " mdl-badge--overlap";
+            } else {
+                _overlap = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+				var host:UIBase = 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)
+				{
+					var a:HTMLElement = host.element as HTMLElement;
+					a.className = "mdl-badge " + _noBackground + _overlap;
+					a.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/258d1ec5/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as
deleted file mode 100644
index 0cc62a8..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as
+++ /dev/null
@@ -1,121 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mdl.beads
-{
-	import org.apache.flex.core.IStrand;
-    import org.apache.flex.core.IBead;
-	import org.apache.flex.mdl.Badge;
-	
-	
-	/**
-	 *  The BadgeEffect class is a specialty bead that can be used with
-	 *  a MDL Badge control to apply some MDL complementary effect.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class BadgeEffect implements IBead
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function BadgeEffect()
-		{
-		}
-
-		private var _noBackground:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-badge--no-background" effect selector.
-		 *  Applies open-circle effect to badge
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get noBackground():Boolean
-        {
-            return _noBackground;
-        }
-        public function set noBackground(value:Boolean):void
-        {
-            if(value) {
-                _noBackground = " mdl-badge--no-background";
-            } else {
-                _noBackground = "";
-            }   
-        }
-
-        private var _overlap:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-badge--overlap" effect selector.
-		 *  Make the badge overlap with its container
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get overlap():Boolean
-        {
-            return _overlap;
-        }
-        public function set overlap(value:Boolean):void
-        {
-            if(value) {
-                _overlap = " mdl-badge--overlap";
-            } else {
-                _overlap = "";
-            }   
-        }
-
-		private var _strand:IStrand;
-		
-		/**
-		 *  @copy org.apache.flex.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
-		 */
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			
-			COMPILE::JS
-			{
-				if (value is Badge) {
-					var badge:Badge = value as Badge;
-					badge.className = _noBackground + _overlap;
-				} else {
-					throw new Error("Host component must be an MDL Badge.");
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258d1ec5/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
index fcec373..72861ba 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
@@ -87,7 +87,7 @@ package org.apache.flex.mdl.beads
                 //if (host.element is HTMLInputElement)
                 //{
                     input = host.element as HTMLInputElement;
-                    //input.disabled = _disabled ? "disabled" : "";
+                    input.disabled = "disabled";
                 //} else
                 //{
                  //   throw new Error("Host element component in not type input");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/258d1ec5/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 5fc8294..6ed3618 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -31,8 +31,8 @@
     <component id="TextInputEffect" class="org.apache.flex.mdl.beads.TextInputEffect"/>
     <component id="Disabled" class="org.apache.flex.mdl.beads.Disabled"/>
     <component id="Slider" class="org.apache.flex.mdl.Slider"/>
-    <component id="Badge" class="org.apache.flex.mdl.Badge"/>
-    <component id="BadgeEffect" class="org.apache.flex.mdl.beads.BadgeEffect"/>
+    <component id="Link" class="org.apache.flex.mdl.Link"/>
+    <component id="Badge" class="org.apache.flex.mdl.beads.Badge"/>
     <component id="Card" class="org.apache.flex.mdl.Card"/>
     <component id="CardInner" class="org.apache.flex.mdl.supportClasses.CardInner"/>
     <component id="CardTitle" class="org.apache.flex.mdl.CardTitle"/>


[04/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - ButtonEffectBead in place

Posted by ca...@apache.org.
ButtonEffectBead in place


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

Branch: refs/heads/feature/mdl
Commit: 5588ae9bf9c4dc0ef551ce31c792a789c562224d
Parents: e025a99
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 20:03:10 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  10 +-
 .../main/flex/org/apache/flex/mdl/CheckBox.as   |  12 -
 .../flex/org/apache/flex/mdl/RadioButton.as     |  12 -
 .../apache/flex/mdl/beads/ButtonEffectBead.as   | 253 +++++++++++++++++++
 .../org/apache/flex/mdl/beads/EffectBead.as     |   9 -
 .../src/main/resources/defaults.css             |   8 +-
 .../src/main/resources/mdl-manifest.xml         |   1 +
 7 files changed, 266 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5588ae9b/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 82126a4..e618658 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -39,7 +39,7 @@ limitations under the License.
                     <!-- Fab button -->
                     <mdl:Button>
                         <js:beads>
-                            <mdl:EffectBead mdlEffect="mdl-button--fab mdl-button--colored"/>
+                            <mdl:ButtonEffectBead fab="true" colored="true"/>
                         </js:beads>
                         <i class="material-icons">add</i>
                     </mdl:Button>
@@ -47,7 +47,7 @@ limitations under the License.
                     <!-- Fab with Ripple -->
                     <mdl:Button>
                         <js:beads>
-                            <mdl:EffectBead mdlEffect="mdl-button--fab mdl-js-ripple-effect"/>
+                            <mdl:ButtonEffectBead fab="true" ripple="true"/>
                         </js:beads>
                         <i class="material-icons md-48">face</i>
                     </mdl:Button>
@@ -55,20 +55,20 @@ limitations under the License.
                     <!-- Raised button -->
                     <mdl:Button text="BUTTON">
                         <js:beads>
-                            <mdl:EffectBead mdlEffect="mdl-button--raised mdl-button--colored"/>
+                            <mdl:ButtonEffectBead raised="true" colored="true"/>
                         </js:beads>
                     </mdl:Button>
 
                     <!-- Raised button with ripple -->
                     <mdl:Button text="BUTTON">
                         <js:beads>
-                            <mdl:EffectBead mdlEffect="mdl-button--raised mdl-js-ripple-effect mdl-button--accent"/>
+                            <mdl:ButtonEffectBead raised="true" ripple="true" accent="true"/>
                         </js:beads>
                     </mdl:Button>
                     <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
                     <mdl:Button text="BUTTON">
                         <js:beads>
-                            <mdl:EffectBead mdlEffect="mdl-button--raised"/>
+                            <mdl:ButtonEffectBead raised="true"/>
                         </js:beads>
                     </mdl:Button>
                 </js:HContainer>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5588ae9b/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 58d3ba2..4f2bf9e 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
@@ -53,18 +53,6 @@ package org.apache.flex.mdl
 		{
 			super();
 		}
-
-        private var _mdlEffect:String = "";
-
-        public function get mdlEffect():String
-        {
-            return _mdlEffect;
-        }
-        
-        public function set mdlEffect(value:String):void
-        {
-            _mdlEffect = value;
-        }
 	}
     
     COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5588ae9b/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 0f8237d..e0933d2 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
@@ -53,18 +53,6 @@ package org.apache.flex.mdl
 		{
 			super();
 		}
-
-        private var _mdlEffect:String = "";
-
-        public function get mdlEffect():String
-        {
-            return _mdlEffect;
-        }
-        
-        public function set mdlEffect(value:String):void
-        {
-            _mdlEffect = value;
-        }
 	}
     
     COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5588ae9b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as
new file mode 100644
index 0000000..de999f9
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as
@@ -0,0 +1,253 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+
+    import org.apache.flex.mdl.Button;
+	
+	/**
+	 *  The ButtonEffectBead class is a specialty bead that can be used with
+	 *  an MDL button control to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class ButtonEffectBead implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function ButtonEffectBead()
+		{
+		}
+		
+        private var _fab:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--fab" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get fab():Boolean
+        {
+            return _fab;
+        }
+        public function set fab(value:Boolean):void
+        {
+            if(value) {
+                _fab = " mdl-button--fab";
+            } else {
+                _fab = "";
+            }   
+        }
+
+        private var _raised:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--raised" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get raised():Boolean
+        {
+            return _raised;
+        }
+        public function set raised(value:Boolean):void
+        {
+            if(value) {
+                _raised = " mdl-button--raised";
+            } else {
+                _raised = "";
+            }   
+        }
+
+        private var _colored:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--colored" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get colored():Boolean
+        {
+            return _colored;
+        }
+        public function set colored(value:Boolean):void
+        {
+            if(value) {
+                _colored = " mdl-button--colored";
+            } else {
+                _colored = "";
+            }   
+        }
+
+        private var _ripple:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-js-ripple-effect" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get ripple():Boolean
+        {
+            return _ripple;
+        }
+        public function set ripple(value:Boolean):void
+        {
+            if(value) {
+                _ripple = " mdl-js-ripple-effect";
+            } else {
+                _ripple = "";
+            }   
+        }
+
+        private var _accent:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--accent" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get accent():Boolean
+        {
+            return _accent;
+        }
+        public function set accent(value:Boolean):void
+        {
+            if(value) {
+                _accent = " mdl-button--accent";
+            } else {
+                _accent = "";
+            }   
+        }
+
+        private var _primary:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--primary" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get primary():Boolean
+        {
+            return _primary;
+        }
+        public function set primary(value:Boolean):void
+        {
+            if(value) {
+                _primary = " mdl-button--primary";
+            } else {
+                _primary = "";
+            }   
+        }
+
+        private var _minifab:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--mini-fab" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get minifab():Boolean
+        {
+            return _minifab;
+        }
+        public function set minifab(value:Boolean):void
+        {
+            if(value) {
+                _minifab = " mdl-button--mini-fab";
+            } else {
+                _minifab = "";
+            }   
+        }
+
+        private var _icon:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--icon" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get icon():Boolean
+        {
+            return _icon;
+        }
+        public function set icon(value:Boolean):void
+        {
+            if(value) {
+                _icon = " mdl-button--icon";
+            } else {
+                _icon = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion HTMLInputElement
+		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+                if (value is Button) {
+                    var button:Button = value as Button;
+                    button.className = _fab + _raised + _colored + _ripple + _accent + _primary + _minifab + _icon;
+                } else {
+                    throw new Error("Host component must be an MDL Button.");
+                }
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5588ae9b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
index b01538d..d7ddcc0 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
@@ -46,15 +46,6 @@ package org.apache.flex.mdl.beads
 		public function EffectBead()
 		{
 		}
-		
-        /*public static const RAISED_EFFECT:String = "mdl-button--raised";
-        public static const FAB_EFFECT:String = "mdl-button--fab";
-        public static const MINI_FAB_EFFECT:String = "mdl-button--mini-fab";
-        public static const ICON_EFFECT:String = "mdl-button--icon";
-        public static const COLORED_EFFECT:String = "mdl-button--colored";
-        public static const PRIMARY_EFFECT:String = "mdl-button--primary";
-        public static const ACCENT_EFFECT:String = "mdl-button--accent";
-        public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";*/
 
         private var _mdlEffect:String = "";
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5588ae9b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
index f795472..ae61dc6 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
@@ -17,9 +17,15 @@
  *
  */
 
-@namespace "library://ns.apache.org/flexjs/mdl";
 
+@namespace "library://ns.apache.org/flexjs/basic";
+@namespace mdl "library://ns.apache.org/flexjs/mdl";
 
+.flexjs *, . flexjs *:before, . flexjs *:after {
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+}
 
 
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5588ae9b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index aca9380..a4d62f2 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -27,5 +27,6 @@
     <component id="RadioButton" class="org.apache.flex.mdl.RadioButton"/>
     <component id="TextPromptBead" class="org.apache.flex.mdl.beads.TextPromptBead"/>
     <component id="EffectBead" class="org.apache.flex.mdl.beads.EffectBead"/>
+    <component id="ButtonEffectBead" class="org.apache.flex.mdl.beads.ButtonEffectBead"/>
 
 </componentPackage>


[10/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - fix MDL swc to use the correct Button

Posted by ca...@apache.org.
fix MDL swc to use the correct Button


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

Branch: refs/heads/feature/mdl
Commit: 3a8673608eb5bdb569d28e1fbab3c3a7db6f49fd
Parents: cb3ec15
Author: Alex Harui <ah...@apache.org>
Authored: Sun Oct 16 21:25:09 2016 -0700
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Button.as                 | 5 +++--
 .../MaterialDesignLite/src/main/resources/mdl-manifest.xml      | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3a867360/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 11f218c..7f836f6 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
@@ -66,8 +66,9 @@ package org.apache.flex.mdl
         override protected function createElement():WrappedHTMLElement
         {
             var button:HTMLButtonElement;
-
-            element = button = document.createElement('button') as HTMLButtonElement;
+            
+            button = document.createElement('button') as HTMLButtonElement;
+            element = button as WrappedHTMLElement;
             button.className = 'mdl-button mdl-js-button mdl-button--fab mdl-button--colored';
             
             positioner = element;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3a867360/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 68dffad..897aab5 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -21,7 +21,7 @@
 
 <componentPackage>
 
-    <component id="Button" class="org.apache.flex.html.Button"  lookupOnly="true" />
+    <component id="Button" class="org.apache.flex.mdl.Button"/>
     <component id="TextInput" class="org.apache.flex.html.TextInput"  lookupOnly="true" />
 
 </componentPackage>


[35/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Fix badges to conform to MDL

Posted by ca...@apache.org.
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/53c4f9d4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/53c4f9d4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/53c4f9d4

Branch: refs/heads/feature/mdl
Commit: 53c4f9d44d7ffa2993c2abfe2fd24ce7242991ba
Parents: 91ad079
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Nov 4 17:42:13 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 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/53c4f9d4/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/53c4f9d4/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
 				{


[22/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Fixed radio button

Posted by ca...@apache.org.
Fixed radio button


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

Branch: refs/heads/feature/mdl
Commit: 66f54dc689dc4cedca7ebcedf1e5b69566c326b5
Parents: 713fdbd
Author: Carlos Rovira <ca...@apache.org>
Authored: Tue Oct 25 00:06:03 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flex/org/apache/flex/mdl/RadioButton.as     | 84 ++++++++------------
 1 file changed, 33 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66f54dc6/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 d19ce78..ee79872 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
@@ -26,6 +26,7 @@ package org.apache.flex.mdl
     {
         import org.apache.flex.core.UIBase;
         import org.apache.flex.core.WrappedHTMLElement;
+        import org.apache.flex.html.supportClasses.RadioButtonIcon;
     }
 
     /**
@@ -74,8 +75,8 @@ package org.apache.flex.mdl
          */
         public static var radioCounter:int = 0;
 
-        private var input:HTMLInputElement;
         private var radio:HTMLSpanElement;
+        private var icon:RadioButtonIcon;
         private var label:HTMLLabelElement;
         private var textNode:Text;
         
@@ -88,22 +89,19 @@ package org.apache.flex.mdl
          */
         override protected function createElement():WrappedHTMLElement
         { 
-            // hide this eleement
-            input = document.createElement('input') as HTMLInputElement;
-            input.type = 'radio';
-            input.className = 'mdl-radio__button';
-            input.id = '_radio_' + radioCounter++;
-            input.addEventListener('change', selectionChangeHandler, false);  
+            icon = new RadioButtonIcon();
+            icon.className = 'mdl-radio__button';
+            icon.id = '_radio_' + RadioButton.radioCounter++;
+            
+            textNode = document.createTextNode('') as Text;
 
             radio = document.createElement('span') as HTMLSpanElement;
             radio.className = 'mdl-radio__label';
             radio.addEventListener('mouseover', mouseOverHandler, false);
             radio.addEventListener('mouseout', mouseOutHandler, false);
             
-            textNode = document.createTextNode('') as Text;
-            
             label = document.createElement('label') as HTMLLabelElement;
-            label.appendChild(input);
+            label.appendChild(icon.element);
             label.appendChild(radio);
             radio.appendChild(textNode);
             label.style.position = 'relative';
@@ -112,10 +110,10 @@ package org.apache.flex.mdl
             
             positioner = element;
             positioner.style.position = 'relative';
-            (input as WrappedHTMLElement).flexjs_wrapper = this;
-            (radio as WrappedHTMLElement).flexjs_wrapper = this;
-            element.flexjs_wrapper = this;
+            (element as WrappedHTMLElement).flexjs_wrapper = this;
             (textNode as WrappedHTMLElement).flexjs_wrapper = this;
+            (icon.element as WrappedHTMLElement).flexjs_wrapper = this;
+            (radio as WrappedHTMLElement).flexjs_wrapper = this;
             
             className = typeNames = 'mdl-radio mdl-js-radio';
             
@@ -158,20 +156,16 @@ package org.apache.flex.mdl
         {
             super.id = value;
             label.id = value;
-            input.id = value;
+            icon.element.id = value;
         }
         
-        /**
-         * @flexjsignorecoercion String
-         */
         public function get groupName():String
         {
-            return input.name as String;
+            return (icon.element as HTMLInputElement).name as String;
         }
-        
         public function set groupName(value:String):void
         {
-            input.name = value;
+            (icon.element as HTMLInputElement).name = value;
         }
         
         public function get text():String
@@ -184,74 +178,62 @@ package org.apache.flex.mdl
             textNode.nodeValue = value;
         }
         
+        /** @export */
         public function get selected():Boolean
         {
-            return input.checked;
+            return (icon.element as HTMLInputElement).checked;
         }
-        
         public function set selected(value:Boolean):void
         {
-            input.checked = value;
-            /*if (input.checked)
-                radio.className = 'radio-icon-checked';
-            else
-                radio.className = 'radio-icon';*/
+            (icon.element as HTMLInputElement).checked = value;
         }
         
-        public function get value():String
+        public function get value():Object
         {
-            return input.value;
+            return (icon.element as HTMLInputElement).value;
         }
-        
-        public function set value(value:String):void
+        public function set value(v:Object):void
         {
-            input.value = value;
+            (icon.element as HTMLInputElement).value = v as String;
         }
         
-        /**
-         * @flexjsignorecoercion Array 
-         * @flexjsignorecoercion String
-         */
         public function get selectedValue():Object
         {
-            var buttons:Array;
+            var buttons:NodeList;
             var groupName:String;
             var i:int;
             var n:int;
-            
-            groupName = input.name as String;
-            buttons = document.getElementsByName(groupName) as Array;
+
+            groupName = (icon.element as HTMLInputElement).name as String;
+            buttons = document.getElementsByName(groupName);
             n = buttons.length;
-            
+
             for (i = 0; i < n; i++) {
                 if (buttons[i].checked) {
                     return buttons[i].value;
                 }
             }
-            return null;            
+            return null;
         }
-        
+
         /**
          * @flexjsignorecoercion Array
-         * @flexjsignorecoercion String
          */
         public function set selectedValue(value:Object):void
         {
-            var buttons:Array;
+            var buttons:NodeList;
             var groupName:String;
             var i:int;
             var n:int;
-            
-            groupName = input.name as String;
-            buttons = document.getElementsByName(groupName) as Array;
+
+            groupName = (icon.element as HTMLInputElement).name as String;
+            buttons = document.getElementsByName(groupName);
             n = buttons.length;
             for (i = 0; i < n; i++) {
                 if (buttons[i].value === value) {
                     buttons[i].checked = true;
-                    buttons[i].flexjs_wrapper.selected = true;
+                    break;
                 }
-                else
-                    buttons[i].flexjs_wrapper.selected = false;
             }
         }
 


[07/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - First MDL commit. This is a Material Design Google SWC project to create components with Google MDL look and feel

Posted by ca...@apache.org.
First MDL commit. This is a Material Design Google SWC project  to create components with Google MDL look and feel


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

Branch: refs/heads/feature/mdl
Commit: cc77f4c15b5deb385b5848d1d11a008a6ef6b9e6
Parents: 82a6f7c
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Oct 14 20:51:28 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../projects/MaterialDesignLite/build.xml       | 116 ++++++++++++++++++
 frameworks/projects/MaterialDesignLite/pom.xml  | 117 +++++++++++++++++++
 .../src/main/config/compile-as-config.xml       |  87 ++++++++++++++
 .../src/main/flex/MDLClasses.as                 |  37 ++++++
 .../src/main/flex/org/apache/flex/mdl/Button.as |  81 +++++++++++++
 .../src/main/resources/defaults.css             |  25 ++++
 .../src/main/resources/mdl-as-manifest.xml      |  26 +++++
 .../src/main/resources/mdl-manifest.xml         |  27 +++++
 8 files changed, 516 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/frameworks/projects/MaterialDesignLite/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/build.xml b/frameworks/projects/MaterialDesignLite/build.xml
new file mode 100644
index 0000000..b61453d
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/build.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="MaterialDesignLite" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../.."/>
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,compile,compile-js,copy-swc,test" description="Full build of ${ant.project.name}.swc">
+    </target>
+    
+    <target name="compile-js">
+        <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
+    </target>
+    
+    <target name="copy-swc">
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
+    </target>
+    
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset dir="${FLEXJS_HOME}/frameworks/libs">
+                <include name="${target.name}"/>
+            </fileset>
+        </delete>
+        <delete failonerror="false" includeemptydirs="true">
+            <fileset dir="${basedir}/target">
+                <include name="**/**"/>
+            </fileset>
+        </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
+    
+    <target name="compile" description="Compiles .as files into .swc">
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+        
+        <compc fork="true"
+            output="${basedir}/target/${target.name}">
+            <jvmarg line="${compc.jvm.args}"/>
+            <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.AIR_HOME=${env.AIR_HOME}" />
+            <arg value="-define=COMPILE::SWF,true" />
+            <arg value="-define=COMPILE::JS,false" />
+        </compc>
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/frameworks/projects/MaterialDesignLite/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/pom.xml b/frameworks/projects/MaterialDesignLite/pom.xml
new file mode 100644
index 0000000..d5fde11
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/pom.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.flex.flexjs.framework</groupId>
+    <artifactId>projects</artifactId>
+    <version>0.8.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>MaterialDesignLite</artifactId>
+  <version>0.8.0-SNAPSHOT</version>
+  <packaging>swc</packaging>
+
+  <name>Apache Flex - FlexJS: Framework: Libs: Material Design Lite</name>
+
+  <build>
+    <sourceDirectory>src/main/flex</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.flex.flexjs.compiler</groupId>
+        <artifactId>flexjs-maven-plugin</artifactId>
+        <version>${flexjs.compiler.version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <namespaces>
+            <namespace>
+              <uri>library://ns.apache.org/flexjs/mdl</uri>
+              <manifest>${project.basedir}/src/main/resources/mdl-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+              <type>as</type>
+              <uri>library://ns.apache.org/flexjs/mdl</uri>
+              <manifest>${project.basedir}/src/main/resources/mdl-as-manifest.xml</manifest>
+            </namespace>
+          </namespaces>
+          <includeClasses>
+            <includeClass>MDLClasses</includeClass>
+          </includeClasses>
+          <includeFiles>
+            <include-file>
+              <name>defaults.css</name>
+              <path>../src/main/resources/defaults.css</path>
+            </include-file>
+          </includeFiles>
+          <includeLookupOnly>true</includeLookupOnly>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>typedefs</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Binding</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Graphics</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Collections</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>typedefs</classifier>
+    </dependency>
+  </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml b/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml
new file mode 100644
index 0000000..9f81189
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/config/compile-as-config.xml
@@ -0,0 +1,87 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<flex-config>
+
+    <compiler>
+        <accessible>false</accessible>
+        
+        <external-library-path>
+            <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+            <path-element>../../../../../libs/Binding.swc</path-element>
+            <path-element>../../../../../libs/Core.swc</path-element>
+            <path-element>../../../../../libs/Graphics.swc</path-element>
+            <path-element>../../../../../libs/HTML.swc</path-element>
+        </external-library-path>
+        
+		<mxml>
+			<children-as-data>true</children-as-data>
+		</mxml>
+		<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
+		<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
+		<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+
+        <keep-as3-metadata>
+          <name>Bindable</name>
+          <name>Managed</name>
+          <name>ChangeEvent</name>
+          <name>NonCommittingChangeEvent</name>
+          <name>Transient</name>
+        </keep-as3-metadata>
+	  
+        <locale/>
+        
+        <library-path/>
+
+        <namespaces>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/mdl</uri>
+                <manifest>../resources/mdl-manifest.xml</manifest>
+            </namespace>
+            <namespace>
+                <uri>library://ns.apache.org/flexjs/mdl</uri>
+                <manifest>../resources/mdl-as-manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        
+        <source-path>
+            <path-element>../flex</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-file>
+        <name>defaults.css</name>
+        <path>../resources/defaults.css</path>
+    </include-file>
+
+    <include-lookup-only>true</include-lookup-only>
+    
+    <include-classes>
+        <class>MDLClasses</class>
+    </include-classes>
+    
+    <include-namespaces>
+        <uri>library://ns.apache.org/flexjs/mdl</uri>
+    </include-namespaces>
+        
+    <target-player>${playerglobal.version}</target-player>
+	
+
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
new file mode 100644
index 0000000..733728e
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ *  @private
+ *  This class is used to link additional classes into mdl.swc
+ *  beyond those that are found by dependecy analysis starting
+ *  from the classes specified in manifest.xml.
+ */
+internal class MDLClasses
+{	
+	COMPILE::SWF
+	{
+		//import org.apache.flex.flat.beads.CSSScrollBarView; CSSScrollBarView;
+	}
+}
+
+}
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/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
new file mode 100644
index 0000000..11f218c
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Button.as
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+    COMPILE::SWF
+    {
+        import org.apache.flex.html.Button;            
+    }
+    COMPILE::JS
+    {
+        import org.apache.flex.core.UIBase;
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+    /**
+     *  The Button class provides a Material Design Library UI-like appearance for
+     *  a Button.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+    COMPILE::SWF
+	public class Button extends org.apache.flex.html.Button
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function Button()
+		{
+			super();
+		}
+	}
+    
+    COMPILE::JS
+    public class Button extends UIBase
+    {
+        private var button:HTMLButtonElement;
+
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         * @flexjsignorecoercion HTMLButtonElement
+         */
+        override protected function createElement():WrappedHTMLElement
+        {
+            var button:HTMLButtonElement;
+
+            element = button = document.createElement('button') as HTMLButtonElement;
+            button.className = 'mdl-button mdl-js-button mdl-button--fab mdl-button--colored';
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            (button as WrappedHTMLElement).flexjs_wrapper = this;
+            element.flexjs_wrapper = this;
+            
+            return element;
+        }
+    }    
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
new file mode 100644
index 0000000..f795472
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
@@ -0,0 +1,25 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+@namespace "library://ns.apache.org/flexjs/mdl";
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-as-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-as-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-as-manifest.xml
new file mode 100644
index 0000000..2e1e719
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-as-manifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    <!--<component id="DropDownListList" class="org.apache.flex.mdl.supportClasses.DropDownListList" />-->
+
+</componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc77f4c1/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
new file mode 100644
index 0000000..68dffad
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<componentPackage>
+
+    <component id="Button" class="org.apache.flex.html.Button"  lookupOnly="true" />
+    <component id="TextInput" class="org.apache.flex.html.TextInput"  lookupOnly="true" />
+
+</componentPackage>


[26/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL EffectBead in place (for now using a string, maybe better change to boolean flags)

Posted by ca...@apache.org.
MDL EffectBead in place (for now using a string, maybe better change to boolean flags)


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

Branch: refs/heads/feature/mdl
Commit: e025a99967b13718c096e2a1e9a43d10de339721
Parents: 148b5bb
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 12:57:18 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  45 ++++++--
 .../src/main/flex/org/apache/flex/mdl/Button.as |  25 -----
 .../main/flex/org/apache/flex/mdl/CheckBox.as   |  16 ---
 .../flex/org/apache/flex/mdl/RadioButton.as     |  17 ---
 .../main/flex/org/apache/flex/mdl/TextInput.as  |  20 +---
 .../org/apache/flex/mdl/beads/EffectBead.as     | 107 +++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |   1 +
 7 files changed, 145 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e025a999/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 9f1be78..82126a4 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -37,21 +37,40 @@ limitations under the License.
                     <mdl:Button/>
 
                     <!-- Fab button -->
-                    <mdl:Button mdlEffect="mdl-button--fab mdl-button--colored">
+                    <mdl:Button>
+                        <js:beads>
+                            <mdl:EffectBead mdlEffect="mdl-button--fab mdl-button--colored"/>
+                        </js:beads>
                         <i class="material-icons">add</i>
                     </mdl:Button>
 
                     <!-- Fab with Ripple -->
-                    <mdl:Button mdlEffect="mdl-button--fab mdl-js-ripple-effect">
+                    <mdl:Button>
+                        <js:beads>
+                            <mdl:EffectBead mdlEffect="mdl-button--fab mdl-js-ripple-effect"/>
+                        </js:beads>
                         <i class="material-icons md-48">face</i>
                     </mdl:Button>
 
                     <!-- Raised button -->
-                    <mdl:Button mdlEffect="mdl-button--raised mdl-button--colored" text="BUTTON"/>
+                    <mdl:Button text="BUTTON">
+                        <js:beads>
+                            <mdl:EffectBead mdlEffect="mdl-button--raised mdl-button--colored"/>
+                        </js:beads>
+                    </mdl:Button>
+
                     <!-- Raised button with ripple -->
-                    <mdl:Button mdlEffect="mdl-button--raised mdl-js-ripple-effect mdl-button--accent" text="BUTTON"/>
+                    <mdl:Button text="BUTTON">
+                        <js:beads>
+                            <mdl:EffectBead mdlEffect="mdl-button--raised mdl-js-ripple-effect mdl-button--accent"/>
+                        </js:beads>
+                    </mdl:Button>
                     <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
-                    <mdl:Button mdlEffect="mdl-button--raised" text="BUTTON"/>
+                    <mdl:Button text="BUTTON">
+                        <js:beads>
+                            <mdl:EffectBead mdlEffect="mdl-button--raised"/>
+                        </js:beads>
+                    </mdl:Button>
                 </js:HContainer>
 
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
@@ -60,18 +79,26 @@ limitations under the License.
                         <mdl:TextPromptBead prompt="Normal Text Field..."/>
                     </js:beads>
                 </mdl:TextInput>
-                <mdl:TextInput mdlEffect="mdl-textfield--floating-label">
+                <mdl:TextInput>
                     <js:beads>
+                        <mdl:EffectBead mdlEffect="mdl-textfield--floating-label"/>
                         <mdl:TextPromptBead prompt="Floating Label"/>
                     </js:beads>
                 </mdl:TextInput>
 
                 <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
                 <mdl:CheckBox id="mdlchk" text="Disabled at start" />
-                <mdl:CheckBox id="mdlchk1" text="Selected and with Ripple" selected="true" mdlEffect="mdl-js-ripple-effect"/>
-                
+                <mdl:CheckBox id="mdlchk1" text="Selected and with Ripple" selected="true">
+                    <js:beads>
+                        <mdl:EffectBead mdlEffect="mdl-js-ripple-effect"/>
+                    </js:beads>
+                </mdl:CheckBox>
                 <mdl:RadioButton groupName="g1" text="Black"/>
-                <mdl:RadioButton groupName="g1" text="Ripple" mdlEffect="mdl-js-ripple-effect"/>
+                <mdl:RadioButton groupName="g1" text="Ripple">
+                    <js:beads>
+                        <mdl:EffectBead mdlEffect="mdl-js-ripple-effect"/>
+                    </js:beads>
+                </mdl:RadioButton>
                 <mdl:RadioButton groupName="g1" text="Red"/>
 
             </js:Form>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e025a999/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 7c17757..27116c4 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
@@ -67,30 +67,5 @@ package org.apache.flex.mdl
 			
             return element;
 		}
-
-        /*public static const RAISED_EFFECT:String = "mdl-button--raised";
-        public static const FAB_EFFECT:String = "mdl-button--fab";
-        public static const MINI_FAB_EFFECT:String = "mdl-button--mini-fab";
-        public static const ICON_EFFECT:String = "mdl-button--icon";
-        public static const COLORED_EFFECT:String = "mdl-button--colored";
-        public static const PRIMARY_EFFECT:String = "mdl-button--primary";
-        public static const ACCENT_EFFECT:String = "mdl-button--accent";
-        public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";*/
-
-        private var _mdlEffect:String = "";
-
-        public function get mdlEffect():String
-        {
-            return _mdlEffect;
-        }
-        
-        public function set mdlEffect(value:String):void
-        {
-            _mdlEffect = value;
-            COMPILE::JS 
-            {
-                className = _mdlEffect;
-            }
-        }
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e025a999/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 60db161..58d3ba2 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
@@ -167,22 +167,6 @@ package org.apache.flex.mdl
             else
                 checkbox.className = 'checkbox-icon';*/
         }
-
-        private var _mdlEffect:String = "";
-
-        public function get mdlEffect():String
-        {
-            return _mdlEffect;
-        }
-        
-        public function set mdlEffect(value:String):void
-        {
-            _mdlEffect = value;
-            COMPILE::JS 
-            {
-                className = _mdlEffect;
-            }
-        }
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e025a999/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 ee79872..0f8237d 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
@@ -236,23 +236,6 @@ package org.apache.flex.mdl
                 }
             }
         }
-
-        private var _mdlEffect:String = "";
-
-        public function get mdlEffect():String
-        {
-            return _mdlEffect;
-        }
-        
-        public function set mdlEffect(value:String):void
-        {
-            _mdlEffect = value;
-            COMPILE::JS 
-            {
-                className = _mdlEffect;
-            }
-        }
-
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e025a999/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
index c8244a4..a53f31e 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -105,24 +105,6 @@ package org.apache.flex.mdl
             element.flexjs_wrapper = this;
             
             return element;
-        }        
-        
-        private var _mdlEffect:String = "";
-
-        public function get mdlEffect():String
-        {
-            return _mdlEffect;
-        }
-        
-        public function set mdlEffect(value:String):void
-        {
-            _mdlEffect = value;
-            COMPILE::JS 
-            {
-                positioner.className = positioner.className + " " + _mdlEffect;
-            }
-        }
-
-        
+        }    
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e025a999/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
new file mode 100644
index 0000000..b01538d
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+
+    import org.apache.flex.mdl.TextInput;
+	
+	/**
+	 *  The EffectBead class is a specialty bead that can be used with
+	 *  any MDL control to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class EffectBead implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function EffectBead()
+		{
+		}
+		
+        /*public static const RAISED_EFFECT:String = "mdl-button--raised";
+        public static const FAB_EFFECT:String = "mdl-button--fab";
+        public static const MINI_FAB_EFFECT:String = "mdl-button--mini-fab";
+        public static const ICON_EFFECT:String = "mdl-button--icon";
+        public static const COLORED_EFFECT:String = "mdl-button--colored";
+        public static const PRIMARY_EFFECT:String = "mdl-button--primary";
+        public static const ACCENT_EFFECT:String = "mdl-button--accent";
+        public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";*/
+
+        private var _mdlEffect:String = "";
+
+        /**
+		 *  The string to use as the MDL effect.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get mdlEffect():String
+        {
+            return _mdlEffect;
+        }
+        
+        public function set mdlEffect(value:String):void
+        {
+            _mdlEffect = value;
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion HTMLInputElement
+		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+                if (value is TextInput) {
+                    var mdTi:TextInput = value as TextInput;
+                    mdTi.positioner.className = mdTi.positioner.className + " " + mdlEffect;
+                } else {
+                    var host:UIBase = value as UIBase;
+                    host.className = mdlEffect;
+                }
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e025a999/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 9f47fea..aca9380 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -26,5 +26,6 @@
     <component id="CheckBox" class="org.apache.flex.mdl.CheckBox"/>
     <component id="RadioButton" class="org.apache.flex.mdl.RadioButton"/>
     <component id="TextPromptBead" class="org.apache.flex.mdl.beads.TextPromptBead"/>
+    <component id="EffectBead" class="org.apache.flex.mdl.beads.EffectBead"/>
 
 </componentPackage>


[29/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Fix to complain with the last refactor

Posted by ca...@apache.org.
Fix to complain with the last refactor


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

Branch: refs/heads/feature/mdl
Commit: b2a31f3548ec32f4ae1bb4ab53d43ba410accad7
Parents: 272857b
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Nov 2 19:27:22 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b2a31f35/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as
index e3142b2..b9d1a6b 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as
@@ -138,11 +138,11 @@ package org.apache.flex.mdl.beads
 			var model:Object = UIBase(_strand).model;
 			
 			if (model.text != null && model.text.length > 0 ) {
-				if (promptAdded) UIBase(_strand).removeChild(promptField);
+				if (promptAdded) UIBase(_strand).$displayObjectContainer.removeChild(promptField);
 				promptAdded = false;
 			}
 			else {
-				if (!promptAdded) UIBase(_strand).addChild(promptField);
+				if (!promptAdded) UIBase(_strand).$displayObjectContainer.addChild(promptField);
 				promptField.text = prompt;
 				promptAdded = true;
 			}


[19/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Changes to Button and examples

Posted by ca...@apache.org.
Changes to Button and examples


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

Branch: refs/heads/feature/mdl
Commit: e625477fc768ef7c8d7e37ebaf5e6b1d227ab1d3
Parents: 3b70dd0
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 19 00:49:48 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 32 +++++----
 .../src/main/flex/org/apache/flex/mdl/Button.as | 69 ++++++++++++--------
 2 files changed, 57 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e625477f/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 209efae..95dad1b 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -30,44 +30,42 @@ limitations under the License.
     <js:initialView>
         <js:View>
             
-            <js:Form action="http://www.google.com"> 
+            <js:Form action="#"> 
 
                 <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
                 <js:Container>
                     <js:beads>
                         <js:HorizontalLayout />
                     </js:beads>
-                           
-                    <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
+                    
+                    <!-- Fab button -->
+                    <mdl:Button mdlEffect="mdl-button--fab mdl-button--colored">
                         <i class="material-icons">add</i>
-                    </js:TextButton>
+                    </mdl:Button>
 
-                    <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
-                        <i class="material-icons">mood</i>
-                    </js:TextButton>
+                    <!-- Fab with Ripple -->
+                    <mdl:Button mdlEffect="mdl-button--fab mdl-js-ripple-effect">
+                        <i class="material-icons md-48">face</i>
+                    </mdl:Button>
 
                     <!-- Raised button -->
-                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
+                    <mdl:Button mdlEffect="mdl-button--raised mdl-button--colored" text="BUTTON"/>
                     <!-- Raised button with ripple -->
-                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" text="BUTTON"/>
+                    <mdl:Button mdlEffect="mdl-button--raised mdl-js-ripple-effect mdl-button--accent" text="BUTTON"/>
                     <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
-                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
-
-                    <mdl:Button>
-                        <i class="material-icons">add</i>
-                    </mdl:Button>
-
-                    <mdl:Button text="BUTTON"/>                 
+                    <mdl:Button mdlEffect="mdl-button--raised" text="BUTTON"/>
                 </js:Container>
 
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
                 <mdl:TextInput id="mdlti" text="Something..." change="mdlchk.text = mdlti.text"/>
 
                 <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
-                <mdl:CheckBox id="mdlchk" text="Hello" selected="true"/>
+                <mdl:CheckBox id="mdlchk" text="This Checks" selected="true"/>
+                <mdl:CheckBox id="mdlchk1" text="This is disabled at start" />
                 
                 <mdl:RadioButton groupName="g1" text="Black"/>
                 <mdl:RadioButton groupName="g1" text="White"/>
+                <mdl:RadioButton groupName="g1" text="Red"/>
             </js:Form>
             
         </js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e625477f/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 7f836f6..61bcc20 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
@@ -18,13 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-    COMPILE::SWF
-    {
-        import org.apache.flex.html.Button;            
-    }
+    import org.apache.flex.html.TextButton;            
+    
     COMPILE::JS
     {
-        import org.apache.flex.core.UIBase;
         import org.apache.flex.core.WrappedHTMLElement;
     }
     
@@ -37,8 +34,7 @@ package org.apache.flex.mdl
      *  @playerversion AIR 2.6
      *  @productversion FlexJS 0.0
      */
-    COMPILE::SWF
-	public class Button extends org.apache.flex.html.Button
+	public class Button extends TextButton
 	{
         /**
          *  Constructor.
@@ -52,31 +48,50 @@ package org.apache.flex.mdl
 		{
 			super();
 		}
-	}
-    
-    COMPILE::JS
-    public class Button extends UIBase
-    {
-        private var button:HTMLButtonElement;
 
         /**
-         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-         * @flexjsignorecoercion HTMLButtonElement
-         */
-        override protected function createElement():WrappedHTMLElement
-        {
-            var button:HTMLButtonElement;
-            
-            button = document.createElement('button') as HTMLButtonElement;
-            element = button as WrappedHTMLElement;
-            button.className = 'mdl-button mdl-js-button mdl-button--fab mdl-button--colored';
+		 * @private
+		 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 */
+		COMPILE::JS
+		override protected function createElement():WrappedHTMLElement
+		{
+            element = document.createElement('button') as WrappedHTMLElement;
+            //element.setAttribute('type', 'button');
             
             positioner = element;
             positioner.style.position = 'relative';
-            (button as WrappedHTMLElement).flexjs_wrapper = this;
             element.flexjs_wrapper = this;
-            
-            return element;
+
+            element.className = 'mdl-button mdl-js-button';
+			className = "";
+			typeNames = "MDLButton";
+			return element;
+		}
+
+        public static const RAISED_EFFECT:String = "mdl-button--raised";
+        public static const FAB_EFFECT:String = "mdl-button--fab";
+        public static const MINI_FAB_EFFECT:String = "mdl-button--mini-fab";
+        public static const ICON_EFFECT:String = "mdl-button--icon";
+        public static const COLORED_EFFECT:String = "mdl-button--colored";
+        public static const PRIMARY_EFFECT:String = "mdl-button--primary";
+        public static const ACCENT_EFFECT:String = "mdl-button--accent";
+        public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";
+
+        private var _mdlEffect:String = "";
+
+        public function get mdlEffect():String
+        {
+            return _mdlEffect;
         }
-    }    
+        
+        public function set mdlEffect(value:String):void
+        {
+            _mdlEffect = value;
+            COMPILE::JS 
+            {
+                element.className = 'mdl-button mdl-js-button ' + _mdlEffect;
+            }
+        }
+	}
 }


[28/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Minor changes

Posted by ca...@apache.org.
Minor changes


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

Branch: refs/heads/feature/mdl
Commit: 272857bcc480acae2ac485d6f53ab44e32cc2aa5
Parents: 77e03cf
Author: Carlos Rovira <ca...@apache.org>
Authored: Thu Oct 27 18:28:34 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/pom.xml              |  6 ++
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  6 +-
 .../src/main/resources/mdl-styles.css           | 20 ++---
 .../main/flex/org/apache/flex/mdl/CheckBox.as   | 85 ++++++--------------
 .../flex/org/apache/flex/mdl/beads/Disabled.as  | 20 ++++-
 .../src/main/resources/defaults.css             |  7 +-
 6 files changed, 66 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272857bc/examples/flexjs/MDLExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/pom.xml b/examples/flexjs/MDLExample/pom.xml
index 3a31b25..1503b57 100644
--- a/examples/flexjs/MDLExample/pom.xml
+++ b/examples/flexjs/MDLExample/pom.xml
@@ -44,6 +44,12 @@
         <configuration>
           <flashVersion>20.0</flashVersion>
           <mainClass>App.mxml</mainClass>
+          <includeFiles>
+            <include-file>
+              <name>defaults.css</name>
+              <path>../src/main/resources/defaults.css</path>
+            </include-file>
+          </includeFiles>
         </configuration>
         <executions>
           <!-- Add a second execution with output set to JavaScript (Flash is the default) -->

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272857bc/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 472f556..9f76732 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -53,20 +53,20 @@ limitations under the License.
                     </mdl:Button>
 
                     <!-- Raised button -->
-                    <mdl:Button text="BUTTON">
+                    <mdl:Button text="COLORED">
                         <js:beads>
                             <mdl:ButtonEffect raised="true" colored="true"/>
                         </js:beads>
                     </mdl:Button>
 
                     <!-- Raised button with ripple -->
-                    <mdl:Button text="BUTTON">
+                    <mdl:Button text="ACCENT">
                         <js:beads>
                             <mdl:ButtonEffect raised="true" ripple="true" accent="true"/>
                         </js:beads>
                     </mdl:Button>
                     <!-- Raised disabled button-->
-                    <mdl:Button text="BUTTON">
+                    <mdl:Button text="DISABLED">
                         <js:beads>
                             <mdl:ButtonEffect raised="true"/>
                             <mdl:Disabled/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272857bc/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
index 6a07905..3da8515 100644
--- a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
@@ -19,14 +19,16 @@
 ////////////////////////////////////////////////////////////////////////////////
 */
 
-.demo-card-wide.mdl-card {
-  width: 512px;
+@namespace "library://ns.apache.org/flexjs/basic";
+
+.flexjs *, . flexjs *:before, . flexjs *:after {
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
 }
-.demo-card-wide > .mdl-card__title {
-  color: #fff;
-  height: 176px;
-  background: url('welcome_card.jpg') center / cover;
+
+Application
+{
+	padding: 10px;
+	margin: 10px;
 }
-.demo-card-wide > .mdl-card__menu {
-  color: #fff;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272857bc/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 4f2bf9e..a4d2a4c 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
@@ -73,64 +73,31 @@ package org.apache.flex.mdl
          */
         override protected function createElement():WrappedHTMLElement
         {
-                label = document.createElement('label') as HTMLLabelElement;
-                element = label as WrappedHTMLElement;
-                
-                input = document.createElement('input') as HTMLInputElement;
-                input.type = 'checkbox';
-                input.className = 'mdl-checkbox__input';
-                //input.addEventListener('change', selectionChangeHandler, false);
-                label.appendChild(input);
-                
-                checkbox = document.createElement('span') as HTMLSpanElement;
-                checkbox.className = 'mdl-checkbox__label';
-                //checkbox.addEventListener('mouseover', mouseOverHandler, false);
-                //checkbox.addEventListener('mouseout', mouseOutHandler, false);
-                label.appendChild(checkbox);
-                
-                textNode = document.createTextNode('') as Text;
-                checkbox.appendChild(textNode);
-                
-                positioner = element;
-                positioner.style.position = 'relative';
-                (input as WrappedHTMLElement).flexjs_wrapper = this;
-                (checkbox as WrappedHTMLElement).flexjs_wrapper = this;
-                element.flexjs_wrapper = this;
-                
-                className = typeNames = 'mdl-checkbox mdl-js-checkbox';
+            label = document.createElement('label') as HTMLLabelElement;
+            element = label as WrappedHTMLElement;
+            
+            input = document.createElement('input') as HTMLInputElement;
+            input.type = 'checkbox';    
+            input.className = 'mdl-checkbox__input';
+            label.appendChild(input);
+            
+            checkbox = document.createElement('span') as HTMLSpanElement;
+            checkbox.className = 'mdl-checkbox__label';
+            label.appendChild(checkbox);
+            
+            textNode = document.createTextNode('') as Text;
+            checkbox.appendChild(textNode);
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            (input as WrappedHTMLElement).flexjs_wrapper = this;
+            (checkbox as WrappedHTMLElement).flexjs_wrapper = this;
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = 'mdl-checkbox mdl-js-checkbox';
 
-                return element;
-            };
-        
-        
-        /**
-         */
-        private function mouseOverHandler(event:Event):void
-        {
-            //checkbox.className = 'checkbox-icon-hover';
-        }
-        
-        /**
-         */
-        private function mouseOutHandler(event:Event):void
-        {
-            /*if (input.checked)
-                checkbox.className = 'checkbox-icon-checked';
-            else
-                checkbox.className = 'checkbox-icon';*/
-        }
-        
-        
-        /**
-         */
-        private function selectionChangeHandler(event:Event):void
-        {
-            /*if (input.checked)
-                checkbox.className = 'checkbox-icon-checked';
-            else
-                checkbox.className = 'checkbox-icon';*/
-        }
-        
+            return element;
+        };
         
         public function get text():String
         {
@@ -150,10 +117,6 @@ package org.apache.flex.mdl
         public function set selected(value:Boolean):void
         {
             input.checked = value;
-            /*if (value)
-                checkbox.className = 'checkbox-icon-checked';
-            else
-                checkbox.className = 'checkbox-icon';*/
         }
     }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272857bc/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
index 46067ff..fcec373 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
@@ -46,6 +46,24 @@ package org.apache.flex.mdl.beads
 		{
 		}
 		
+		private var _disabled:Boolean = true;
+        /**
+		 *  A boolean flag to enable or disable the host control.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get disabled():Boolean
+        {
+            return _disabled;
+        }
+        public function set disabled(value:Boolean):void
+        {
+            _disabled = value; 
+        }
+
 		private var _strand:IStrand;
 		
 		/**
@@ -69,7 +87,7 @@ package org.apache.flex.mdl.beads
                 //if (host.element is HTMLInputElement)
                 //{
                     input = host.element as HTMLInputElement;
-                    input.disabled = "disabled";
+                    //input.disabled = _disabled ? "disabled" : "";
                 //} else
                 //{
                  //   throw new Error("Host element component in not type input");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272857bc/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
index ae61dc6..8e538a1 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
@@ -21,10 +21,9 @@
 @namespace "library://ns.apache.org/flexjs/basic";
 @namespace mdl "library://ns.apache.org/flexjs/mdl";
 
-.flexjs *, . flexjs *:before, . flexjs *:after {
-    -moz-box-sizing: border-box;
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
+mdl|CheckBox
+{
+    IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");			
 }
 
 


[27/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Disabled bead

Posted by ca...@apache.org.
Disabled bead


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

Branch: refs/heads/feature/mdl
Commit: 77e03cff7cfc4863cbd0643039242776aa3143b9
Parents: f5a37d4
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 23:19:29 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  3 +-
 .../flex/org/apache/flex/mdl/beads/Disabled.as  | 80 ++++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |  1 +
 3 files changed, 83 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77e03cff/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 0507f21..472f556 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -65,10 +65,11 @@ limitations under the License.
                             <mdl:ButtonEffect raised="true" ripple="true" accent="true"/>
                         </js:beads>
                     </mdl:Button>
-                    <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
+                    <!-- Raised disabled button-->
                     <mdl:Button text="BUTTON">
                         <js:beads>
                             <mdl:ButtonEffect raised="true"/>
+                            <mdl:Disabled/>
                         </js:beads>
                     </mdl:Button>
                 </js:HContainer>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77e03cff/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
new file mode 100644
index 0000000..46067ff
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/Disabled.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+	
+	/**
+	 *  The Disabled bead class is a specialty bead that can be used to disable a MDL control.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Disabled implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Disabled()
+		{
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion HTMLInputElement
+		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+				var host:UIBase = value as UIBase;
+                var input:HTMLInputElement;
+                //if (host.element is HTMLInputElement)
+                //{
+                    input = host.element as HTMLInputElement;
+                    input.disabled = "disabled";
+                //} else
+                //{
+                 //   throw new Error("Host element component in not type input");
+                //}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/77e03cff/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 8d30325..2d14e56 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -29,5 +29,6 @@
     <component id="MDLEffect" class="org.apache.flex.mdl.beads.MDLEffect"/>
     <component id="ButtonEffect" class="org.apache.flex.mdl.beads.ButtonEffect"/>
     <component id="TextInputEffect" class="org.apache.flex.mdl.beads.TextInputEffect"/>
+    <component id="Disabled" class="org.apache.flex.mdl.beads.Disabled"/>
 
 </componentPackage>


[24/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL TextPromptBead in place

Posted by ca...@apache.org.
MDL TextPromptBead in place


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

Branch: refs/heads/feature/mdl
Commit: 148b5bb9e565a9a503a1e83de9ef565056bd3f99
Parents: 8a14286
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 12:29:26 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  12 +-
 .../src/main/flex/MDLClasses.as                 |   2 +-
 .../main/flex/org/apache/flex/mdl/TextInput.as  |  16 +-
 .../org/apache/flex/mdl/beads/TextPromptBead.as | 151 +++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |   1 +
 5 files changed, 178 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/148b5bb9/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 3924dba..9f1be78 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -55,8 +55,16 @@ limitations under the License.
                 </js:HContainer>
 
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
-                <mdl:TextInput id="mdlti" text="Normal Text Field..." change="mdlchk.text = mdlti.text"/>
-                <mdl:TextInput text="Floating Label" mdlEffect="mdl-textfield--floating-label" />
+                <mdl:TextInput id="mdlti" change="mdlchk.text = mdlti.text">
+                    <js:beads>
+                        <mdl:TextPromptBead prompt="Normal Text Field..."/>
+                    </js:beads>
+                </mdl:TextInput>
+                <mdl:TextInput mdlEffect="mdl-textfield--floating-label">
+                    <js:beads>
+                        <mdl:TextPromptBead prompt="Floating Label"/>
+                    </js:beads>
+                </mdl:TextInput>
 
                 <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
                 <mdl:CheckBox id="mdlchk" text="Disabled at start" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/148b5bb9/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
index 733728e..c0ea571 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
@@ -29,7 +29,7 @@ internal class MDLClasses
 {	
 	COMPILE::SWF
 	{
-		//import org.apache.flex.flat.beads.CSSScrollBarView; CSSScrollBarView;
+		//import org.apache.flex.mdl.beads.TextPromptBead; TextPromptBead;
 	}
 }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/148b5bb9/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
index 87f9c5a..c8244a4 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -17,6 +17,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
+    import org.apache.flex.core.ITextModel;
+	import org.apache.flex.events.Event;
 	import org.apache.flex.html.TextInput;
 
     COMPILE::JS
@@ -52,6 +54,16 @@ package org.apache.flex.mdl
         COMPILE::JS
         {
             private var _textNode:Text;
+
+            public function get textNode():Text
+            {
+                return _textNode;
+            }
+
+            public function set textNode(value:Text):void
+            {
+                _textNode = value;
+            }
         }
         
         /**
@@ -78,7 +90,7 @@ package org.apache.flex.mdl
             var label:HTMLLabelElement = document.createElement('label') as HTMLLabelElement;
             label.className = "mdl-textfield__label";
 
-            var textNode:Text = document.createTextNode('') as Text;
+            textNode = document.createTextNode('') as Text;
             label.appendChild(textNode);
             
             div.appendChild(input);
@@ -110,5 +122,7 @@ package org.apache.flex.mdl
                 positioner.className = positioner.className + " " + _mdlEffect;
             }
         }
+
+        
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/148b5bb9/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as
new file mode 100644
index 0000000..1c1e8fb
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as
@@ -0,0 +1,151 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	COMPILE::SWF
+	{
+		import flash.text.TextFieldType;			
+		
+		import org.apache.flex.core.CSSTextField;
+	}
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+
+    import org.apache.flex.mdl.TextInput;
+	
+	/**
+	 *  The TextPromptBead class is a specialty bead that can be used with
+	 *  any TextInput control. The bead places a string into the input field
+	 *  when there is no value associated with the text property.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class TextPromptBead implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function TextPromptBead()
+		{
+		}
+		
+		private var _prompt:String;
+		
+		/**
+		 *  The string to use as the placeholder prompt.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get prompt():String
+		{
+			return _prompt;
+		}
+		public function set prompt(value:String):void
+		{
+			_prompt = value;
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion HTMLInputElement
+		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::SWF
+			{
+				// listen for changes in text to hide or show the prompt
+				var model:Object = UIBase(_strand).model;
+				if (!model.hasOwnProperty("text")) {
+					throw new Error("Model requires a text property when used with TextPromptBead");
+				}
+				IEventDispatcher(model).addEventListener("textChange", handleTextChange);
+				
+				// create a TextField that displays the prompt - it shows
+				// and hides based on the model's content
+				promptField = new CSSTextField();
+				promptField.selectable = false;
+				promptField.type = TextFieldType.DYNAMIC;
+				promptField.mouseEnabled = false;
+				promptField.multiline = false;
+				promptField.wordWrap = false;
+				promptField.textColor = 0xBBBBBB;
+				
+				// trigger the event handler to display if needed
+				handleTextChange(null);					
+			}
+			COMPILE::JS
+			{
+				var mdlTi:TextInput = value as TextInput;
+                mdlTi.textNode.nodeValue = prompt;
+				//var e:HTMLInputElement = host.element as HTMLInputElement;
+				//e.placeholder = prompt;
+			}
+		}
+		
+		COMPILE::SWF
+		private var promptField:CSSTextField;
+		private var promptAdded:Boolean;
+		
+		/**
+		 * @private
+		 */
+		COMPILE::SWF
+		private function handleTextChange( event:Event ):void
+		{	
+			// see what the model currently has to determine if the prompt should be
+			// displayed or not.
+			var model:Object = UIBase(_strand).model;
+			
+			if (model.text != null && model.text.length > 0 ) {
+				if (promptAdded) UIBase(_strand).removeChild(promptField);
+				promptAdded = false;
+			}
+			else {
+				if (!promptAdded) UIBase(_strand).addChild(promptField);
+				promptField.text = prompt;
+				promptAdded = true;
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/148b5bb9/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 6dcb073..9f47fea 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -25,5 +25,6 @@
     <component id="TextInput" class="org.apache.flex.mdl.TextInput"/>
     <component id="CheckBox" class="org.apache.flex.mdl.CheckBox"/>
     <component id="RadioButton" class="org.apache.flex.mdl.RadioButton"/>
+    <component id="TextPromptBead" class="org.apache.flex.mdl.beads.TextPromptBead"/>
 
 </componentPackage>


[03/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Card component and subcomponents

Posted by ca...@apache.org.
Card component and subcomponents


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

Branch: refs/heads/feature/mdl
Commit: aca1b1a6b89e22e9933cd934a8d8f39272e9ecee
Parents: c500c2f
Author: Carlos Rovira <ca...@apache.org>
Authored: Thu Nov 3 23:20:52 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/pom.xml              |  6 --
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 36 +++++--
 .../src/main/resources/mdl-styles.css           |  7 ++
 .../src/main/flex/org/apache/flex/mdl/Card.as   | 81 ++++++++++++++++
 .../flex/org/apache/flex/mdl/CardActions.as     | 80 ++++++++++++++++
 .../main/flex/org/apache/flex/mdl/CardMedia.as  | 80 ++++++++++++++++
 .../org/apache/flex/mdl/CardSupportingText.as   | 80 ++++++++++++++++
 .../main/flex/org/apache/flex/mdl/CardTitle.as  | 80 ++++++++++++++++
 .../org/apache/flex/mdl/beads/CardEffect.as     | 98 ++++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |  6 ++
 10 files changed, 539 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/examples/flexjs/MDLExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/pom.xml b/examples/flexjs/MDLExample/pom.xml
index 17fc28d..3a31b25 100644
--- a/examples/flexjs/MDLExample/pom.xml
+++ b/examples/flexjs/MDLExample/pom.xml
@@ -57,12 +57,6 @@
               <outputJavaScript>true</outputJavaScript>
               <htmlTemplate>${basedir}/src/main/resources/mdl-js-index-template.html</htmlTemplate>
               <additionalCompilerOptions>-compiler.exclude-defaults-css-files=HTML-0.8.0-SNAPSHOT.swc:defaults.css</additionalCompilerOptions>
-              <includeFiles>
-                <include-file>
-                  <name>mdl-styles.css</name>
-                  <path>../src/main/resources/mdl-styles.css</path>
-                </include-file>
-              </includeFiles>
             </configuration>
           </execution>
         </executions>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/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 8b3ebbc..dff092f 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -27,6 +27,8 @@ limitations under the License.
         <js:SimpleCSSValuesImpl />
     </js:valuesImpl>
 
+     <fx:Style source="../../main/resources/mdl-styles.css"/>
+
     <js:initialView>
         <js:View>
             
@@ -122,17 +124,33 @@ limitations under the License.
                     </js:beads>
                 </mdl:Button>
 
-                <mdl:Button text="TYPE TEXT" click="badge1.type = 1">
-                    <js:beads>
-                        <mdl:ButtonEffect raised="true" colored="false"/>
-                    </js:beads>
-                </mdl:Button>
-
-                <mdl:Button text="TYPE CONTAINER" click="badge1.type = 2; badge1.text='account_box'">
+                <mdl:Card>
                     <js:beads>
-                        <mdl:ButtonEffect raised="true" accent="true"/>
+                        <mdl:CardEffect shadow4dp="true"/>
                     </js:beads>
-                </mdl:Button>
+                    <mdl:CardTitle>
+                        <js:Label text="My Card Title"/>
+                    </mdl:CardTitle>
+                    <mdl:CardMedia>
+                        <js:Image url="../../../../src/main/resources/Unknown.jpeg"  height="140"/>
+                    </mdl:CardMedia>
+                    <mdl:CardSupportingText>
+                        <js:Label text="This text might describe the photo and provide further information, such as where and when it was taken."/>
+                    </mdl:CardSupportingText>
+                    <mdl:CardActions>
+                        <mdl:Button text="TYPE TEXT" click="badge1.type = 1">
+                            <js:beads>
+                                <mdl:ButtonEffect raised="true" colored="false"/>
+                            </js:beads>
+                        </mdl:Button>
+
+                        <mdl:Button text="TYPE CONTAINER" click="badge1.type = 2; badge1.text='account_box'">
+                            <js:beads>
+                                <mdl:ButtonEffect raised="true" accent="true"/>
+                            </js:beads>
+                        </mdl:Button>
+                    </mdl:CardActions>
+                </mdl:Card>
 
             </js:Form>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
index 3da8515..42db67d 100644
--- a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
@@ -32,3 +32,10 @@ Application
 	padding: 10px;
 	margin: 10px;
 }
+
+Image
+{
+	vertical-align: top;
+	IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageModel");
+	IBeadView:  ClassReference("org.apache.flex.html.beads.ImageView");
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/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
new file mode 100644
index 0000000..c8c1dd2
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Card.as
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The Card class is a Container component capable of parenting other
+	 *  four components (CardTitle, CardMedia, CardSupportingText and CardActions. 
+     *  The Panel uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model for the Card.
+	 *  org.apache.flex.core.IBeadView: creates the parts of the Card.
+	 *  
+	 *  @see PanelWithControlBar
+	 *  @see ControlBar
+	 *  @see TitleBar
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Card extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Card()
+		{
+			super();
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            
+            positioner = element;
+            
+            // absolute positioned children need a non-null
+            // position value in the parent.  It might
+            // get set to 'absolute' if the container is
+            // also absolutely positioned
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = "mdl-card";
+
+            return element;
+        }    
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/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
new file mode 100644
index 0000000..5328dc8
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardActions.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The CardActions class is a Container component capable of parenting other. 
+     *  The Panel uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model for the Card.
+	 *  org.apache.flex.core.IBeadView: creates the parts of the Card.
+	 *  
+	 *  @see PanelWithControlBar
+	 *  @see ControlBar
+	 *  @see TitleBar
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class CardActions extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function CardActions()
+		{
+			super();
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            
+            positioner = element;
+            
+            // absolute positioned children need a non-null
+            // position value in the parent.  It might
+            // get set to 'absolute' if the container is
+            // also absolutely positioned
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = "mdl-card__actions";
+
+            return element;
+        }    
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/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
new file mode 100644
index 0000000..dba03b9
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardMedia.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The CardMedia class is a Container component capable of parenting other. 
+     *  The Panel uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model for the Card.
+	 *  org.apache.flex.core.IBeadView: creates the parts of the Card.
+	 *  
+	 *  @see PanelWithControlBar
+	 *  @see ControlBar
+	 *  @see TitleBar
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class CardMedia extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function CardMedia()
+		{
+			super();
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            
+            positioner = element;
+            
+            // absolute positioned children need a non-null
+            // position value in the parent.  It might
+            // get set to 'absolute' if the container is
+            // also absolutely positioned
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = "mdl-card__media";
+
+            return element;
+        }    
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/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
new file mode 100644
index 0000000..19b2259
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardSupportingText.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The CardSupportingText class is a Container component capable of parenting other. 
+     *  The Panel uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model for the Card.
+	 *  org.apache.flex.core.IBeadView: creates the parts of the Card.
+	 *  
+	 *  @see PanelWithControlBar
+	 *  @see ControlBar
+	 *  @see TitleBar
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class CardSupportingText extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function CardSupportingText()
+		{
+			super();
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            
+            positioner = element;
+            
+            // absolute positioned children need a non-null
+            // position value in the parent.  It might
+            // get set to 'absolute' if the container is
+            // also absolutely positioned
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = "mdl-card__supporting-text";
+
+            return element;
+        }    
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/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
new file mode 100644
index 0000000..b948ce4
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CardTitle.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The CardTitle class is a Container component capable of parenting other. 
+     *  The Panel uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model for the Card.
+	 *  org.apache.flex.core.IBeadView: creates the parts of the Card.
+	 *  
+	 *  @see PanelWithControlBar
+	 *  @see ControlBar
+	 *  @see TitleBar
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class CardTitle extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function CardTitle()
+		{
+			super();
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            
+            positioner = element;
+            
+            // absolute positioned children need a non-null
+            // position value in the parent.  It might
+            // get set to 'absolute' if the container is
+            // also absolutely positioned
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = "mdl-card__title";
+
+            return element;
+        }    
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
new file mode 100644
index 0000000..9045d91
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IBead;
+	import org.apache.flex.mdl.Card;
+	
+	
+	/**
+	 *  The CardEffect class is a specialty bead that can be used with
+	 *  a MDL Card control to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class CardEffect implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function CardEffect()
+		{
+		}
+
+		private var _shadow4dp:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-shadow--4dp" effect selector.
+		 *  Applies open-circle effect to badge
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get shadow4dp():Boolean
+        {
+            return _shadow4dp;
+        }
+        public function set shadow4dp(value:Boolean):void
+        {
+            if(value) {
+                _shadow4dp = " mdl-shadow--4dp";
+            } else {
+                _shadow4dp = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+				if (value is Card) {
+					var card:Card = value as Card;
+					card.className =  _shadow4dp;
+				} else {
+					throw new Error("Host component must be an MDL Card.");
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/aca1b1a6/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index f60da64..de6554b 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -33,5 +33,11 @@
     <component id="Slider" class="org.apache.flex.mdl.Slider"/>
     <component id="Badge" class="org.apache.flex.mdl.Badge"/>
     <component id="BadgeEffect" class="org.apache.flex.mdl.beads.BadgeEffect"/>
+    <component id="Card" class="org.apache.flex.mdl.Card"/>
+    <component id="CardTitle" class="org.apache.flex.mdl.CardTitle"/>
+    <component id="CardSupportingText" class="org.apache.flex.mdl.CardSupportingText"/>
+    <component id="CardMedia" class="org.apache.flex.mdl.CardMedia"/>
+    <component id="CardActions" class="org.apache.flex.mdl.CardActions"/>
+    <component id="CardEffect" class="org.apache.flex.mdl.beads.CardEffect"/>
 
 </componentPackage>


[12/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Introducing js:Form

Posted by ca...@apache.org.
Introducing js:Form


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

Branch: refs/heads/feature/mdl
Commit: 70074e362f805764c0e212b0f714c07f386d8c64
Parents: 3a86736
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 11:54:29 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/App.mxml | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/70074e36/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 37e9e6a..b94a0d7 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -56,11 +56,12 @@ limitations under the License.
             </js:Container>
 
             <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
-            <js:Container className="mdl-textfield mdl-js-textfield">
-                <js:TextInput className="mdl-textfield__input" id="sample1"/>
-                <js:Label className="mdl-textfield__label" text="Text..."/>
-            </js:Container>
-
+            <js:Form action="http://www.google.com">
+                <js:Container className="mdl-textfield mdl-js-textfield">
+                    <js:TextInput className="mdl-textfield__input" id="sample1"/>
+                    <js:Label className="mdl-textfield__label" text="Text..."/>
+                </js:Container>
+            </js:Form>
             
         </js:View>
     </js:initialView>


[08/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Add MDL module to pom

Posted by ca...@apache.org.
Add MDL module to pom


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

Branch: refs/heads/feature/mdl
Commit: 6f65480ef37c3948b6b6dc4835fb0d405a98d1a7
Parents: cc77f4c
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Oct 14 20:52:53 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 frameworks/projects/pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6f65480e/frameworks/projects/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/pom.xml b/frameworks/projects/pom.xml
index 63d5252..653e34a 100644
--- a/frameworks/projects/pom.xml
+++ b/frameworks/projects/pom.xml
@@ -48,6 +48,7 @@
     <module>HTML5</module>
     <module>JQuery</module>
     <module>Language</module>
+    <module>MaterialDesignLite</module>
     <module>Mobile</module>
     <module>Network</module>
     <module>Reflection</module>


[21/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Remove css defaults fro HTML.swc and some update to actual components implementation fixing styles and behaviors

Posted by ca...@apache.org.
Remove css defaults fro HTML.swc and some update to actual components implementation fixing styles and behaviors


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

Branch: refs/heads/feature/mdl
Commit: 713fdbdb5849158adfaff883e42e7ce4221c37f5
Parents: 892b128
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 24 20:19:06 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/pom.xml              |  1 +
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 18 +++++------
 .../src/main/flex/org/apache/flex/mdl/Button.as | 13 ++++----
 .../main/flex/org/apache/flex/mdl/CheckBox.as   | 32 +++++++++++++++++--
 .../flex/org/apache/flex/mdl/RadioButton.as     | 33 ++++++++++++++++++--
 .../main/flex/org/apache/flex/mdl/TextInput.as  | 18 +++++------
 6 files changed, 82 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/713fdbdb/examples/flexjs/MDLExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/pom.xml b/examples/flexjs/MDLExample/pom.xml
index 207dab5..3a31b25 100644
--- a/examples/flexjs/MDLExample/pom.xml
+++ b/examples/flexjs/MDLExample/pom.xml
@@ -56,6 +56,7 @@
             <configuration>
               <outputJavaScript>true</outputJavaScript>
               <htmlTemplate>${basedir}/src/main/resources/mdl-js-index-template.html</htmlTemplate>
+              <additionalCompilerOptions>-compiler.exclude-defaults-css-files=HTML-0.8.0-SNAPSHOT.swc:defaults.css</additionalCompilerOptions>
             </configuration>
           </execution>
         </executions>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/713fdbdb/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 636b72b..a50dbeb 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -33,11 +33,9 @@ limitations under the License.
             <js:Form action="#"> 
 
                 <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
-                <js:Container>
-                    <js:beads>
-                        <js:HorizontalLayout />
-                    </js:beads>
-                    
+                <js:HContainer>
+                    <mdl:Button/>
+
                     <!-- Fab button -->
                     <mdl:Button mdlEffect="mdl-button--fab mdl-button--colored">
                         <i class="material-icons">add</i>
@@ -54,23 +52,23 @@ limitations under the License.
                     <mdl:Button mdlEffect="mdl-button--raised mdl-js-ripple-effect mdl-button--accent" text="BUTTON"/>
                     <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
                     <mdl:Button mdlEffect="mdl-button--raised" text="BUTTON"/>
-                </js:Container>
+                </js:HContainer>
 
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
-                <mdl:TextInput id="mdlti"  change="mdlchk.text = mdlti.text" text="Text..."/>
+                <mdl:TextInput id="mdlti" change="mdlchk.text = mdlti.text" text="Text..."/>
 
                 <mdl:TextInput  mdlEffect="mdl-textfield--floating-label" text="Floating Label"/>
 
                 <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
-                <mdl:CheckBox id="mdlchk" text="This Checks" selected="true"/>
+                <mdl:CheckBox id="mdlchk" text="This Checks" selected="true" mdlEffect="mdl-js-ripple-effect"/>
                 <mdl:CheckBox id="mdlchk1" text="This is disabled at start" />
                 
-                <mdl:RadioButton groupName="g1" text="Black"/>
+                <mdl:RadioButton groupName="g1" text="Black" mdlEffect="mdl-js-ripple-effect"/>
                 <mdl:RadioButton groupName="g1" text="White"/>
                 <mdl:RadioButton groupName="g1" text="Red"/>
 
             </js:Form>
-            
+
         </js:View>
     </js:initialView>
 </js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/713fdbdb/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 61bcc20..7c17757 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
@@ -63,20 +63,19 @@ package org.apache.flex.mdl
             positioner.style.position = 'relative';
             element.flexjs_wrapper = this;
 
-            element.className = 'mdl-button mdl-js-button';
-			className = "";
-			typeNames = "MDLButton";
-			return element;
+			className = typeNames = "mdl-button mdl-js-button";
+			
+            return element;
 		}
 
-        public static const RAISED_EFFECT:String = "mdl-button--raised";
+        /*public static const RAISED_EFFECT:String = "mdl-button--raised";
         public static const FAB_EFFECT:String = "mdl-button--fab";
         public static const MINI_FAB_EFFECT:String = "mdl-button--mini-fab";
         public static const ICON_EFFECT:String = "mdl-button--icon";
         public static const COLORED_EFFECT:String = "mdl-button--colored";
         public static const PRIMARY_EFFECT:String = "mdl-button--primary";
         public static const ACCENT_EFFECT:String = "mdl-button--accent";
-        public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";
+        public static const RIPPLE_EFFECT:String = "mdl-js-ripple-effect";*/
 
         private var _mdlEffect:String = "";
 
@@ -90,7 +89,7 @@ package org.apache.flex.mdl
             _mdlEffect = value;
             COMPILE::JS 
             {
-                element.className = 'mdl-button mdl-js-button ' + _mdlEffect;
+                className = _mdlEffect;
             }
         }
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/713fdbdb/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 082b99f..60db161 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
@@ -53,6 +53,18 @@ package org.apache.flex.mdl
 		{
 			super();
 		}
+
+        private var _mdlEffect:String = "";
+
+        public function get mdlEffect():String
+        {
+            return _mdlEffect;
+        }
+        
+        public function set mdlEffect(value:String):void
+        {
+            _mdlEffect = value;
+        }
 	}
     
     COMPILE::JS
@@ -74,7 +86,6 @@ package org.apache.flex.mdl
         override protected function createElement():WrappedHTMLElement
         {
                 label = document.createElement('label') as HTMLLabelElement;
-                label.className = 'mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect';
                 element = label as WrappedHTMLElement;
                 
                 input = document.createElement('input') as HTMLInputElement;
@@ -91,8 +102,6 @@ package org.apache.flex.mdl
                 
                 textNode = document.createTextNode('') as Text;
                 checkbox.appendChild(textNode);
-                //label.className = 'CheckBox';
-                typeNames = 'CheckBox';
                 
                 positioner = element;
                 positioner.style.position = 'relative';
@@ -100,6 +109,8 @@ package org.apache.flex.mdl
                 (checkbox as WrappedHTMLElement).flexjs_wrapper = this;
                 element.flexjs_wrapper = this;
                 
+                className = typeNames = 'mdl-checkbox mdl-js-checkbox';
+
                 return element;
             };
         
@@ -157,6 +168,21 @@ package org.apache.flex.mdl
                 checkbox.className = 'checkbox-icon';*/
         }
 
+        private var _mdlEffect:String = "";
+
+        public function get mdlEffect():String
+        {
+            return _mdlEffect;
+        }
+        
+        public function set mdlEffect(value:String):void
+        {
+            _mdlEffect = value;
+            COMPILE::JS 
+            {
+                className = _mdlEffect;
+            }
+        }
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/713fdbdb/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 d7e9b2f..d19ce78 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
@@ -52,6 +52,18 @@ package org.apache.flex.mdl
 		{
 			super();
 		}
+
+        private var _mdlEffect:String = "";
+
+        public function get mdlEffect():String
+        {
+            return _mdlEffect;
+        }
+        
+        public function set mdlEffect(value:String):void
+        {
+            _mdlEffect = value;
+        }
 	}
     
     COMPILE::JS
@@ -91,15 +103,12 @@ package org.apache.flex.mdl
             textNode = document.createTextNode('') as Text;
             
             label = document.createElement('label') as HTMLLabelElement;
-            label.className = "mdl-radio mdl-js-radio mdl-js-ripple-effect";
             label.appendChild(input);
             label.appendChild(radio);
             radio.appendChild(textNode);
             label.style.position = 'relative';
             
             element = label as WrappedHTMLElement;
-            //element.className = 'RadioButton';
-            typeNames = 'RadioButton';
             
             positioner = element;
             positioner.style.position = 'relative';
@@ -108,6 +117,8 @@ package org.apache.flex.mdl
             element.flexjs_wrapper = this;
             (textNode as WrappedHTMLElement).flexjs_wrapper = this;
             
+            className = typeNames = 'mdl-radio mdl-js-radio';
+            
             return element;
         };
         
@@ -244,6 +255,22 @@ package org.apache.flex.mdl
             }
         }
 
+        private var _mdlEffect:String = "";
+
+        public function get mdlEffect():String
+        {
+            return _mdlEffect;
+        }
+        
+        public function set mdlEffect(value:String):void
+        {
+            _mdlEffect = value;
+            COMPILE::JS 
+            {
+                className = _mdlEffect;
+            }
+        }
+
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/713fdbdb/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
index 48d71bf..b387b81 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -70,7 +70,6 @@ package org.apache.flex.mdl
             var textNode:Text;
             
             div = document.createElement('div') as HTMLDivElement;
-            div.className = "mdl-textfield mdl-js-textfield";
 
             input = document.createElement('input') as HTMLInputElement;
             input.setAttribute('type', 'text');
@@ -86,9 +85,7 @@ package org.apache.flex.mdl
             div.appendChild(label);
 
             element = div as WrappedHTMLElement;
-            //element.className = 'TextInput';
-            typeNames = 'TextInput';
-
+            
             //attach input handler to dispatch flexjs change event when user write in textinput
             //goog.events.listen(element, 'change', killChangeHandler);
             goog.events.listen(input, 'input', textChangeHandler);
@@ -100,6 +97,8 @@ package org.apache.flex.mdl
             (label as WrappedHTMLElement).flexjs_wrapper = this;
             element.flexjs_wrapper = this;
             
+            className = typeNames = "mdl-textfield mdl-js-textfield";
+
             return element;
         }        
         
@@ -115,25 +114,24 @@ package org.apache.flex.mdl
             _mdlEffect = value;
             COMPILE::JS 
             {
-                element.className = 'mdl-textfield mdl-js-textfield ' + _mdlEffect;
+                className = _mdlEffect;
             }
         }
 
         /**
          *  @private
-         *  @flexjsignorecoercion HTMLInputElement
          */
 		override public function set text(value:String):void
 		{
-            COMPILE::SWF
-            {
+            //COMPILE::SWF
+            //{
                 //inSetter = true;
                 //ITextModel(model).text = value;
                 //inSetter = false;                    
-            }
+            //}
             COMPILE::JS
             {
-                _textNode.text = value;
+                _textNode.nodeValue = value;
                 dispatchEvent(new Event('textChange'));
             }
 		}


[36/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Update example to new js html tags

Posted by ca...@apache.org.
Update example to new js html tags


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

Branch: refs/heads/feature/mdl
Commit: 91ad07903de19a07c3445daa15e7daedf698576f
Parents: 88d9b14
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Nov 4 17:09:13 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/App.mxml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/91ad0790/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 df452e6..34aacb8 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -109,17 +109,17 @@ limitations under the License.
                 <mdl:Slider minimum="0" maximum="10" value="2" stepSize="2" width="200"/>
 
                 <js:VContainer>
-                    <js:Anchor text="This is a Badge" href="http://flex.apache.org">
+                    <js:A text="This is a Badge" href="http://flex.apache.org">
                         <js:beads>
                             <mdl:Badge dataBadge="5" overlap="true" noBackground="true"/>
                         </js:beads>
-                    </js:Anchor>
+                    </js:A>
 
-                    <js:Anchor id="badge1" text="Loving this." href="http://flex.apache.org">
+                    <js:A id="badge1" text="Loving this." href="http://flex.apache.org">
                         <js:beads>
                             <mdl:Badge dataBadge="1"/>
                         </js:beads>
-                    </js:Anchor>
+                    </js:A>
                 </js:VContainer>
 
                 <mdl:Card width="512">
@@ -127,7 +127,7 @@ limitations under the License.
                         <mdl:CardEffect shadow="2"/>
                     </js:beads>
                     <mdl:CardTitle style="color: #666;height: 176px; background-image: url('../../../../src/main/resources/Unknown.jpeg') center / cover;">
-                        <js:Label text="Welcome" className="mdl-card__title-text"/>
+                        <js:H2 text="Welcome" className="mdl-card__title-text"/>
                     </mdl:CardTitle>
                     <mdl:CardMedia>
                         <js:Image url="../../../../src/main/resources/Unknown.jpg"  height="176"/>


[33/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Badge and BadgeElement

Posted by ca...@apache.org.
Badge and BadgeElement


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

Branch: refs/heads/feature/mdl
Commit: c500c2f2a7f538d2d3afb0f1a75a57ba5624cf8c
Parents: f1af621
Author: Carlos Rovira <ca...@apache.org>
Authored: Thu Nov 3 20:15:00 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  28 +++
 .../src/main/flex/org/apache/flex/mdl/Badge.as  | 233 +++++++++++++++++++
 .../src/main/flex/org/apache/flex/mdl/Slider.as |  16 +-
 .../org/apache/flex/mdl/beads/BadgeEffect.as    | 121 ++++++++++
 .../src/main/resources/mdl-manifest.xml         |   2 +
 5 files changed, 390 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c500c2f2/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 8487f5b..8b3ebbc 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -106,6 +106,34 @@ limitations under the License.
 
                 <mdl:Slider minimum="0" maximum="10" value="2" stepSize="2" width="200"/>
 
+                <js:VContainer>
+                    <mdl:Badge text="This is a Badge" dataBadge="5" linkUrl="http://flex.apache.org">
+                        <js:beads>
+                            <mdl:BadgeEffect overlap="true" noBackground="true"/>
+                        </js:beads>
+                    </mdl:Badge>
+
+                    <mdl:Badge id="badge1" text="Loving this." dataBadge="1" linkUrl="http://flex.apache.org"/>
+                </js:VContainer>
+
+                <mdl:Button text="TYPE LINK" click="badge1.type = 0">
+                    <js:beads>
+                        <mdl:ButtonEffect raised="true" colored="true"/>
+                    </js:beads>
+                </mdl:Button>
+
+                <mdl:Button text="TYPE TEXT" click="badge1.type = 1">
+                    <js:beads>
+                        <mdl:ButtonEffect raised="true" colored="false"/>
+                    </js:beads>
+                </mdl:Button>
+
+                <mdl:Button text="TYPE CONTAINER" click="badge1.type = 2; badge1.text='account_box'">
+                    <js:beads>
+                        <mdl:ButtonEffect raised="true" accent="true"/>
+                    </js:beads>
+                </mdl:Button>
+
             </js:Form>
 
         </js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c500c2f2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as
new file mode 100644
index 0000000..fa4ffd1
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Badge.as
@@ -0,0 +1,233 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.UIBase;
+
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+
+	/**
+	 *  The Badge class provides a MDL UI-like appearance for a badge.
+	 *  A Badge is an onscreen notification element consists of a small circle, 
+     *  typically containing a number or other characters, that appears in 
+     *  proximity to another object
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Badge extends UIBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Badge()
+		{
+			super();
+		}
+		
+        private var _type:Number = 0;
+        public static const LINK_TYPE:Number = 0;
+        public static const TEXT_TYPE:Number = 1;
+        public static const CONTAINER_TYPE:Number = 2;
+
+        /**
+         *  the type of badge
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get type():Number
+		{
+            return _type;   
+		}
+
+		public function set type(value:Number):void
+		{
+            _type = value;
+            
+            COMPILE::JS
+            {
+                if(value == LINK_TYPE)
+                {
+                    var link:HTMLElement = document.createElement('a') as HTMLElement;
+                    link.setAttribute('href', linkUrl);
+                    link.setAttribute('data-badge', dataBadge);
+                    link.appendChild(textNode);
+                    link.className = 'mdl-badge';
+                    
+                    element.parentNode.replaceChild(link, element);
+
+
+                    element = link as WrappedHTMLElement;
+                } 
+                else if(value == TEXT_TYPE)
+                {  
+                    var span:HTMLSpanElement = document.createElement('span') as HTMLSpanElement;
+                    span.setAttribute('data-badge', dataBadge);
+                    span.appendChild(textNode); 
+                    span.className = 'mdl-badge';
+
+                    element.parentNode.replaceChild(span, element);
+                    
+                    element = span as WrappedHTMLElement;
+                } 
+                else if(value == CONTAINER_TYPE)
+                {
+                    var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
+                    div.setAttribute('data-badge', dataBadge);
+                    div.appendChild(textNode); 
+                    div.className = 'mdl-badge material-icons';
+
+                    element.parentNode.replaceChild(div, element);
+                    
+                    element = div as WrappedHTMLElement;
+                }
+                
+                positioner = element;
+                positioner.style.position = 'relative';
+                element.flexjs_wrapper = this;
+                
+            }
+		}
+
+        private var _text:String = "";
+
+        /**
+         *  The text of the link
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get text():String
+		{
+            COMPILE::SWF
+            {
+                return _text;
+            }
+            COMPILE::JS
+            {
+                return textNode.nodeValue;
+            }
+		}
+
+		public function set text(value:String):void
+		{
+            COMPILE::SWF
+            {
+                _text = value;
+            }
+            COMPILE::JS
+            {
+                textNode.nodeValue = value;
+            }
+		}
+        
+        private var _linkUrl:String = "#";
+
+        /**
+         *  the link url
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function get linkUrl():String
+		{
+            return _linkUrl;   
+		}
+
+		public function set linkUrl(value:String):void
+		{
+            _linkUrl = value;
+            
+            COMPILE::JS
+            {
+                (element as HTMLElement).setAttribute('href', value);
+            }
+		}
+
+
+        private var _dataBadge:Number = 0;
+
+		/**
+		 *  The current value of the Badge that appers inside the circle.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get dataBadge():Number
+		{
+			return _dataBadge;
+		}
+		public function set dataBadge(value:Number):void
+		{
+			_dataBadge = value;
+
+			COMPILE::JS
+			{
+				(element as HTMLElement).setAttribute('data-badge', _dataBadge.toString());
+			}
+		}
+		
+        COMPILE::JS
+        private var textNode:Text;
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 * @flexjsignorecoercion HTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+			var a:HTMLElement = document.createElement('a') as HTMLElement;
+            a.setAttribute('href', linkUrl);
+            a.setAttribute('data-badge', dataBadge);
+
+            textNode = document.createTextNode('') as Text;
+            a.appendChild(textNode); 
+
+			element = a as WrappedHTMLElement;
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+			element.flexjs_wrapper = this;
+            
+            className = typeNames = 'mdl-badge';
+
+            return element;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c500c2f2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
index 31267ad..126ea12 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
@@ -32,14 +32,11 @@ package org.apache.flex.mdl
 	[Event(name="valueChange", type="org.apache.flex.events.Event")]
 	
 	/**
-	 *  The Slider class is a component that displays a range of values using a
-	 *  track and a thumb control. The Slider uses the following bead types:
+	 *  The Slider class provides a MDL UI-like appearance for a slider.
+	 *  It displays a range of values using a track and a thumb control. 
+	 *  The Slider uses the following bead types:
 	 * 
 	 *  org.apache.flex.core.IBeadModel: the data model, typically an IRangeModel, that holds the Slider values.
-	 *  org.apache.flex.core.IBeadView:  the bead that constructs the visual parts of the Slider.
-	 *  org.apache.flex.core.IBeadController: the bead that handles input.
-	 *  org.apache.flex.core.IThumbValue: the bead responsible for the display of the thumb control.
-	 *  org.apache.flex.core.ITrackView: the bead responsible for the display of the track.
 	 *  
 	 *  @langversion 3.0
 	 *  @playerversion Flash 10.2
@@ -60,8 +57,6 @@ package org.apache.flex.mdl
 		{
 			super();
 			
-			//className = "Slider";
-			
 			IRangeModel(model).value = 0;
 			IRangeModel(model).minimum = 0;
 			IRangeModel(model).maximum = 100;
@@ -201,12 +196,13 @@ package org.apache.flex.mdl
 
 			input = document.createElement('input') as HTMLInputElement;
 			input.type = "range";
+			input.className = 'mdl-slider mdl-js-slider';
+
 			input.value = IRangeModel(model).value.toString();
 			input.min = IRangeModel(model).minimum.toString();
 			input.max = IRangeModel(model).maximum.toString();
 			input.step = IRangeModel(model).stepSize.toString();
-			input.className = 'mdl-slider mdl-js-slider';
-
+			
 			p.appendChild(input);
 
 			element = input as WrappedHTMLElement;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c500c2f2/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as
new file mode 100644
index 0000000..0cc62a8
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/BadgeEffect.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IBead;
+	import org.apache.flex.mdl.Badge;
+	
+	
+	/**
+	 *  The BadgeEffect class is a specialty bead that can be used with
+	 *  a MDL Badge control to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class BadgeEffect implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function BadgeEffect()
+		{
+		}
+
+		private var _noBackground:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-badge--no-background" effect selector.
+		 *  Applies open-circle effect to badge
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get noBackground():Boolean
+        {
+            return _noBackground;
+        }
+        public function set noBackground(value:Boolean):void
+        {
+            if(value) {
+                _noBackground = " mdl-badge--no-background";
+            } else {
+                _noBackground = "";
+            }   
+        }
+
+        private var _overlap:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-badge--overlap" effect selector.
+		 *  Make the badge overlap with its container
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get overlap():Boolean
+        {
+            return _overlap;
+        }
+        public function set overlap(value:Boolean):void
+        {
+            if(value) {
+                _overlap = " mdl-badge--overlap";
+            } else {
+                _overlap = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+				if (value is Badge) {
+					var badge:Badge = value as Badge;
+					badge.className = _noBackground + _overlap;
+				} else {
+					throw new Error("Host component must be an MDL Badge.");
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c500c2f2/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index bf24f3b..f60da64 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -31,5 +31,7 @@
     <component id="TextInputEffect" class="org.apache.flex.mdl.beads.TextInputEffect"/>
     <component id="Disabled" class="org.apache.flex.mdl.beads.Disabled"/>
     <component id="Slider" class="org.apache.flex.mdl.Slider"/>
+    <component id="Badge" class="org.apache.flex.mdl.Badge"/>
+    <component id="BadgeEffect" class="org.apache.flex.mdl.beads.BadgeEffect"/>
 
 </componentPackage>


[05/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - More Buttons, I think we need "disabled" html attribute implementation

Posted by ca...@apache.org.
More Buttons, I think we need "disabled" html attribute implementation


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

Branch: refs/heads/feature/mdl
Commit: cb3ec1551fa3a8f258691b1e1b06996c5ceeb471
Parents: bfbfb53
Author: Carlos Rovira <ca...@apache.org>
Authored: Sun Oct 16 21:10:10 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 35 +++++++++++++++++---
 1 file changed, 31 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cb3ec155/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 b19b9b4..37e9e6a 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -30,11 +30,38 @@ limitations under the License.
     <js:initialView>
         <js:View>
             
-            <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
-               <i class="material-icons">add</i>
-            </js:TextButton>
+            <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
+            <js:Container>
+                <js:beads>
+                    <js:HorizontalLayout />
+                </js:beads>
+                            
+                <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
+                    <i class="material-icons">add</i>
+                </js:TextButton>
 
-            <mdl:Button/>
+                <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
+                    <i class="material-icons">add</i>
+                </js:TextButton>
+
+                <!-- Raised button -->
+                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
+                <!-- Raised button with ripple -->
+                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" text="BUTTON"/>
+                <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
+                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
+
+                <mdl:Button/>
+
+            </js:Container>
+
+            <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
+            <js:Container className="mdl-textfield mdl-js-textfield">
+                <js:TextInput className="mdl-textfield__input" id="sample1"/>
+                <js:Label className="mdl-textfield__label" text="Text..."/>
+            </js:Container>
+
+            
         </js:View>
     </js:initialView>
 </js:Application>


[30/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL Slider

Posted by ca...@apache.org.
MDL Slider


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

Branch: refs/heads/feature/mdl
Commit: b07b5dad1f8a7d54fa120395486177d29189f8e9
Parents: b2a31f3
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Nov 2 23:39:59 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/pom.xml              |  12 +-
 .../flexjs/MDLExample/src/main/flex/App.mxml    |   2 +
 .../main/resources/mdl-js-index-template.html   |   1 +
 .../src/main/flex/MDLClasses.as                 |  24 +-
 .../src/main/flex/org/apache/flex/mdl/Slider.as | 261 +++++++++++++++++++
 .../src/main/resources/defaults.css             |   9 +-
 .../src/main/resources/mdl-manifest.xml         |   1 +
 7 files changed, 289 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b07b5dad/examples/flexjs/MDLExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/pom.xml b/examples/flexjs/MDLExample/pom.xml
index 1503b57..17fc28d 100644
--- a/examples/flexjs/MDLExample/pom.xml
+++ b/examples/flexjs/MDLExample/pom.xml
@@ -44,12 +44,6 @@
         <configuration>
           <flashVersion>20.0</flashVersion>
           <mainClass>App.mxml</mainClass>
-          <includeFiles>
-            <include-file>
-              <name>defaults.css</name>
-              <path>../src/main/resources/defaults.css</path>
-            </include-file>
-          </includeFiles>
         </configuration>
         <executions>
           <!-- Add a second execution with output set to JavaScript (Flash is the default) -->
@@ -63,6 +57,12 @@
               <outputJavaScript>true</outputJavaScript>
               <htmlTemplate>${basedir}/src/main/resources/mdl-js-index-template.html</htmlTemplate>
               <additionalCompilerOptions>-compiler.exclude-defaults-css-files=HTML-0.8.0-SNAPSHOT.swc:defaults.css</additionalCompilerOptions>
+              <includeFiles>
+                <include-file>
+                  <name>mdl-styles.css</name>
+                  <path>../src/main/resources/mdl-styles.css</path>
+                </include-file>
+              </includeFiles>
             </configuration>
           </execution>
         </executions>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b07b5dad/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 9f76732..dca2da1 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -102,6 +102,8 @@ limitations under the License.
                 </mdl:RadioButton>
                 <mdl:RadioButton groupName="g1" text="Red"/>
 
+                <mdl:Slider minimum="0" maximum="100" value="0"/>
+
             </js:Form>
 
         </js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b07b5dad/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html b/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
index 9eaf780..a2ce192 100644
--- a/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
@@ -20,6 +20,7 @@
 	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 	<meta name="Custom Template for injecting custom style CSS">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 	<link rel="stylesheet" type="text/css" href="${application}.css">
   <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
   <link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.indigo-pink.min.css">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b07b5dad/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
index c0ea571..7a8d043 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/MDLClasses.as
@@ -19,19 +19,19 @@
 package
 {
 
-/**
- *  @private
- *  This class is used to link additional classes into mdl.swc
- *  beyond those that are found by dependecy analysis starting
- *  from the classes specified in manifest.xml.
- */
-internal class MDLClasses
-{	
-	COMPILE::SWF
-	{
-		//import org.apache.flex.mdl.beads.TextPromptBead; TextPromptBead;
+	/**
+	*  @private
+	*  This class is used to link additional classes into mdl.swc
+	*  beyond those that are found by dependecy analysis starting
+	*  from the classes specified in manifest.xml.
+	*/
+	internal class MDLClasses
+	{	
+		COMPILE::SWF
+		{
+			//import org.apache.flex.mdl.beads.TextPromptBead; TextPromptBead;
+		}
 	}
-}
 
 }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b07b5dad/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
new file mode 100644
index 0000000..2587227
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
@@ -0,0 +1,261 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.core.IRangeModel;
+	import org.apache.flex.core.UIBase;
+
+    COMPILE::JS
+    {
+        import org.apache.flex.html.beads.SliderTrackView;
+        import org.apache.flex.html.beads.SliderThumbView;
+        import org.apache.flex.html.beads.controllers.SliderMouseController;
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+
+	[Event(name="valueChange", type="org.apache.flex.events.Event")]
+	
+	/**
+	 *  The Slider class is a component that displays a range of values using a
+	 *  track and a thumb control. The Slider uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model, typically an IRangeModel, that holds the Slider values.
+	 *  org.apache.flex.core.IBeadView:  the bead that constructs the visual parts of the Slider.
+	 *  org.apache.flex.core.IBeadController: the bead that handles input.
+	 *  org.apache.flex.core.IThumbValue: the bead responsible for the display of the thumb control.
+	 *  org.apache.flex.core.ITrackView: the bead responsible for the display of the track.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class Slider extends UIBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function Slider()
+		{
+			super();
+			
+			//className = "Slider";
+			
+			IRangeModel(model).value = 0;
+			IRangeModel(model).minimum = 0;
+			IRangeModel(model).maximum = 100;
+			IRangeModel(model).stepSize = 1;
+			IRangeModel(model).snapInterval = 1;
+		}
+		
+		/**
+		 *  The current value of the Slider.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get value():Number
+		{
+			return IRangeModel(model).value;
+		}
+		public function set value(newValue:Number):void
+		{
+			IRangeModel(model).value = newValue;
+
+			COMPILE::JS
+			{
+				(element as HTMLInputElement).value = "" + value;
+			}
+		}
+		
+		/**
+		 *  The minimum value of the Slider.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get minimum():Number
+		{
+			return IRangeModel(model).minimum;
+		}
+		public function set minimum(value:Number):void
+		{
+			IRangeModel(model).minimum = value;
+
+			COMPILE::JS
+			{
+				(element as HTMLInputElement).min = "" + value;
+			}
+		}
+		
+		/**
+		 *  The maximum value of the Slider.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get maximum():Number
+		{
+			return IRangeModel(model).maximum;
+		}
+		public function set maximum(value:Number):void
+		{
+			IRangeModel(model).maximum = value;
+
+			COMPILE::JS
+			{
+				(element as HTMLInputElement).max = "" + value;
+			}
+			
+		}
+		
+		/**
+		 *  The modulus of the Slider value. The thumb will be positioned
+		 *  at the nearest multiple of this value.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get snapInterval():Number
+		{
+			return IRangeModel(model).snapInterval;
+		}
+		public function set snapInterval(value:Number):void
+		{
+			IRangeModel(model).snapInterval = value;
+		}
+        
+		/**
+		 *  The amount to move the thumb when the track is selected. This value is
+		 *  adjusted to fit the nearest snapInterval.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get stepSize():Number
+        {
+            return IRangeModel(model).stepSize;
+        }
+        public function set stepSize(value:Number):void
+        {
+            IRangeModel(model).stepSize = value;
+        }
+
+        COMPILE::JS
+        private var track:SliderTrackView;
+        
+        COMPILE::JS
+        private var thumb:SliderThumbView;
+        
+        COMPILE::JS
+        private var controller:SliderMouseController;
+        
+		COMPILE::JS
+		private var input:HTMLInputElement;
+
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 * @flexjsignorecoercion HTMLInputElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            input = document.createElement('input') as HTMLInputElement;
+			input.type = "range";
+			//input.min = "0";
+			//input.max = "100";
+			//input.value = "0";
+
+
+            //input.style.width = '200px';
+            //input.style.height = '30px';
+
+			element = input as WrappedHTMLElement;
+            
+            //track = new SliderTrackView();
+            //addBead(track);
+            
+            //thumb = new SliderThumbView();
+            //addBead(thumb);
+            
+            //controller = new SliderMouseController();
+            //addBead(controller);
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = 'mdl-slider mdl-js-slider';
+            
+            return element;
+        } 
+        
+        /**
+         */
+        COMPILE::JS
+        public function snap(value:Number):Number
+        {
+            var si:Number = snapInterval;
+            var n:Number = Math.round((value - minimum) / si) *
+                si + minimum;
+            if (value > 0)
+            {
+                if (value - n < n + si - value)
+                    return n;
+                return n + si;
+            }
+            if (value - n > n + si - value)
+                return n + si;
+            return n;
+        }
+        
+        
+        /**
+         * @param {number} value The value used to calculate new position of the thumb.
+         * @return {void} Moves the thumb to the corresponding position.
+         */
+        COMPILE::JS
+        public function setThumbFromValue(value:Number):void
+        {
+            var min:Number = model.minimum;
+            var max:Number = model.maximum;
+            var p:Number = (value - min) / (max - min);
+            var xloc:Number = p * (parseInt(track.element.style.width, 10) -
+                parseInt(thumb.element.style.width, 10));
+            
+            thumb.element.style.left = "" + xloc + 'px';
+        }        
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b07b5dad/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
index 8e538a1..1d2ef51 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/defaults.css
@@ -18,13 +18,16 @@
  */
 
 
-@namespace "library://ns.apache.org/flexjs/basic";
-@namespace mdl "library://ns.apache.org/flexjs/mdl";
+@namespace "library://ns.apache.org/flexjs/mdl";
 
-mdl|CheckBox
+CheckBox
 {
     IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");			
 }
 
+Slider
+{
+    IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel");
+}
 
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b07b5dad/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 2d14e56..bf24f3b 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -30,5 +30,6 @@
     <component id="ButtonEffect" class="org.apache.flex.mdl.beads.ButtonEffect"/>
     <component id="TextInputEffect" class="org.apache.flex.mdl.beads.TextInputEffect"/>
     <component id="Disabled" class="org.apache.flex.mdl.beads.Disabled"/>
+    <component id="Slider" class="org.apache.flex.mdl.Slider"/>
 
 </componentPackage>


[20/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Text Input with floating text

Posted by ca...@apache.org.
Text Input with floating text


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

Branch: refs/heads/feature/mdl
Commit: 892b128fdd7970c706e0e14ee4d6833a4fdec638
Parents: e625477
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 19 02:21:37 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  5 ++-
 .../main/flex/org/apache/flex/mdl/TextInput.as  | 45 +++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/892b128f/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 95dad1b..636b72b 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -57,7 +57,9 @@ limitations under the License.
                 </js:Container>
 
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
-                <mdl:TextInput id="mdlti" text="Something..." change="mdlchk.text = mdlti.text"/>
+                <mdl:TextInput id="mdlti"  change="mdlchk.text = mdlti.text" text="Text..."/>
+
+                <mdl:TextInput  mdlEffect="mdl-textfield--floating-label" text="Floating Label"/>
 
                 <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
                 <mdl:CheckBox id="mdlchk" text="This Checks" selected="true"/>
@@ -66,6 +68,7 @@ limitations under the License.
                 <mdl:RadioButton groupName="g1" text="Black"/>
                 <mdl:RadioButton groupName="g1" text="White"/>
                 <mdl:RadioButton groupName="g1" text="Red"/>
+
             </js:Form>
             
         </js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/892b128f/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
index 4617678..48d71bf 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -49,8 +49,17 @@ package org.apache.flex.mdl
 			super();
 		}
 		
+        COMPILE::JS
+        {
+            private var _textNode:Text;
+        }
+        
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         * @flexjsignorecoercion HTMLDivElement
+         * @flexjsignorecoercion HTMLInputElement
+         * @flexjsignorecoercion HTMLLabelElement
+         * @flexjsignorecoercion Text
          */
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
@@ -70,7 +79,7 @@ package org.apache.flex.mdl
             label = document.createElement('label') as HTMLLabelElement;
             label.className = "mdl-textfield__label";
             
-            textNode = document.createTextNode('') as Text;
+            _textNode = textNode = document.createTextNode('') as Text;
             label.appendChild(textNode);
             
             div.appendChild(input);
@@ -94,5 +103,39 @@ package org.apache.flex.mdl
             return element;
         }        
         
+        private var _mdlEffect:String = "";
+
+        public function get mdlEffect():String
+        {
+            return _mdlEffect;
+        }
+        
+        public function set mdlEffect(value:String):void
+        {
+            _mdlEffect = value;
+            COMPILE::JS 
+            {
+                element.className = 'mdl-textfield mdl-js-textfield ' + _mdlEffect;
+            }
+        }
+
+        /**
+         *  @private
+         *  @flexjsignorecoercion HTMLInputElement
+         */
+		override public function set text(value:String):void
+		{
+            COMPILE::SWF
+            {
+                //inSetter = true;
+                //ITextModel(model).text = value;
+                //inSetter = false;                    
+            }
+            COMPILE::JS
+            {
+                _textNode.text = value;
+                dispatchEvent(new Event('textChange'));
+            }
+		}
 	}
 }


[15/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL CheckBox impl

Posted by ca...@apache.org.
MDL CheckBox impl


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

Branch: refs/heads/feature/mdl
Commit: 272f715d9e69dacfa5a2ba431b5338701460eab4
Parents: bd9ca04
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 16:16:22 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/mdl/CheckBox.as   | 162 +++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |   1 +
 2 files changed, 163 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272f715d/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
new file mode 100644
index 0000000..082b99f
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/CheckBox.as
@@ -0,0 +1,162 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+    COMPILE::SWF
+    {
+        import org.apache.flex.html.CheckBox;            
+    }
+    COMPILE::JS
+    {
+        import org.apache.flex.core.UIBase;
+        import org.apache.flex.core.WrappedHTMLElement;
+        import org.apache.flex.events.Event;
+    }
+
+    /**
+     *  The CheckBox class provides a MDL UI-like appearance for
+     *  a CheckBox.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+    COMPILE::SWF
+	public class CheckBox extends org.apache.flex.html.CheckBox
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function CheckBox()
+		{
+			super();
+		}
+	}
+    
+    COMPILE::JS
+    public class CheckBox extends UIBase
+    {
+        
+        private var input:HTMLInputElement;
+        private var checkbox:HTMLSpanElement;
+        private var label:HTMLLabelElement;
+        private var textNode:Text;
+        
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         * @flexjsignorecoercion HTMLLabelElement
+         * @flexjsignorecoercion HTMLInputElement
+         * @flexjsignorecoercion HTMLSpanElement
+         * @flexjsignorecoercion Text
+         */
+        override protected function createElement():WrappedHTMLElement
+        {
+                label = document.createElement('label') as HTMLLabelElement;
+                label.className = 'mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect';
+                element = label as WrappedHTMLElement;
+                
+                input = document.createElement('input') as HTMLInputElement;
+                input.type = 'checkbox';
+                input.className = 'mdl-checkbox__input';
+                //input.addEventListener('change', selectionChangeHandler, false);
+                label.appendChild(input);
+                
+                checkbox = document.createElement('span') as HTMLSpanElement;
+                checkbox.className = 'mdl-checkbox__label';
+                //checkbox.addEventListener('mouseover', mouseOverHandler, false);
+                //checkbox.addEventListener('mouseout', mouseOutHandler, false);
+                label.appendChild(checkbox);
+                
+                textNode = document.createTextNode('') as Text;
+                checkbox.appendChild(textNode);
+                //label.className = 'CheckBox';
+                typeNames = 'CheckBox';
+                
+                positioner = element;
+                positioner.style.position = 'relative';
+                (input as WrappedHTMLElement).flexjs_wrapper = this;
+                (checkbox as WrappedHTMLElement).flexjs_wrapper = this;
+                element.flexjs_wrapper = this;
+                
+                return element;
+            };
+        
+        
+        /**
+         */
+        private function mouseOverHandler(event:Event):void
+        {
+            //checkbox.className = 'checkbox-icon-hover';
+        }
+        
+        /**
+         */
+        private function mouseOutHandler(event:Event):void
+        {
+            /*if (input.checked)
+                checkbox.className = 'checkbox-icon-checked';
+            else
+                checkbox.className = 'checkbox-icon';*/
+        }
+        
+        
+        /**
+         */
+        private function selectionChangeHandler(event:Event):void
+        {
+            /*if (input.checked)
+                checkbox.className = 'checkbox-icon-checked';
+            else
+                checkbox.className = 'checkbox-icon';*/
+        }
+        
+        
+        public function get text():String
+        {
+            return textNode.nodeValue;
+        }
+        
+        public function set text(value:String):void
+        {
+            textNode.nodeValue = value;
+        }
+        
+        public function get selected():Boolean
+        {
+            return input.checked;
+        }
+        
+        public function set selected(value:Boolean):void
+        {
+            input.checked = value;
+            /*if (value)
+                checkbox.className = 'checkbox-icon-checked';
+            else
+                checkbox.className = 'checkbox-icon';*/
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/272f715d/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index eb65435..ffbc9c0 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -23,5 +23,6 @@
 
     <component id="Button" class="org.apache.flex.mdl.Button"/>
     <component id="TextInput" class="org.apache.flex.mdl.TextInput"/>
+    <component id="CheckBox" class="org.apache.flex.mdl.CheckBox"/>
 
 </componentPackage>


[32/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - CardInner containers and effects

Posted by ca...@apache.org.
CardInner containers and effects


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

Branch: refs/heads/feature/mdl
Commit: 264c72945b7bcbfd367126342bd15a179b1a0a57
Parents: aca1b1a
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Nov 4 00:33:19 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 15 +--
 .../src/main/resources/mdl-styles.css           |  4 +-
 .../flex/org/apache/flex/mdl/CardActions.as     |  4 +-
 .../main/flex/org/apache/flex/mdl/CardMedia.as  |  6 +-
 .../org/apache/flex/mdl/CardSupportingText.as   |  4 +-
 .../main/flex/org/apache/flex/mdl/CardTitle.as  |  4 +-
 .../org/apache/flex/mdl/beads/CardEffect.as     | 24 ++---
 .../apache/flex/mdl/beads/CardInnerEffect.as    | 98 ++++++++++++++++++++
 .../apache/flex/mdl/supportClasses/CardInner.as | 81 ++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |  2 +
 10 files changed, 215 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/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 dff092f..9f3fb79 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -124,20 +124,23 @@ limitations under the License.
                     </js:beads>
                 </mdl:Button>
 
-                <mdl:Card>
+                <mdl:Card width="512">
                     <js:beads>
-                        <mdl:CardEffect shadow4dp="true"/>
+                        <mdl:CardEffect shadow="2"/>
                     </js:beads>
-                    <mdl:CardTitle>
-                        <js:Label text="My Card Title"/>
+                    <mdl:CardTitle style="color: #666;height: 176px; background-image: url('../../../../src/main/resources/Unknown.jpeg') center / cover;">
+                        <js:Label text="Welcome" className="mdl-card__title-text"/>
                     </mdl:CardTitle>
                     <mdl:CardMedia>
-                        <js:Image url="../../../../src/main/resources/Unknown.jpeg"  height="140"/>
+                        <js:Image url="../../../../src/main/resources/Unknown.jpeg"  height="176"/>
                     </mdl:CardMedia>
                     <mdl:CardSupportingText>
-                        <js:Label text="This text might describe the photo and provide further information, such as where and when it was taken."/>
+                        <js:MultilineLabel text="This text might describe the photo and provide further information, such as where and when it was taken."/>
                     </mdl:CardSupportingText>
                     <mdl:CardActions>
+                        <js:beads>
+                            <mdl:CardInnerEffect border="true"/>
+                        </js:beads>
                         <mdl:Button text="TYPE TEXT" click="badge1.type = 1">
                             <js:beads>
                                 <mdl:ButtonEffect raised="true" colored="false"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
index 42db67d..bd344c1 100644
--- a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
@@ -38,4 +38,6 @@ Image
 	vertical-align: top;
 	IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageModel");
 	IBeadView:  ClassReference("org.apache.flex.html.beads.ImageView");
-}
\ No newline at end of file
+}
+
+

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/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 5328dc8..c821a2b 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
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.core.ContainerBase;
+	import org.apache.flex.mdl.supportClasses.CardInner;
     
     COMPILE::JS
     {
@@ -40,7 +40,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class CardActions extends ContainerBase
+	public class CardActions extends CardInner
 	{
 		/**
 		 *  constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/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 dba03b9..278fb52 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
@@ -18,8 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.core.ContainerBase;
-    
+	import org.apache.flex.mdl.supportClasses.CardInner;
+
     COMPILE::JS
     {
         import org.apache.flex.core.WrappedHTMLElement;
@@ -40,7 +40,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class CardMedia extends ContainerBase
+	public class CardMedia extends CardInner
 	{
 		/**
 		 *  constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/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 19b2259..b087135 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
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.core.ContainerBase;
+	import org.apache.flex.mdl.supportClasses.CardInner;
     
     COMPILE::JS
     {
@@ -40,7 +40,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class CardSupportingText extends ContainerBase
+	public class CardSupportingText extends CardInner
 	{
 		/**
 		 *  constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/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 b948ce4..c2398a3 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
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.mdl
 {
-	import org.apache.flex.core.ContainerBase;
+	import org.apache.flex.mdl.supportClasses.CardInner;
     
     COMPILE::JS
     {
@@ -40,7 +40,7 @@ package org.apache.flex.mdl
 	 *  @playerversion AIR 2.6
 	 *  @productversion FlexJS 0.0
 	 */
-	public class CardTitle extends ContainerBase
+	public class CardTitle extends CardInner
 	{
 		/**
 		 *  constructor.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
index 9045d91..19e3396 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardEffect.as
@@ -46,27 +46,29 @@ package org.apache.flex.mdl.beads
 		{
 		}
 
-		private var _shadow4dp:String = "";
+		private var _shadow:Number = 0;
+		private var _shadowStyle:String = "";
         /**
 		 *  A boolean flag to activate "mdl-shadow--4dp" effect selector.
-		 *  Applies open-circle effect to badge
+		 *  Assigns variable shadow depths (0, 2, 3, 4, 6, 8, or 16) to card
 		 *
 		 *  @langversion 3.0
 		 *  @playerversion Flash 10.2
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-        public function get shadow4dp():Boolean
+        public function get shadow():Number
         {
-            return _shadow4dp;
+            return _shadow;
         }
-        public function set shadow4dp(value:Boolean):void
+        public function set shadow(value:Number):void
         {
-            if(value) {
-                _shadow4dp = " mdl-shadow--4dp";
-            } else {
-                _shadow4dp = "";
-            }   
+            if(value == 0) {
+				_shadowStyle = "";
+			} else {
+				_shadow = value;
+                _shadowStyle = " mdl-shadow--" + _shadow + "dp";
+            }  
         }
 
 		private var _strand:IStrand;
@@ -88,7 +90,7 @@ package org.apache.flex.mdl.beads
 			{
 				if (value is Card) {
 					var card:Card = value as Card;
-					card.className =  _shadow4dp;
+					card.className =  _shadowStyle;
 				} else {
 					throw new Error("Host component must be an MDL Card.");
 				}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardInnerEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardInnerEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardInnerEffect.as
new file mode 100644
index 0000000..91b366b
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/CardInnerEffect.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.IBead;
+	import org.apache.flex.mdl.supportClasses.CardInner;
+	
+	
+	/**
+	 *  The CardInnerEffect class is a specialty bead that can be used with
+	 *  a MDL Card Inner container to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class CardInnerEffect implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function CardInnerEffect()
+		{
+		}
+
+		private var _border:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-card--border" effect selector.
+		 *  Adds a border to the card section that it's applied to
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get border():Boolean
+        {
+            return _border;
+        }
+        public function set border(value:Boolean):void
+        {
+            if(value) {
+                _border = " mdl-card--border";
+            } else {
+                _border = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+				if (value is CardInner) {
+					var card:CardInner = value as CardInner;
+					card.className =  _border;
+				} else {
+					throw new Error("Host component must be an MDL CardInner.");
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/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
new file mode 100644
index 0000000..e420f2d
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.supportClasses
+{
+	import org.apache.flex.core.ContainerBase;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+    
+	/**
+	 *  The CardInner class is a Container component capable of parenting other
+	 *  four components (CardTitle, CardMedia, CardSupportingText and CardActions. 
+     *  The Panel uses the following bead types:
+	 * 
+	 *  org.apache.flex.core.IBeadModel: the data model for the Card.
+	 *  org.apache.flex.core.IBeadView: creates the parts of the Card.
+	 *  
+	 *  @see PanelWithControlBar
+	 *  @see ControlBar
+	 *  @see TitleBar
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class CardInner extends ContainerBase
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function CardInner()
+		{
+			super();
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            
+            positioner = element;
+            
+            // absolute positioned children need a non-null
+            // position value in the parent.  It might
+            // get set to 'absolute' if the container is
+            // also absolutely positioned
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = typeNames = "mdl-card";
+
+            return element;
+        }    
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/264c7294/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index de6554b..5fc8294 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -34,10 +34,12 @@
     <component id="Badge" class="org.apache.flex.mdl.Badge"/>
     <component id="BadgeEffect" class="org.apache.flex.mdl.beads.BadgeEffect"/>
     <component id="Card" class="org.apache.flex.mdl.Card"/>
+    <component id="CardInner" class="org.apache.flex.mdl.supportClasses.CardInner"/>
     <component id="CardTitle" class="org.apache.flex.mdl.CardTitle"/>
     <component id="CardSupportingText" class="org.apache.flex.mdl.CardSupportingText"/>
     <component id="CardMedia" class="org.apache.flex.mdl.CardMedia"/>
     <component id="CardActions" class="org.apache.flex.mdl.CardActions"/>
     <component id="CardEffect" class="org.apache.flex.mdl.beads.CardEffect"/>
+    <component id="CardInnerEffect" class="org.apache.flex.mdl.beads.CardInnerEffect"/>
 
 </componentPackage>


[16/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Some text input and example changes

Posted by ca...@apache.org.
Some text input and example changes


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

Branch: refs/heads/feature/mdl
Commit: f888d402257657339aa3348a2d320acd893e8a56
Parents: 272f715
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 16:16:59 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 57 ++++++++++----------
 .../main/flex/org/apache/flex/mdl/TextInput.as  |  9 ++--
 2 files changed, 34 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f888d402/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 937d8d2..242df22 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -30,39 +30,42 @@ limitations under the License.
     <js:initialView>
         <js:View>
             
-            <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
-            <js:Container>
-                <js:beads>
-                    <js:HorizontalLayout />
-                </js:beads>
-                            
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
-                    <i class="material-icons">add</i>
-                </js:TextButton>
+            <js:Form action="http://www.google.com"> 
 
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
-                    <i class="material-icons">add</i>
-                </js:TextButton>
+                <!-- Buttons https://getmdl.io/components/index.html#buttons-section -->
+                <js:Container>
+                    <js:beads>
+                        <js:HorizontalLayout />
+                    </js:beads>
+                           
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
+                        <i class="material-icons">add</i>
+                    </js:TextButton>
 
-                <!-- Raised button -->
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
-                <!-- Raised button with ripple -->
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" text="BUTTON"/>
-                <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
-                <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
+                        <i class="material-icons">mood</i>
+                    </js:TextButton>
 
-                <mdl:Button/>
+                    <!-- Raised button -->
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
+                    <!-- Raised button with ripple -->
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" text="BUTTON"/>
+                    <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
+                    <js:TextButton className="mdl-button mdl-js-button mdl-button--raised" text="BUTTON"/>
 
-                <mdl:TextInput/>
+                    <mdl:Button>
+                        <i class="material-icons">add</i>
+                    </mdl:Button>
 
-            </js:Container>
-
-            <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
-            <js:Form action="http://www.google.com">
-                <js:Container className="mdl-textfield mdl-js-textfield">
-                    <js:TextInput className="mdl-textfield__input" id="sample1"/>
-                    <js:Label className="mdl-textfield__label" text="Text..."/>
+                    <mdl:Button text="BUTTON"/>                 
                 </js:Container>
+
+                <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
+                <mdl:TextInput id="mdlti" text="Something..." change="mdlchk.text = mdlti.text"/>
+
+                <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
+                <mdl:CheckBox id="mdlchk" text="Hello" selected="true"/>
+                
             </js:Form>
             
         </js:View>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f888d402/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
index dace484..4617678 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -59,8 +59,7 @@ package org.apache.flex.mdl
             var input:HTMLInputElement;
             var label:HTMLLabelElement;
             var textNode:Text;
-            //element = document.createElement('input') as WrappedHTMLElement;
-
+            
             div = document.createElement('div') as HTMLDivElement;
             div.className = "mdl-textfield mdl-js-textfield";
 
@@ -71,15 +70,15 @@ package org.apache.flex.mdl
             label = document.createElement('label') as HTMLLabelElement;
             label.className = "mdl-textfield__label";
             
-            textNode = document.createTextNode('Text...') as Text;
+            textNode = document.createTextNode('') as Text;
             label.appendChild(textNode);
-            //element.className = 'TextInput';
-            //typeNames = 'TextInput';
             
             div.appendChild(input);
             div.appendChild(label);
 
             element = div as WrappedHTMLElement;
+            //element.className = 'TextInput';
+            typeNames = 'TextInput';
 
             //attach input handler to dispatch flexjs change event when user write in textinput
             //goog.events.listen(element, 'change', killChangeHandler);


[17/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL RadioButton

Posted by ca...@apache.org.
MDL RadioButton


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

Branch: refs/heads/feature/mdl
Commit: f126b1c1fcea581c31169ca73d9655db953f94ec
Parents: f888d40
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 17:58:42 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flex/org/apache/flex/mdl/RadioButton.as     | 249 +++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |   1 +
 2 files changed, 250 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f126b1c1/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
new file mode 100644
index 0000000..d7e9b2f
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/RadioButton.as
@@ -0,0 +1,249 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+    COMPILE::SWF
+    {
+        import org.apache.flex.html.RadioButton;            
+    }
+    COMPILE::JS
+    {
+        import org.apache.flex.core.UIBase;
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+
+    /**
+     *  The RadioButton class provides a MDL UI-like appearance for
+     *  a RadioButton.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+    COMPILE::SWF
+	public class RadioButton extends org.apache.flex.html.RadioButton
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function RadioButton()
+		{
+			super();
+		}
+	}
+    
+    COMPILE::JS
+    public class RadioButton extends UIBase
+    {
+        /**
+         * Provides unique name
+         */
+        public static var radioCounter:int = 0;
+
+        private var input:HTMLInputElement;
+        private var radio:HTMLSpanElement;
+        private var label:HTMLLabelElement;
+        private var textNode:Text;
+        
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         * @flexjsignorecoercion HTMLLabelElement
+         * @flexjsignorecoercion HTMLInputElement
+         * @flexjsignorecoercion HTMLSpanElement
+         * @flexjsignorecoercion Text
+         */
+        override protected function createElement():WrappedHTMLElement
+        { 
+            // hide this eleement
+            input = document.createElement('input') as HTMLInputElement;
+            input.type = 'radio';
+            input.className = 'mdl-radio__button';
+            input.id = '_radio_' + radioCounter++;
+            input.addEventListener('change', selectionChangeHandler, false);  
+
+            radio = document.createElement('span') as HTMLSpanElement;
+            radio.className = 'mdl-radio__label';
+            radio.addEventListener('mouseover', mouseOverHandler, false);
+            radio.addEventListener('mouseout', mouseOutHandler, false);
+            
+            textNode = document.createTextNode('') as Text;
+            
+            label = document.createElement('label') as HTMLLabelElement;
+            label.className = "mdl-radio mdl-js-radio mdl-js-ripple-effect";
+            label.appendChild(input);
+            label.appendChild(radio);
+            radio.appendChild(textNode);
+            label.style.position = 'relative';
+            
+            element = label as WrappedHTMLElement;
+            //element.className = 'RadioButton';
+            typeNames = 'RadioButton';
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            (input as WrappedHTMLElement).flexjs_wrapper = this;
+            (radio as WrappedHTMLElement).flexjs_wrapper = this;
+            element.flexjs_wrapper = this;
+            (textNode as WrappedHTMLElement).flexjs_wrapper = this;
+            
+            return element;
+        };
+        
+        
+        /**
+         * @param e The event object.
+         */
+        private function mouseOverHandler(e:Event):void
+        {
+            //radio.className = 'radio-icon-hover';
+        }
+        
+        
+        /**
+         * @param e The event object.
+         */
+        private function mouseOutHandler(e:Event):void
+        {
+            /*if (input.checked)
+                radio.className = 'radio-icon-checked';
+            else
+                radio.className = 'radio-icon';*/
+        }
+        
+        
+        /**
+         * @param e The event object.
+         */
+        private function selectionChangeHandler(e:Event):void 
+        {
+            // this should reset the icons in the non-selected radio
+            selectedValue = value;
+        }
+        
+        
+        override public function set id(value:String):void
+        {
+            super.id = value;
+            label.id = value;
+            input.id = value;
+        }
+        
+        /**
+         * @flexjsignorecoercion String
+         */
+        public function get groupName():String
+        {
+            return input.name as String;
+        }
+        
+        public function set groupName(value:String):void
+        {
+            input.name = value;
+        }
+        
+        public function get text():String
+        {
+            return textNode.nodeValue;
+        }
+        
+        public function set text(value:String):void
+        {
+            textNode.nodeValue = value;
+        }
+        
+        public function get selected():Boolean
+        {
+            return input.checked;
+        }
+        
+        public function set selected(value:Boolean):void
+        {
+            input.checked = value;
+            /*if (input.checked)
+                radio.className = 'radio-icon-checked';
+            else
+                radio.className = 'radio-icon';*/
+        }
+        
+        public function get value():String
+        {
+            return input.value;
+        }
+        
+        public function set value(value:String):void
+        {
+            input.value = value;
+        }
+        
+        /**
+         * @flexjsignorecoercion Array 
+         * @flexjsignorecoercion String
+         */
+        public function get selectedValue():Object
+        {
+            var buttons:Array;
+            var groupName:String;
+            var i:int;
+            var n:int;
+            
+            groupName = input.name as String;
+            buttons = document.getElementsByName(groupName) as Array;
+            n = buttons.length;
+            
+            for (i = 0; i < n; i++) {
+                if (buttons[i].checked) {
+                    return buttons[i].value;
+                }
+            }
+            return null;            
+        }
+        
+        /**
+         * @flexjsignorecoercion Array
+         * @flexjsignorecoercion String
+         */
+        public function set selectedValue(value:Object):void
+        {
+            var buttons:Array;
+            var groupName:String;
+            var i:int;
+            var n:int;
+            
+            groupName = input.name as String;
+            buttons = document.getElementsByName(groupName) as Array;
+            n = buttons.length;
+            for (i = 0; i < n; i++) {
+                if (buttons[i].value === value) {
+                    buttons[i].checked = true;
+                    buttons[i].flexjs_wrapper.selected = true;
+                }
+                else
+                    buttons[i].flexjs_wrapper.selected = false;
+            }
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f126b1c1/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index ffbc9c0..6dcb073 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -24,5 +24,6 @@
     <component id="Button" class="org.apache.flex.mdl.Button"/>
     <component id="TextInput" class="org.apache.flex.mdl.TextInput"/>
     <component id="CheckBox" class="org.apache.flex.mdl.CheckBox"/>
+    <component id="RadioButton" class="org.apache.flex.mdl.RadioButton"/>
 
 </componentPackage>


[13/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL TextInput

Posted by ca...@apache.org.
MDL TextInput


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

Branch: refs/heads/feature/mdl
Commit: 44773cfce29760dcf62b01423fa321b294303d7d
Parents: 70074e3
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 13:40:29 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/mdl/TextInput.as  | 99 ++++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |  2 +-
 2 files changed, 100 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/44773cfc/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
new file mode 100644
index 0000000..dace484
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -0,0 +1,99 @@
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl
+{
+	import org.apache.flex.html.TextInput;
+
+    COMPILE::JS
+    {
+        import goog.events;
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+    
+    /**
+     *  The TextInput class provides a Material Design Library UI-like appearance for
+     *  a TextInput.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+	public class TextInput extends org.apache.flex.html.TextInput
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function TextInput()
+		{
+			super();
+		}
+		
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            var div:HTMLDivElement;
+            var input:HTMLInputElement;
+            var label:HTMLLabelElement;
+            var textNode:Text;
+            //element = document.createElement('input') as WrappedHTMLElement;
+
+            div = document.createElement('div') as HTMLDivElement;
+            div.className = "mdl-textfield mdl-js-textfield";
+
+            input = document.createElement('input') as HTMLInputElement;
+            input.setAttribute('type', 'text');
+            input.className = 'mdl-textfield__input';
+
+            label = document.createElement('label') as HTMLLabelElement;
+            label.className = "mdl-textfield__label";
+            
+            textNode = document.createTextNode('Text...') as Text;
+            label.appendChild(textNode);
+            //element.className = 'TextInput';
+            //typeNames = 'TextInput';
+            
+            div.appendChild(input);
+            div.appendChild(label);
+
+            element = div as WrappedHTMLElement;
+
+            //attach input handler to dispatch flexjs change event when user write in textinput
+            //goog.events.listen(element, 'change', killChangeHandler);
+            goog.events.listen(input, 'input', textChangeHandler);
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            (div as WrappedHTMLElement).flexjs_wrapper = this;
+            (input as WrappedHTMLElement).flexjs_wrapper = this;
+            (label as WrappedHTMLElement).flexjs_wrapper = this;
+            element.flexjs_wrapper = this;
+            
+            return element;
+        }        
+        
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/44773cfc/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 897aab5..eb65435 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -22,6 +22,6 @@
 <componentPackage>
 
     <component id="Button" class="org.apache.flex.mdl.Button"/>
-    <component id="TextInput" class="org.apache.flex.html.TextInput"  lookupOnly="true" />
+    <component id="TextInput" class="org.apache.flex.mdl.TextInput"/>
 
 </componentPackage>


[11/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Use changes in falcon to inline HTML

Posted by ca...@apache.org.
Use changes in falcon to inline HTML


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

Branch: refs/heads/feature/mdl
Commit: bfbfb53da5504cfcce2e51a1d4416405cf7eda18
Parents: 93016b4
Author: Carlos Rovira <ca...@apache.org>
Authored: Sun Oct 16 11:05:38 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/App.mxml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bfbfb53d/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 4ad2a62..b19b9b4 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -20,7 +20,8 @@ limitations under the License.
 <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:js="library://ns.apache.org/flexjs/basic"
                 xmlns:local="*"
-                xmlns:mdl="library://ns.apache.org/flexjs/mdl">
+                xmlns:mdl="library://ns.apache.org/flexjs/mdl"
+                xmlns="http://www.w3.org/1999/xhtml">
     
     <js:valuesImpl>
         <js:SimpleCSSValuesImpl />
@@ -29,9 +30,9 @@ limitations under the License.
     <js:initialView>
         <js:View>
             
-            <js:Button className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
-               
-            </js:Button>
+            <js:TextButton className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
+               <i class="material-icons">add</i>
+            </js:TextButton>
 
             <mdl:Button/>
         </js:View>


[23/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL Slider fixes

Posted by ca...@apache.org.
MDL Slider fixes


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

Branch: refs/heads/feature/mdl
Commit: f1af62156c16056fd7754bf394d23f7dd6768f65
Parents: b07b5da
Author: Carlos Rovira <ca...@apache.org>
Authored: Thu Nov 3 11:00:15 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  4 ++-
 .../src/main/flex/org/apache/flex/mdl/Slider.as | 37 +++++++++++---------
 2 files changed, 24 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f1af6215/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 dca2da1..8487f5b 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -102,7 +102,9 @@ limitations under the License.
                 </mdl:RadioButton>
                 <mdl:RadioButton groupName="g1" text="Red"/>
 
-                <mdl:Slider minimum="0" maximum="100" value="0"/>
+                <mdl:Slider/>
+
+                <mdl:Slider minimum="0" maximum="10" value="2" stepSize="2" width="200"/>
 
             </js:Form>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f1af6215/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
index 2587227..31267ad 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Slider.as
@@ -87,7 +87,7 @@ package org.apache.flex.mdl
 
 			COMPILE::JS
 			{
-				(element as HTMLInputElement).value = "" + value;
+				(element as HTMLInputElement).value = IRangeModel(model).value.toString();
 			}
 		}
 		
@@ -109,7 +109,7 @@ package org.apache.flex.mdl
 
 			COMPILE::JS
 			{
-				(element as HTMLInputElement).min = "" + value;
+				(element as HTMLInputElement).min = IRangeModel(model).minimum.toString();
 			}
 		}
 		
@@ -131,7 +131,7 @@ package org.apache.flex.mdl
 
 			COMPILE::JS
 			{
-				(element as HTMLInputElement).max = "" + value;
+				(element as HTMLInputElement).max = IRangeModel(model).maximum.toString();
 			}
 			
 		}
@@ -170,6 +170,11 @@ package org.apache.flex.mdl
         public function set stepSize(value:Number):void
         {
             IRangeModel(model).stepSize = value;
+
+			COMPILE::JS
+			{
+				(element as HTMLInputElement).step = IRangeModel(model).stepSize.toString();
+			}
         }
 
         COMPILE::JS
@@ -191,33 +196,33 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-            input = document.createElement('input') as HTMLInputElement;
-			input.type = "range";
-			//input.min = "0";
-			//input.max = "100";
-			//input.value = "0";
+			var p:HTMLElement = document.createElement('p') as HTMLElement;
+            p.style.width = '300px';
 
+			input = document.createElement('input') as HTMLInputElement;
+			input.type = "range";
+			input.value = IRangeModel(model).value.toString();
+			input.min = IRangeModel(model).minimum.toString();
+			input.max = IRangeModel(model).maximum.toString();
+			input.step = IRangeModel(model).stepSize.toString();
+			input.className = 'mdl-slider mdl-js-slider';
 
-            //input.style.width = '200px';
-            //input.style.height = '30px';
+			p.appendChild(input);
 
 			element = input as WrappedHTMLElement;
             
             //track = new SliderTrackView();
-            //addBead(track);
-            
+            //addBead(track);            
             //thumb = new SliderThumbView();
             //addBead(thumb);
-            
             //controller = new SliderMouseController();
             //addBead(controller);
             
-            positioner = element;
+            positioner = p as WrappedHTMLElement;
             positioner.style.position = 'relative';
+			(input as WrappedHTMLElement).flexjs_wrapper = this;
             element.flexjs_wrapper = this;
             
-            className = typeNames = 'mdl-slider mdl-js-slider';
-            
             return element;
         } 
         


[06/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Changes in TextInput

Posted by ca...@apache.org.
Changes in TextInput


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

Branch: refs/heads/feature/mdl
Commit: 8a14286a10ba86b827568bd7da6c1af05e3d8653
Parents: 66f54dc
Author: Carlos Rovira <ca...@apache.org>
Authored: Tue Oct 25 19:02:37 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    | 13 +++--
 .../main/flex/org/apache/flex/mdl/TextInput.as  | 55 ++++++--------------
 2 files changed, 21 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a14286a/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 a50dbeb..3924dba 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -55,16 +55,15 @@ limitations under the License.
                 </js:HContainer>
 
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
-                <mdl:TextInput id="mdlti" change="mdlchk.text = mdlti.text" text="Text..."/>
-
-                <mdl:TextInput  mdlEffect="mdl-textfield--floating-label" text="Floating Label"/>
+                <mdl:TextInput id="mdlti" text="Normal Text Field..." change="mdlchk.text = mdlti.text"/>
+                <mdl:TextInput text="Floating Label" mdlEffect="mdl-textfield--floating-label" />
 
                 <!-- Toggles :: https://getmdl.io/components/index.html#toggles-section -->
-                <mdl:CheckBox id="mdlchk" text="This Checks" selected="true" mdlEffect="mdl-js-ripple-effect"/>
-                <mdl:CheckBox id="mdlchk1" text="This is disabled at start" />
+                <mdl:CheckBox id="mdlchk" text="Disabled at start" />
+                <mdl:CheckBox id="mdlchk1" text="Selected and with Ripple" selected="true" mdlEffect="mdl-js-ripple-effect"/>
                 
-                <mdl:RadioButton groupName="g1" text="Black" mdlEffect="mdl-js-ripple-effect"/>
-                <mdl:RadioButton groupName="g1" text="White"/>
+                <mdl:RadioButton groupName="g1" text="Black"/>
+                <mdl:RadioButton groupName="g1" text="Ripple" mdlEffect="mdl-js-ripple-effect"/>
                 <mdl:RadioButton groupName="g1" text="Red"/>
 
             </js:Form>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8a14286a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
index b387b81..87f9c5a 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TextInput.as
@@ -64,41 +64,34 @@ package org.apache.flex.mdl
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-            var div:HTMLDivElement;
-            var input:HTMLInputElement;
-            var label:HTMLLabelElement;
-            var textNode:Text;
-            
-            div = document.createElement('div') as HTMLDivElement;
+            var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
+            div.className = "mdl-textfield mdl-js-textfield";
 
-            input = document.createElement('input') as HTMLInputElement;
+            var input:HTMLInputElement = document.createElement('input') as HTMLInputElement;
             input.setAttribute('type', 'text');
             input.className = 'mdl-textfield__input';
-
-            label = document.createElement('label') as HTMLLabelElement;
-            label.className = "mdl-textfield__label";
             
-            _textNode = textNode = document.createTextNode('') as Text;
+            //attach input handler to dispatch flexjs change event when user write in textinput
+            //goog.events.listen(element, 'change', killChangeHandler);
+            goog.events.listen(input, 'input', textChangeHandler);
+            
+            var label:HTMLLabelElement = document.createElement('label') as HTMLLabelElement;
+            label.className = "mdl-textfield__label";
+
+            var textNode:Text = document.createTextNode('') as Text;
             label.appendChild(textNode);
             
             div.appendChild(input);
             div.appendChild(label);
 
-            element = div as WrappedHTMLElement;
-            
-            //attach input handler to dispatch flexjs change event when user write in textinput
-            //goog.events.listen(element, 'change', killChangeHandler);
-            goog.events.listen(input, 'input', textChangeHandler);
-            
-            positioner = element;
+            element = input as WrappedHTMLElement;
+
+            positioner = div as WrappedHTMLElement;
             positioner.style.position = 'relative';
-            (div as WrappedHTMLElement).flexjs_wrapper = this;
             (input as WrappedHTMLElement).flexjs_wrapper = this;
             (label as WrappedHTMLElement).flexjs_wrapper = this;
             element.flexjs_wrapper = this;
             
-            className = typeNames = "mdl-textfield mdl-js-textfield";
-
             return element;
         }        
         
@@ -114,26 +107,8 @@ package org.apache.flex.mdl
             _mdlEffect = value;
             COMPILE::JS 
             {
-                className = _mdlEffect;
+                positioner.className = positioner.className + " " + _mdlEffect;
             }
         }
-
-        /**
-         *  @private
-         */
-		override public function set text(value:String):void
-		{
-            //COMPILE::SWF
-            //{
-                //inSetter = true;
-                //ITextModel(model).text = value;
-                //inSetter = false;                    
-            //}
-            COMPILE::JS
-            {
-                _textNode.nodeValue = value;
-                dispatchEvent(new Event('textChange'));
-            }
-		}
 	}
 }


[02/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Replaced Link by js:Anchor

Posted by ca...@apache.org.
Replaced Link by js:Anchor


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

Branch: refs/heads/feature/mdl
Commit: 88d9b147d9f67b18fd9a964acec99dd65f0a8af8
Parents: 258d1ec
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Nov 4 15:39:51 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |   8 +-
 .../src/main/flex/org/apache/flex/mdl/Link.as   | 137 -------------------
 .../src/main/resources/mdl-manifest.xml         |   1 -
 3 files changed, 4 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/88d9b147/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 abece5f..df452e6 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -109,17 +109,17 @@ limitations under the License.
                 <mdl:Slider minimum="0" maximum="10" value="2" stepSize="2" width="200"/>
 
                 <js:VContainer>
-                    <mdl:Link text="This is a Badge" linkUrl="http://flex.apache.org">
+                    <js:Anchor text="This is a Badge" href="http://flex.apache.org">
                         <js:beads>
                             <mdl:Badge dataBadge="5" overlap="true" noBackground="true"/>
                         </js:beads>
-                    </mdl:Link>
+                    </js:Anchor>
 
-                    <mdl:Link id="badge1" text="Loving this." linkUrl="http://flex.apache.org">
+                    <js:Anchor id="badge1" text="Loving this." href="http://flex.apache.org">
                         <js:beads>
                             <mdl:Badge dataBadge="1"/>
                         </js:beads>
-                    </mdl:Link>
+                    </js:Anchor>
                 </js:VContainer>
 
                 <mdl:Card width="512">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/88d9b147/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as
deleted file mode 100644
index b74f7cc..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Link.as
+++ /dev/null
@@ -1,137 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mdl
-{
-	import org.apache.flex.core.UIBase;
-
-    COMPILE::JS
-    {
-        import org.apache.flex.core.WrappedHTMLElement;            
-    }
-
-	/**
-	 *  The Link class 
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class Link extends UIBase
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function Link()
-		{
-			super();
-		}
-		
-        private var _text:String = "";
-
-        /**
-         *  The text of the link
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get text():String
-		{
-            COMPILE::SWF
-            {
-                return _text;
-            }
-            COMPILE::JS
-            {
-                return textNode.nodeValue;
-            }
-		}
-
-		public function set text(value:String):void
-		{
-            COMPILE::SWF
-            {
-                _text = value;
-            }
-            COMPILE::JS
-            {
-                textNode.nodeValue = value;
-            }
-		}
-        
-        private var _linkUrl:String = "#";
-
-        /**
-         *  the link url
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.0
-         */
-		public function get linkUrl():String
-		{
-            return _linkUrl;   
-		}
-
-		public function set linkUrl(value:String):void
-		{
-            _linkUrl = value;
-            
-            COMPILE::JS
-            {
-                (element as HTMLElement).setAttribute('href', value);
-            }
-		}
-		
-        COMPILE::JS
-        private var textNode:Text;
-		
-        /**
-         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-		 * @flexjsignorecoercion HTMLElement
-         */
-        COMPILE::JS
-        override protected function createElement():WrappedHTMLElement
-        {
-			var a:HTMLElement = document.createElement('a') as HTMLElement;
-            a.setAttribute('href', linkUrl);
-            
-            textNode = document.createTextNode('') as Text;
-            a.appendChild(textNode); 
-
-			element = a as WrappedHTMLElement;
-            
-            positioner = element;
-            positioner.style.position = 'relative';
-			element.flexjs_wrapper = this;
-            
-            //className = typeNames = 'Link';
-
-            return element;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/88d9b147/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index 6ed3618..bd2d9ec 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -31,7 +31,6 @@
     <component id="TextInputEffect" class="org.apache.flex.mdl.beads.TextInputEffect"/>
     <component id="Disabled" class="org.apache.flex.mdl.beads.Disabled"/>
     <component id="Slider" class="org.apache.flex.mdl.Slider"/>
-    <component id="Link" class="org.apache.flex.mdl.Link"/>
     <component id="Badge" class="org.apache.flex.mdl.beads.Badge"/>
     <component id="Card" class="org.apache.flex.mdl.Card"/>
     <component id="CardInner" class="org.apache.flex.mdl.supportClasses.CardInner"/>


[34/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - remove type from badge and change jpeg to jpg

Posted by ca...@apache.org.
remove type from badge and change jpeg to jpg


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

Branch: refs/heads/feature/mdl
Commit: 0e73a69b86d07cac466a39f751b8deda07ba9bd6
Parents: 264c729
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Nov 4 11:28:15 2016 +0100
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/App.mxml  |  16 ++--------------
 .../MDLExample/src/main/resources/Unknown.jpeg     | Bin 50531 -> 0 bytes
 .../MDLExample/src/main/resources/Unknown.jpg      | Bin 0 -> 50531 bytes
 3 files changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e73a69b/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 9f3fb79..111deed 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -118,12 +118,6 @@ limitations under the License.
                     <mdl:Badge id="badge1" text="Loving this." dataBadge="1" linkUrl="http://flex.apache.org"/>
                 </js:VContainer>
 
-                <mdl:Button text="TYPE LINK" click="badge1.type = 0">
-                    <js:beads>
-                        <mdl:ButtonEffect raised="true" colored="true"/>
-                    </js:beads>
-                </mdl:Button>
-
                 <mdl:Card width="512">
                     <js:beads>
                         <mdl:CardEffect shadow="2"/>
@@ -132,7 +126,7 @@ limitations under the License.
                         <js:Label text="Welcome" className="mdl-card__title-text"/>
                     </mdl:CardTitle>
                     <mdl:CardMedia>
-                        <js:Image url="../../../../src/main/resources/Unknown.jpeg"  height="176"/>
+                        <js:Image url="../../../../src/main/resources/Unknown.jpg"  height="176"/>
                     </mdl:CardMedia>
                     <mdl:CardSupportingText>
                         <js:MultilineLabel text="This text might describe the photo and provide further information, such as where and when it was taken."/>
@@ -141,17 +135,11 @@ limitations under the License.
                         <js:beads>
                             <mdl:CardInnerEffect border="true"/>
                         </js:beads>
-                        <mdl:Button text="TYPE TEXT" click="badge1.type = 1">
+                        <mdl:Button text="Get Started">
                             <js:beads>
                                 <mdl:ButtonEffect raised="true" colored="false"/>
                             </js:beads>
                         </mdl:Button>
-
-                        <mdl:Button text="TYPE CONTAINER" click="badge1.type = 2; badge1.text='account_box'">
-                            <js:beads>
-                                <mdl:ButtonEffect raised="true" accent="true"/>
-                            </js:beads>
-                        </mdl:Button>
                     </mdl:CardActions>
                 </mdl:Card>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e73a69b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg
deleted file mode 100644
index 08fb201..0000000
Binary files a/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e73a69b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpg
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/Unknown.jpg b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpg
new file mode 100644
index 0000000..08fb201
Binary files /dev/null and b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpg differ


[25/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - Effect Bead classes for various components

Posted by ca...@apache.org.
Effect Bead classes for various components


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

Branch: refs/heads/feature/mdl
Commit: f5a37d4c349240e005fa2008f87d44b180584c12
Parents: 5588ae9
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 20:57:57 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  20 +-
 .../org/apache/flex/mdl/beads/ButtonEffect.as   | 228 +++++++++++++++++
 .../apache/flex/mdl/beads/ButtonEffectBead.as   | 253 -------------------
 .../org/apache/flex/mdl/beads/EffectBead.as     |  98 -------
 .../flex/org/apache/flex/mdl/beads/MDLEffect.as | 105 ++++++++
 .../apache/flex/mdl/beads/TextInputEffect.as    |  97 +++++++
 .../org/apache/flex/mdl/beads/TextPrompt.as     | 151 +++++++++++
 .../org/apache/flex/mdl/beads/TextPromptBead.as | 151 -----------
 .../src/main/resources/mdl-manifest.xml         |   7 +-
 9 files changed, 595 insertions(+), 515 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/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 e618658..0507f21 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -39,7 +39,7 @@ limitations under the License.
                     <!-- Fab button -->
                     <mdl:Button>
                         <js:beads>
-                            <mdl:ButtonEffectBead fab="true" colored="true"/>
+                            <mdl:ButtonEffect fab="true" colored="true"/>
                         </js:beads>
                         <i class="material-icons">add</i>
                     </mdl:Button>
@@ -47,7 +47,7 @@ limitations under the License.
                     <!-- Fab with Ripple -->
                     <mdl:Button>
                         <js:beads>
-                            <mdl:ButtonEffectBead fab="true" ripple="true"/>
+                            <mdl:ButtonEffect fab="true" ripple="true"/>
                         </js:beads>
                         <i class="material-icons md-48">face</i>
                     </mdl:Button>
@@ -55,20 +55,20 @@ limitations under the License.
                     <!-- Raised button -->
                     <mdl:Button text="BUTTON">
                         <js:beads>
-                            <mdl:ButtonEffectBead raised="true" colored="true"/>
+                            <mdl:ButtonEffect raised="true" colored="true"/>
                         </js:beads>
                     </mdl:Button>
 
                     <!-- Raised button with ripple -->
                     <mdl:Button text="BUTTON">
                         <js:beads>
-                            <mdl:ButtonEffectBead raised="true" ripple="true" accent="true"/>
+                            <mdl:ButtonEffect raised="true" ripple="true" accent="true"/>
                         </js:beads>
                     </mdl:Button>
                     <!-- Raised disabled button ... it seems we don't have "disabled" implemented yet-->
                     <mdl:Button text="BUTTON">
                         <js:beads>
-                            <mdl:ButtonEffectBead raised="true"/>
+                            <mdl:ButtonEffect raised="true"/>
                         </js:beads>
                     </mdl:Button>
                 </js:HContainer>
@@ -76,13 +76,13 @@ limitations under the License.
                 <!-- Text Fields :: https://getmdl.io/components/index.html#textfields-section -->
                 <mdl:TextInput id="mdlti" change="mdlchk.text = mdlti.text">
                     <js:beads>
-                        <mdl:TextPromptBead prompt="Normal Text Field..."/>
+                        <mdl:TextPrompt prompt="Normal Text Field..."/>
                     </js:beads>
                 </mdl:TextInput>
                 <mdl:TextInput>
                     <js:beads>
-                        <mdl:EffectBead mdlEffect="mdl-textfield--floating-label"/>
-                        <mdl:TextPromptBead prompt="Floating Label"/>
+                        <mdl:TextInputEffect floatingLabel= "true"/>
+                        <mdl:TextPrompt prompt="Floating Label"/>
                     </js:beads>
                 </mdl:TextInput>
 
@@ -90,13 +90,13 @@ limitations under the License.
                 <mdl:CheckBox id="mdlchk" text="Disabled at start" />
                 <mdl:CheckBox id="mdlchk1" text="Selected and with Ripple" selected="true">
                     <js:beads>
-                        <mdl:EffectBead mdlEffect="mdl-js-ripple-effect"/>
+                        <mdl:MDLEffect ripple="true"/>
                     </js:beads>
                 </mdl:CheckBox>
                 <mdl:RadioButton groupName="g1" text="Black"/>
                 <mdl:RadioButton groupName="g1" text="Ripple">
                     <js:beads>
-                        <mdl:EffectBead mdlEffect="mdl-js-ripple-effect"/>
+                        <mdl:MDLEffect ripple="true"/>
                     </js:beads>
                 </mdl:RadioButton>
                 <mdl:RadioButton groupName="g1" text="Red"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffect.as
new file mode 100644
index 0000000..e33d5ef
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffect.as
@@ -0,0 +1,228 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+    import org.apache.flex.core.IStrand;
+	import org.apache.flex.mdl.beads.MDLEffect;
+    import org.apache.flex.mdl.Button;
+	
+	/**
+	 *  The ButtonEffect class is a specialty bead that can be used with
+	 *  an MDL button control to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class ButtonEffect extends MDLEffect
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function ButtonEffect()
+		{
+		}
+		
+        private var _fab:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--fab" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get fab():Boolean
+        {
+            return _fab;
+        }
+        public function set fab(value:Boolean):void
+        {
+            if(value) {
+                _fab = " mdl-button--fab";
+            } else {
+                _fab = "";
+            }   
+        }
+
+        private var _raised:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--raised" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get raised():Boolean
+        {
+            return _raised;
+        }
+        public function set raised(value:Boolean):void
+        {
+            if(value) {
+                _raised = " mdl-button--raised";
+            } else {
+                _raised = "";
+            }   
+        }
+
+        private var _colored:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--colored" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get colored():Boolean
+        {
+            return _colored;
+        }
+        public function set colored(value:Boolean):void
+        {
+            if(value) {
+                _colored = " mdl-button--colored";
+            } else {
+                _colored = "";
+            }   
+        }
+
+        private var _accent:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--accent" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get accent():Boolean
+        {
+            return _accent;
+        }
+        public function set accent(value:Boolean):void
+        {
+            if(value) {
+                _accent = " mdl-button--accent";
+            } else {
+                _accent = "";
+            }   
+        }
+
+        private var _primary:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--primary" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get primary():Boolean
+        {
+            return _primary;
+        }
+        public function set primary(value:Boolean):void
+        {
+            if(value) {
+                _primary = " mdl-button--primary";
+            } else {
+                _primary = "";
+            }   
+        }
+
+        private var _minifab:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--mini-fab" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get minifab():Boolean
+        {
+            return _minifab;
+        }
+        public function set minifab(value:Boolean):void
+        {
+            if(value) {
+                _minifab = " mdl-button--mini-fab";
+            } else {
+                _minifab = "";
+            }   
+        }
+
+        private var _icon:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-button--icon" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get icon():Boolean
+        {
+            return _icon;
+        }
+        public function set icon(value:Boolean):void
+        {
+            if(value) {
+                _icon = " mdl-button--icon";
+            } else {
+                _icon = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion org.apache.flex.mdl.Button;
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+                if (value is Button) {
+                    var button:Button = value as Button;
+                    button.className = _fab + _raised + _colored + _ripple + _accent + _primary + _minifab + _icon;
+                } else {
+                    throw new Error("Host component must be an MDL Button.");
+                }
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as
deleted file mode 100644
index de999f9..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ButtonEffectBead.as
+++ /dev/null
@@ -1,253 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mdl.beads
-{
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
-
-    import org.apache.flex.mdl.Button;
-	
-	/**
-	 *  The ButtonEffectBead class is a specialty bead that can be used with
-	 *  an MDL button control to apply some MDL complementary effect.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class ButtonEffectBead implements IBead
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function ButtonEffectBead()
-		{
-		}
-		
-        private var _fab:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-button--fab" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get fab():Boolean
-        {
-            return _fab;
-        }
-        public function set fab(value:Boolean):void
-        {
-            if(value) {
-                _fab = " mdl-button--fab";
-            } else {
-                _fab = "";
-            }   
-        }
-
-        private var _raised:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-button--raised" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get raised():Boolean
-        {
-            return _raised;
-        }
-        public function set raised(value:Boolean):void
-        {
-            if(value) {
-                _raised = " mdl-button--raised";
-            } else {
-                _raised = "";
-            }   
-        }
-
-        private var _colored:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-button--colored" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get colored():Boolean
-        {
-            return _colored;
-        }
-        public function set colored(value:Boolean):void
-        {
-            if(value) {
-                _colored = " mdl-button--colored";
-            } else {
-                _colored = "";
-            }   
-        }
-
-        private var _ripple:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-js-ripple-effect" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get ripple():Boolean
-        {
-            return _ripple;
-        }
-        public function set ripple(value:Boolean):void
-        {
-            if(value) {
-                _ripple = " mdl-js-ripple-effect";
-            } else {
-                _ripple = "";
-            }   
-        }
-
-        private var _accent:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-button--accent" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get accent():Boolean
-        {
-            return _accent;
-        }
-        public function set accent(value:Boolean):void
-        {
-            if(value) {
-                _accent = " mdl-button--accent";
-            } else {
-                _accent = "";
-            }   
-        }
-
-        private var _primary:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-button--primary" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get primary():Boolean
-        {
-            return _primary;
-        }
-        public function set primary(value:Boolean):void
-        {
-            if(value) {
-                _primary = " mdl-button--primary";
-            } else {
-                _primary = "";
-            }   
-        }
-
-        private var _minifab:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-button--mini-fab" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get minifab():Boolean
-        {
-            return _minifab;
-        }
-        public function set minifab(value:Boolean):void
-        {
-            if(value) {
-                _minifab = " mdl-button--mini-fab";
-            } else {
-                _minifab = "";
-            }   
-        }
-
-        private var _icon:String = "";
-        /**
-		 *  A boolean flag to activate "mdl-button--icon" effect selector.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get icon():Boolean
-        {
-            return _icon;
-        }
-        public function set icon(value:Boolean):void
-        {
-            if(value) {
-                _icon = " mdl-button--icon";
-            } else {
-                _icon = "";
-            }   
-        }
-
-		private var _strand:IStrand;
-		
-		/**
-		 *  @copy org.apache.flex.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 *  @flexjsignorecoercion HTMLInputElement
-		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
-		 */
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			
-			COMPILE::JS
-			{
-                if (value is Button) {
-                    var button:Button = value as Button;
-                    button.className = _fab + _raised + _colored + _ripple + _accent + _primary + _minifab + _icon;
-                } else {
-                    throw new Error("Host component must be an MDL Button.");
-                }
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
deleted file mode 100644
index d7ddcc0..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/EffectBead.as
+++ /dev/null
@@ -1,98 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mdl.beads
-{
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
-
-    import org.apache.flex.mdl.TextInput;
-	
-	/**
-	 *  The EffectBead class is a specialty bead that can be used with
-	 *  any MDL control to apply some MDL complementary effect.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class EffectBead implements IBead
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function EffectBead()
-		{
-		}
-
-        private var _mdlEffect:String = "";
-
-        /**
-		 *  The string to use as the MDL effect.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-        public function get mdlEffect():String
-        {
-            return _mdlEffect;
-        }
-        
-        public function set mdlEffect(value:String):void
-        {
-            _mdlEffect = value;
-        }
-
-		private var _strand:IStrand;
-		
-		/**
-		 *  @copy org.apache.flex.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 *  @flexjsignorecoercion HTMLInputElement
-		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
-		 */
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			
-			COMPILE::JS
-			{
-                if (value is TextInput) {
-                    var mdTi:TextInput = value as TextInput;
-                    mdTi.positioner.className = mdTi.positioner.className + " " + mdlEffect;
-                } else {
-                    var host:UIBase = value as UIBase;
-                    host.className = mdlEffect;
-                }
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/MDLEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/MDLEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/MDLEffect.as
new file mode 100644
index 0000000..4694507
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/MDLEffect.as
@@ -0,0 +1,105 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.mdl.Button;
+    import org.apache.flex.mdl.TextInput;
+	
+	/**
+	 *  The EffectBead class is a specialty bead that can be used with
+	 *  any MDL control to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class MDLEffect implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function MDLEffect()
+		{
+		}
+
+        protected var _ripple:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-js-ripple-effect" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get ripple():Boolean
+        {
+            return _ripple;
+        }
+        public function set ripple(value:Boolean):void
+        {
+            if(value) {
+                _ripple = " mdl-js-ripple-effect";
+            } else {
+                _ripple = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion HTMLInputElement
+		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+				if (value is Button) {
+                    var button:Button = value as Button;
+                    button.className = _ripple;
+                } else if (value is TextInput) {
+                    var mdTi:TextInput = value as TextInput;
+                    mdTi.positioner.className = mdTi.positioner.className + _ripple;
+                } else if (value is UIBase) {
+					var host:UIBase = value as UIBase;
+                    host.className = _ripple;
+				} else {
+                    throw new Error("Host component must be an MDL control.");
+                }
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextInputEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextInputEffect.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextInputEffect.as
new file mode 100644
index 0000000..c66c49a
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextInputEffect.as
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	import org.apache.flex.core.IStrand;
+    import org.apache.flex.mdl.beads.MDLEffect;
+	import org.apache.flex.mdl.TextInput;
+	
+	
+	/**
+	 *  The TextInputEffect class is a specialty bead that can be used with
+	 *  a MDL TextInput control to apply some MDL complementary effect.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class TextInputEffect extends MDLEffect
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function TextInputEffect()
+		{
+		}
+
+        private var _floatingLabel:String = "";
+        /**
+		 *  A boolean flag to activate "mdl-textfield--floating-label" effect selector.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+        public function get floatingLabel():Boolean
+        {
+            return _floatingLabel;
+        }
+        public function set floatingLabel(value:Boolean):void
+        {
+            if(value) {
+                _floatingLabel = " mdl-textfield--floating-label";
+            } else {
+                _floatingLabel = "";
+            }   
+        }
+
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion org.apache.flex.mdl.TextInput;
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::JS
+			{
+				if (value is TextInput) {
+					var textinput:TextInput = value as TextInput;
+					textinput.positioner.className = textinput.positioner.className + _floatingLabel;
+				} else {
+					throw new Error("Host component must be an MDL TextInput.");
+				}
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as
new file mode 100644
index 0000000..e3142b2
--- /dev/null
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPrompt.as
@@ -0,0 +1,151 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mdl.beads
+{
+	COMPILE::SWF
+	{
+		import flash.text.TextFieldType;			
+		
+		import org.apache.flex.core.CSSTextField;
+	}
+	
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
+
+    import org.apache.flex.mdl.TextInput;
+	
+	/**
+	 *  The TextPrompt class is a specialty bead that can be used with
+	 *  any TextInput control. The bead places a string into the input field
+	 *  when there is no value associated with the text property.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class TextPrompt implements IBead
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function TextPrompt()
+		{
+		}
+		
+		private var _prompt:String;
+		
+		/**
+		 *  The string to use as the placeholder prompt.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get prompt():String
+		{
+			return _prompt;
+		}
+		public function set prompt(value:String):void
+		{
+			_prompt = value;
+		}
+		
+		private var _strand:IStrand;
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 *  @flexjsignorecoercion HTMLInputElement
+		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+		 */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+			
+			COMPILE::SWF
+			{
+				// listen for changes in text to hide or show the prompt
+				var model:Object = UIBase(_strand).model;
+				if (!model.hasOwnProperty("text")) {
+					throw new Error("Model requires a text property when used with TextPromptBead");
+				}
+				IEventDispatcher(model).addEventListener("textChange", handleTextChange);
+				
+				// create a TextField that displays the prompt - it shows
+				// and hides based on the model's content
+				promptField = new CSSTextField();
+				promptField.selectable = false;
+				promptField.type = TextFieldType.DYNAMIC;
+				promptField.mouseEnabled = false;
+				promptField.multiline = false;
+				promptField.wordWrap = false;
+				promptField.textColor = 0xBBBBBB;
+				
+				// trigger the event handler to display if needed
+				handleTextChange(null);					
+			}
+			COMPILE::JS
+			{
+				var mdlTi:TextInput = value as TextInput;
+                mdlTi.textNode.nodeValue = prompt;
+				//var e:HTMLInputElement = host.element as HTMLInputElement;
+				//e.placeholder = prompt;
+			}
+		}
+		
+		COMPILE::SWF
+		private var promptField:CSSTextField;
+		private var promptAdded:Boolean;
+		
+		/**
+		 * @private
+		 */
+		COMPILE::SWF
+		private function handleTextChange( event:Event ):void
+		{	
+			// see what the model currently has to determine if the prompt should be
+			// displayed or not.
+			var model:Object = UIBase(_strand).model;
+			
+			if (model.text != null && model.text.length > 0 ) {
+				if (promptAdded) UIBase(_strand).removeChild(promptField);
+				promptAdded = false;
+			}
+			else {
+				if (!promptAdded) UIBase(_strand).addChild(promptField);
+				promptField.text = prompt;
+				promptAdded = true;
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as
deleted file mode 100644
index 1c1e8fb..0000000
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/TextPromptBead.as
+++ /dev/null
@@ -1,151 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mdl.beads
-{
-	COMPILE::SWF
-	{
-		import flash.text.TextFieldType;			
-		
-		import org.apache.flex.core.CSSTextField;
-	}
-	
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.IEventDispatcher;
-
-    import org.apache.flex.mdl.TextInput;
-	
-	/**
-	 *  The TextPromptBead class is a specialty bead that can be used with
-	 *  any TextInput control. The bead places a string into the input field
-	 *  when there is no value associated with the text property.
-	 *  
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class TextPromptBead implements IBead
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function TextPromptBead()
-		{
-		}
-		
-		private var _prompt:String;
-		
-		/**
-		 *  The string to use as the placeholder prompt.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function get prompt():String
-		{
-			return _prompt;
-		}
-		public function set prompt(value:String):void
-		{
-			_prompt = value;
-		}
-		
-		private var _strand:IStrand;
-		
-		/**
-		 *  @copy org.apache.flex.core.IBead#strand
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 *  @flexjsignorecoercion HTMLInputElement
-		 *  @flexjsignorecoercion org.apache.flex.core.UIBase;
-		 */
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-			
-			COMPILE::SWF
-			{
-				// listen for changes in text to hide or show the prompt
-				var model:Object = UIBase(_strand).model;
-				if (!model.hasOwnProperty("text")) {
-					throw new Error("Model requires a text property when used with TextPromptBead");
-				}
-				IEventDispatcher(model).addEventListener("textChange", handleTextChange);
-				
-				// create a TextField that displays the prompt - it shows
-				// and hides based on the model's content
-				promptField = new CSSTextField();
-				promptField.selectable = false;
-				promptField.type = TextFieldType.DYNAMIC;
-				promptField.mouseEnabled = false;
-				promptField.multiline = false;
-				promptField.wordWrap = false;
-				promptField.textColor = 0xBBBBBB;
-				
-				// trigger the event handler to display if needed
-				handleTextChange(null);					
-			}
-			COMPILE::JS
-			{
-				var mdlTi:TextInput = value as TextInput;
-                mdlTi.textNode.nodeValue = prompt;
-				//var e:HTMLInputElement = host.element as HTMLInputElement;
-				//e.placeholder = prompt;
-			}
-		}
-		
-		COMPILE::SWF
-		private var promptField:CSSTextField;
-		private var promptAdded:Boolean;
-		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		private function handleTextChange( event:Event ):void
-		{	
-			// see what the model currently has to determine if the prompt should be
-			// displayed or not.
-			var model:Object = UIBase(_strand).model;
-			
-			if (model.text != null && model.text.length > 0 ) {
-				if (promptAdded) UIBase(_strand).removeChild(promptField);
-				promptAdded = false;
-			}
-			else {
-				if (!promptAdded) UIBase(_strand).addChild(promptField);
-				promptField.text = prompt;
-				promptAdded = true;
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f5a37d4c/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index a4d62f2..8d30325 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -25,8 +25,9 @@
     <component id="TextInput" class="org.apache.flex.mdl.TextInput"/>
     <component id="CheckBox" class="org.apache.flex.mdl.CheckBox"/>
     <component id="RadioButton" class="org.apache.flex.mdl.RadioButton"/>
-    <component id="TextPromptBead" class="org.apache.flex.mdl.beads.TextPromptBead"/>
-    <component id="EffectBead" class="org.apache.flex.mdl.beads.EffectBead"/>
-    <component id="ButtonEffectBead" class="org.apache.flex.mdl.beads.ButtonEffectBead"/>
+    <component id="TextPrompt" class="org.apache.flex.mdl.beads.TextPrompt"/>
+    <component id="MDLEffect" class="org.apache.flex.mdl.beads.MDLEffect"/>
+    <component id="ButtonEffect" class="org.apache.flex.mdl.beads.ButtonEffect"/>
+    <component id="TextInputEffect" class="org.apache.flex.mdl.beads.TextInputEffect"/>
 
 </componentPackage>


[09/36] git commit: [flex-asjs] [refs/heads/feature/mdl] - MDL Example project

Posted by ca...@apache.org.
MDL Example project


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

Branch: refs/heads/feature/mdl
Commit: 93016b42a4a3a82f78e23df995afdd31a0c61619
Parents: 6f65480
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Oct 14 23:05:39 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Fri Nov 4 23:48:31 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/.vscode/launch.json  |  21 ++++
 examples/flexjs/MDLExample/.vscode/tasks.json   |  11 ++
 examples/flexjs/MDLExample/asconfig.json        |  14 +++
 examples/flexjs/MDLExample/pom.xml              | 112 +++++++++++++++++++
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  39 +++++++
 .../MDLExample/src/main/resources/Unknown.jpeg  | Bin 0 -> 50531 bytes
 .../main/resources/mdl-js-index-template.html   |  32 ++++++
 .../src/main/resources/mdl-styles.css           |  32 ++++++
 examples/flexjs/pom.xml                         |   1 +
 9 files changed, 262 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/MDLExample/.vscode/launch.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/.vscode/launch.json b/examples/flexjs/MDLExample/.vscode/launch.json
new file mode 100644
index 0000000..4fec2c2
--- /dev/null
+++ b/examples/flexjs/MDLExample/.vscode/launch.json
@@ -0,0 +1,21 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch Chrome against debug.html, with sourcemaps",
+            "type": "chrome",
+            "request": "launch",
+            "file": "${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": ""
+        },
+        {
+            "name": "Launch Firefox against debug.html, with sourcemaps",
+            "type": "firefox",
+            "request": "launch",
+            "file": "${workspaceRoot}/debug.html",
+            "sourceMaps": true,
+            "preLaunchTask": "asconfigc"
+        }
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/MDLExample/.vscode/tasks.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/.vscode/tasks.json b/examples/flexjs/MDLExample/.vscode/tasks.json
new file mode 100644
index 0000000..ac2c02d
--- /dev/null
+++ b/examples/flexjs/MDLExample/.vscode/tasks.json
@@ -0,0 +1,11 @@
+{
+	// See https://go.microsoft.com/fwlink/?LinkId=733558
+	// for the documentation about the tasks.json format
+	"version": "0.1.0",
+	"command": "asconfigc",
+	"isShellCommand": true,
+	"args": [
+		"--flexHome=/Users/carlosrovira/Dev/Flex/sdks/flexjs-0.8.0"
+	],
+	"showOutput": "always"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/MDLExample/asconfig.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/asconfig.json b/examples/flexjs/MDLExample/asconfig.json
new file mode 100644
index 0000000..d15de04
--- /dev/null
+++ b/examples/flexjs/MDLExample/asconfig.json
@@ -0,0 +1,14 @@
+{
+    "config": "flex",
+    "compilerOptions": {
+        "debug": true,
+        "source-map": true,
+        "js-output-type": "flexjs",
+        "output": "./target/javascript"
+    },
+    "additionalOptions": "-html-template=src/main/resources/mdl-js-index-template.html",
+    "files":
+    [
+        "src/main/flex/App.mxml"
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/MDLExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/pom.xml b/examples/flexjs/MDLExample/pom.xml
new file mode 100644
index 0000000..207dab5
--- /dev/null
+++ b/examples/flexjs/MDLExample/pom.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.flex.flexjs.examples</groupId>
+    <artifactId>examples-flexjs</artifactId>
+    <version>0.8.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>MDLExample</artifactId>
+  <version>0.8.0-SNAPSHOT</version>
+  <packaging>swf</packaging>
+
+  <name>Apache Flex - FlexJS: Examples: FlexJS: MDLExample</name>
+
+  <build>
+    <sourceDirectory>src/main/flex</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.flex.flexjs.compiler</groupId>
+        <artifactId>flexjs-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <flashVersion>20.0</flashVersion>
+          <mainClass>App.mxml</mainClass>
+        </configuration>
+        <executions>
+          <!-- Add a second execution with output set to JavaScript (Flash is the default) -->
+          <execution>
+            <id>compile-javascript</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>compile-app</goal>
+            </goals>
+            <configuration>
+              <outputJavaScript>true</outputJavaScript>
+              <htmlTemplate>${basedir}/src/main/resources/mdl-js-index-template.html</htmlTemplate>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.flex.flexjs.compiler</groupId>
+            <artifactId>compiler-jx</artifactId>
+            <version>0.8.0-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>MaterialDesignLite</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+
+    <!-- Needed for Flash compilation -->
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>20.0</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Needed for JavaScript compilation -->
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/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
new file mode 100644
index 0000000..4ad2a62
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+                xmlns:js="library://ns.apache.org/flexjs/basic"
+                xmlns:local="*"
+                xmlns:mdl="library://ns.apache.org/flexjs/mdl">
+    
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+
+    <js:initialView>
+        <js:View>
+            
+            <js:Button className="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
+               
+            </js:Button>
+
+            <mdl:Button/>
+        </js:View>
+    </js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg
new file mode 100644
index 0000000..08fb201
Binary files /dev/null and b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html b/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
new file mode 100644
index 0000000..9eaf780
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
@@ -0,0 +1,32 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="Custom Template for injecting custom style CSS">
+	<link rel="stylesheet" type="text/css" href="${application}.css">
+  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
+  <link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.indigo-pink.min.css">
+  <script defer src="https://code.getmdl.io/1.2.1/material.min.js"></script>
+${head}
+</head>
+<body>
+${body}
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
new file mode 100644
index 0000000..6a07905
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
@@ -0,0 +1,32 @@
+/*
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+*/
+
+.demo-card-wide.mdl-card {
+  width: 512px;
+}
+.demo-card-wide > .mdl-card__title {
+  color: #fff;
+  height: 176px;
+  background: url('welcome_card.jpg') center / cover;
+}
+.demo-card-wide > .mdl-card__menu {
+  color: #fff;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93016b42/examples/flexjs/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/pom.xml b/examples/flexjs/pom.xml
index cf65ec1..f603abd 100644
--- a/examples/flexjs/pom.xml
+++ b/examples/flexjs/pom.xml
@@ -48,6 +48,7 @@
     <module>FlexWebsiteStatsViewer</module>
     <module>HelloWorld</module>
     <module>MapSearch</module>
+    <module>MDLExample</module>
     <module>MobileMap</module>
     <module>MobileStocks</module>
     <module>MobileTrader</module>