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/10/26 20:49:10 UTC
[01/24] git commit: [flex-asjs] [refs/heads/feature/mdl] - - Adjusted
the distribution build: -- Updated the version in flex-sdk-description.xml to
be greater than 4.8.0 -- Added mxml-manifest.xml,
spark-manifest.xml and airmobile-config.xml -- Added loc [Forced Update!]
Repository: flex-asjs
Updated Branches:
refs/heads/feature/mdl 9e67920b7 -> 599fbf16f (forced update)
- Adjusted the distribution build:
-- Updated the version in flex-sdk-description.xml to be greater than 4.8.0
-- Added mxml-manifest.xml, spark-manifest.xml and airmobile-config.xml
-- Added locale and rsls directories
-- Removed the version suffix from the libs in the "lib" directory
-- Included the "ide" directory in the output
TODO:
- The dummy-jars: mxmlc.jar, compc.jar are still missing ...
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/561cf332
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/561cf332
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/561cf332
Branch: refs/heads/feature/mdl
Commit: 561cf332a8ea2fc061da33b7f7b3124bb3145cac
Parents: 4b79670
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Wed Oct 26 17:15:39 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Wed Oct 26 17:15:39 2016 +0200
----------------------------------------------------------------------
distribution/pom.xml | 11 +-
.../src/main/assembly/component-air.xml | 10 ++
.../src/main/assembly/component-fontkit.xml | 3 +
distribution/src/main/assembly/component.xml | 11 +-
.../src/main/assembly/filter.properties | 21 ---
distribution/src/main/resources/air/adt | 2 +-
distribution/src/main/resources/air/adt.bat | 2 +-
.../src/main/resources/flex-sdk-description.xml | 4 +-
.../main/resources/frameworks/air-config.xml | 4 +-
.../resources/frameworks/airmobile-config.xml | 135 +++++++++++++++++++
.../resources/frameworks/createjs-config.xml | 8 +-
.../main/resources/frameworks/flex-config.xml | 4 +-
.../main/resources/frameworks/jquery-config.xml | 8 +-
.../src/main/resources/frameworks/js-config.xml | 8 +-
.../main/resources/frameworks/locale/readme.md | 20 +++
.../main/resources/frameworks/mxml-manifest.xml | 21 +++
.../main/resources/frameworks/node-config.xml | 4 +-
.../main/resources/frameworks/rsls/readme.md | 20 +++
.../resources/frameworks/spark-manifest.xml | 21 +++
pom.xml | 2 +
20 files changed, 268 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 09f41bf..4db74fb 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -35,9 +35,6 @@
<properties>
<distributionFileName>apache-flex-flexjs-${project.version}</distributionFileName>
- <flashVersion>${flash.version}</flashVersion>
- <airVersion>${air.version}</airVersion>
-
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
</properties>
@@ -56,6 +53,11 @@
</dependency>
<dependency>
<groupId>org.apache.flex.flexjs.compiler</groupId>
+ <artifactId>flexjs-ant-tasks</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.compiler</groupId>
<artifactId>debugger</artifactId>
<version>0.8.0-SNAPSHOT</version>
</dependency>
@@ -458,9 +460,6 @@
<goal>single</goal>
</goals>
<configuration>
- <filters>
- <filter>src/main/assembly/filter.properties</filter>
- </filters>
<descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
</descriptors>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/assembly/component-air.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/component-air.xml b/distribution/src/main/assembly/component-air.xml
index d2a9636..e24c2f4 100644
--- a/distribution/src/main/assembly/component-air.xml
+++ b/distribution/src/main/assembly/component-air.xml
@@ -23,6 +23,9 @@ under the License.
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
+ <!-- FlashBuilder doesn't like us appending the version to the jar name -->
+ <!--outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping-->
+ <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<includes>
<include>com.adobe.air.compiler:adt:jar</include>
</includes>
@@ -38,6 +41,13 @@ under the License.
</includes>
<unpack>true</unpack>
</dependencySet>
+ <dependencySet>
+ <useProjectArtifact>false</useProjectArtifact>
+ <outputFileNameMapping>frameworks</outputFileNameMapping>
+ <includes>
+ <include></include>
+ </includes>
+ </dependencySet>
<!-- Put the air swcs into the frameworks/libs/air directory -->
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/assembly/component-fontkit.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/component-fontkit.xml b/distribution/src/main/assembly/component-fontkit.xml
index 0b6a026..625535a 100644
--- a/distribution/src/main/assembly/component-fontkit.xml
+++ b/distribution/src/main/assembly/component-fontkit.xml
@@ -22,6 +22,9 @@ under the License.
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
+ <!-- FlashBuilder doesn't like us appending the version to the jar name -->
+ <!--outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping-->
+ <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<includes>
<include>com.adobe:fontkit</include>
</includes>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/assembly/component.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/component.xml b/distribution/src/main/assembly/component.xml
index cb86030..3293692 100644
--- a/distribution/src/main/assembly/component.xml
+++ b/distribution/src/main/assembly/component.xml
@@ -26,6 +26,9 @@ under the License.
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
+ <!-- FlashBuilder doesn't like us appending the version to the jar name -->
+ <!--outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping-->
+ <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<includes>
<include>org.apache.flex.flexjs.compiler:*:jar</include>
</includes>
@@ -37,14 +40,14 @@ under the License.
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib/external</outputDirectory>
+ <includes>
+ <include>*:jar</include>
+ </includes>
<excludes>
- <exclude>org.apache.flex.flexjs.framework:*</exclude>
- <exclude>org.apache.flex.flexjs.typedefs:*</exclude>
<exclude>org.apache.flex.flexjs.compiler:*</exclude>
<exclude>*:args4j:jar</exclude>
<exclude>*:google-closure-library*:jar</exclude>
<exclude>*:org.json:jar</exclude>
- <exclude>*:*:pom</exclude>
</excludes>
</dependencySet>
<!-- Put the externs swcs into the externs directory -->
@@ -125,6 +128,7 @@ under the License.
<include>NOTICE</include>
<include>README*</include>
<include>RELEASE*</include>
+ <include>ide/**</include>
</includes>
</fileSet>
@@ -153,6 +157,7 @@ under the License.
<includes>
<include>**</include>
</includes>
+ <filtered>true</filtered>
</fileSet>
<!-- Copy the sdk descriptor -->
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/assembly/filter.properties
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/filter.properties b/distribution/src/main/assembly/filter.properties
deleted file mode 100644
index dc8b6ae..0000000
--- a/distribution/src/main/assembly/filter.properties
+++ /dev/null
@@ -1,21 +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.
-##
-################################################################################
-
-airVersion=${air-version}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/air/adt
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/air/adt b/distribution/src/main/resources/air/adt
index 71138b2..000b6bb 100755
--- a/distribution/src/main/resources/air/adt
+++ b/distribution/src/main/resources/air/adt
@@ -21,4 +21,4 @@
scriptDir=$(dirname "$0")
args=$@
-java -Dfile.encoding=UTF-8 -jar "$scriptDir/../lib/adt-${airVersion}.jar" "$args"
+java -Dfile.encoding=UTF-8 -jar "$scriptDir/../lib/adt.jar" "$args"
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/air/adt.bat
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/air/adt.bat b/distribution/src/main/resources/air/adt.bat
index f077f7d..224bd11 100644
--- a/distribution/src/main/resources/air/adt.bat
+++ b/distribution/src/main/resources/air/adt.bat
@@ -19,4 +19,4 @@ rem
SET scriptDir=%~dp0
SET args=%*
-@java -jar "%scriptDir%\..\lib\adt-${airVersion}.jar" %args%
\ No newline at end of file
+@java -jar "%scriptDir%\..\lib\adt.jar" %args%
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/flex-sdk-description.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/flex-sdk-description.xml b/distribution/src/main/resources/flex-sdk-description.xml
index 5b567be..a4bf265 100644
--- a/distribution/src/main/resources/flex-sdk-description.xml
+++ b/distribution/src/main/resources/flex-sdk-description.xml
@@ -19,6 +19,8 @@
-->
<flex-sdk-description>
<name>Apache Flex ${project.version} FP${flash.version} AIR${air.version} en_US</name>
- <version>${project.version}</version>
+ <!--version>${project.version}</version-->
+ <!-- This is a hack to trick the FlashBuilder in accepting this version -->
+ <version>4.8.${project.version}</version>
<build>${timestamp}</build>
</flex-sdk-description>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/air-config.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/air-config.xml b/distribution/src/main/resources/frameworks/air-config.xml
index 590ad1e..7aec9af 100644
--- a/distribution/src/main/resources/frameworks/air-config.xml
+++ b/distribution/src/main/resources/frameworks/air-config.xml
@@ -21,10 +21,10 @@
<flex-config>
<!-- Specifies the minimum player version that will run the compiled SWF. -->
- <target-player>11.1</target-player>
+ <target-player>${air.version}</target-player>
<!-- Specifies the version of the compiled SWF -->
- <swf-version>14</swf-version>
+ <swf-version>${swf.version}</swf-version>
<compiler>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/airmobile-config.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/airmobile-config.xml b/distribution/src/main/resources/frameworks/airmobile-config.xml
new file mode 100644
index 0000000..5ec2e07
--- /dev/null
+++ b/distribution/src/main/resources/frameworks/airmobile-config.xml
@@ -0,0 +1,135 @@
+<?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.
+
+-->
+
+
+<flex-config>
+ <!-- Specifies the minimum player version that will run the compiled SWF. -->
+ <target-player>${air.version}</target-player>
+
+ <!-- Specifies the version of the compiled SWF -->
+ <swf-version>${swf.version}</swf-version>
+
+ <compiler>
+
+ <!-- Specifies that the target runtime is a mobile device. -->
+ <mobile>true</mobile>
+
+ <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+ <!-- not set -->
+ <!--
+ <source-path>
+ <path-element>string</path-element>
+ </source-path>
+ -->
+
+ <!-- Allow the source-path to have path-elements which contain other path-elements -->
+ <allow-source-path-overlap>false</allow-source-path-overlap>
+
+ <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+ <!-- but true by default for compc. -->
+ <!--
+ <debug>true</debug>
+ -->
+
+ <!-- List of SWC files or directories to compile against but to omit from -->
+ <!-- linking. -->
+ <external-library-path>
+ <path-element>{airHome}/frameworks/libs/air/airglobal.swc</path-element>
+ </external-library-path>
+
+ <!-- not set -->
+ <!--
+ <include-libraries>
+ <library>string</library>
+ </include-libraries>
+ -->
+
+ <!-- List of SWC files or directories that contain SWC files. -->
+ <library-path>
+ <path-element>libs</path-element>
+ <path-element>{airHome}/frameworks/libs/air</path-element>
+ <path-element>locale/{locale}</path-element>
+ </library-path>
+
+ <!-- Enable post-link SWF optimization. -->
+ <optimize>true</optimize>
+
+ <!-- Keep the following AS3 metadata in the bytecodes. -->
+ <!--
+ <keep-as3-metadata>
+ <name>Transient</name>
+ </keep-as3-metadata>
+ -->
+
+ <!-- Run the AS3 compiler in strict error checking mode. -->
+ <strict>true</strict>
+
+ <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+ <!-- code. -->
+ <show-actionscript-warnings>true</show-actionscript-warnings>
+
+ <!-- Assignment within conditional. -->
+ <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+ <!-- Possibly invalid Array cast operation. -->
+ <warn-bad-array-cast>true</warn-bad-array-cast>
+
+ <!-- Invalid Date cast operation. -->
+ <warn-bad-date-cast>true</warn-bad-date-cast>
+
+ <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+ <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+ <!-- Impossible assignment to null. -->
+ <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+ <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+ <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+ <!-- Constant not initialized. -->
+ <warn-const-not-initialized>true</warn-const-not-initialized>
+
+ <!-- Duplicate variable definition -->
+ <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+ <!-- Use of the instanceof operator. -->
+ <warn-instance-of-changes>true</warn-instance-of-changes>
+
+ <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+ <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+ <!-- Missing type declaration. -->
+ <warn-no-type-decl>true</warn-no-type-decl>
+
+ </compiler>
+
+ <!-- Enables SWFs to access the network. -->
+ <use-network>true</use-network>
+
+ <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+ <metadata>
+ <title>Apache FlexJS Application</title>
+ <description>http://flex.apache.org/</description>
+ <publisher>Apache Software Foundation</publisher>
+ <creator>Apache Software Foundation</creator>
+ <language>en_US</language>
+ </metadata>
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/createjs-config.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/createjs-config.xml b/distribution/src/main/resources/frameworks/createjs-config.xml
index 6f06f3e..fc66dba 100644
--- a/distribution/src/main/resources/frameworks/createjs-config.xml
+++ b/distribution/src/main/resources/frameworks/createjs-config.xml
@@ -21,11 +21,11 @@
<flex-config>
- <!-- Specifies the minimum player version that will run the compiled SWF. -->
- <target-player>11.1</target-player>
+ <!-- Specifies the minimum player version that will run the compiled SWF. -->
+ <swf-version>${flash.version}</swf-version>
- <!-- Specifies the version of the compiled SWF -->
- <swf-version>14</swf-version>
+ <!-- Specifies the version of the compiled SWF -->
+ <swf-version>${swf.version}</swf-version>
<compiler>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/flex-config.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/flex-config.xml b/distribution/src/main/resources/frameworks/flex-config.xml
index fe63127..99c44a8 100644
--- a/distribution/src/main/resources/frameworks/flex-config.xml
+++ b/distribution/src/main/resources/frameworks/flex-config.xml
@@ -22,10 +22,10 @@
<flex-config>
<!-- Specifies the minimum player version that will run the compiled SWF. -->
- <target-player>11.1</target-player>
+ <swf-version>${flash.version}</swf-version>
<!-- Specifies the version of the compiled SWF -->
- <swf-version>14</swf-version>
+ <swf-version>${swf.version}</swf-version>
<compiler>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/jquery-config.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/jquery-config.xml b/distribution/src/main/resources/frameworks/jquery-config.xml
index b970af3..7d0a4c8 100644
--- a/distribution/src/main/resources/frameworks/jquery-config.xml
+++ b/distribution/src/main/resources/frameworks/jquery-config.xml
@@ -21,11 +21,11 @@
<flex-config>
- <!-- Specifies the minimum player version that will run the compiled SWF. -->
- <target-player>11.1</target-player>
+ <!-- Specifies the minimum player version that will run the compiled SWF. -->
+ <swf-version>${flash.version}</swf-version>
- <!-- Specifies the version of the compiled SWF -->
- <swf-version>14</swf-version>
+ <!-- Specifies the version of the compiled SWF -->
+ <swf-version>${swf.version}</swf-version>
<compiler>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/js-config.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/js-config.xml b/distribution/src/main/resources/frameworks/js-config.xml
index 7ded512..7f46e04 100644
--- a/distribution/src/main/resources/frameworks/js-config.xml
+++ b/distribution/src/main/resources/frameworks/js-config.xml
@@ -21,11 +21,11 @@
<flex-config>
- <!-- Specifies the minimum player version that will run the compiled SWF. -->
- <target-player>11.1</target-player>
+ <!-- Specifies the minimum player version that will run the compiled SWF. -->
+ <swf-version>${flash.version}</swf-version>
- <!-- Specifies the version of the compiled SWF -->
- <swf-version>14</swf-version>
+ <!-- Specifies the version of the compiled SWF -->
+ <swf-version>${swf.version}</swf-version>
<compiler>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/locale/readme.md
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/locale/readme.md b/distribution/src/main/resources/frameworks/locale/readme.md
new file mode 100644
index 0000000..46a5ffd
--- /dev/null
+++ b/distribution/src/main/resources/frameworks/locale/readme.md
@@ -0,0 +1,20 @@
+<!--
+
+ 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.
+
+-->
+
+FlashBuilder seems to need this directory.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/mxml-manifest.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/mxml-manifest.xml b/distribution/src/main/resources/frameworks/mxml-manifest.xml
new file mode 100644
index 0000000..f14063c
--- /dev/null
+++ b/distribution/src/main/resources/frameworks/mxml-manifest.xml
@@ -0,0 +1,21 @@
+<?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>
+</componentPackage>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/node-config.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/node-config.xml b/distribution/src/main/resources/frameworks/node-config.xml
index 9327d1a..f0515cd 100644
--- a/distribution/src/main/resources/frameworks/node-config.xml
+++ b/distribution/src/main/resources/frameworks/node-config.xml
@@ -22,10 +22,10 @@
<flex-config>
<!-- Specifies the minimum player version that will run the compiled SWF. -->
- <target-player>11.1</target-player>
+ <swf-version>${flash.version}</swf-version>
<!-- Specifies the version of the compiled SWF -->
- <swf-version>14</swf-version>
+ <swf-version>${swf.version}</swf-version>
<compiler>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/rsls/readme.md
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/rsls/readme.md b/distribution/src/main/resources/frameworks/rsls/readme.md
new file mode 100644
index 0000000..46a5ffd
--- /dev/null
+++ b/distribution/src/main/resources/frameworks/rsls/readme.md
@@ -0,0 +1,20 @@
+<!--
+
+ 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.
+
+-->
+
+FlashBuilder seems to need this directory.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/distribution/src/main/resources/frameworks/spark-manifest.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/resources/frameworks/spark-manifest.xml b/distribution/src/main/resources/frameworks/spark-manifest.xml
new file mode 100644
index 0000000..f14063c
--- /dev/null
+++ b/distribution/src/main/resources/frameworks/spark-manifest.xml
@@ -0,0 +1,21 @@
+<?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>
+</componentPackage>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/561cf332/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8db9821..a7888f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,6 +61,8 @@
<flex.version>4.15.0</flex.version>
<flash.version>20.0</flash.version>
<air.version>20.0</air.version>
+ <!-- For SWF versions see: http://www.adobe.com/devnet/articles/flashplayer-air-feature-list.html -->
+ <swf.version>31</swf.version>
<!-- URL of the ASF SonarQube server -->
<sonar.host.url>https://analysis.apache.org/</sonar.host.url>
[22/24] 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/d26f390c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d26f390c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d26f390c
Branch: refs/heads/feature/mdl
Commit: d26f390c10b6533c6339fc952152b543416d95c8
Parents: 73770ae
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 20:03:10 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/d26f390c/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/d26f390c/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/d26f390c/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/d26f390c/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/d26f390c/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/d26f390c/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/d26f390c/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>
[18/24] 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/9e6692f4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9e6692f4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9e6692f4
Branch: refs/heads/feature/mdl
Commit: 9e6692f4f75d39739e6ce0284534e90723b3f0f0
Parents: 6f90b15
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 17:59:17 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
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/9e6692f4/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>
[08/24] 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/09bb34f7
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/09bb34f7
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/09bb34f7
Branch: refs/heads/feature/mdl
Commit: 09bb34f7a4cc1f8b9c8846824be98aa83d7ab99c
Parents: 7e87889
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Oct 14 20:52:53 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
frameworks/projects/pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/09bb34f7/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>
[20/24] 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/73770aea
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/73770aea
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/73770aea
Branch: refs/heads/feature/mdl
Commit: 73770aea60f720c0f214806490c542c92af6bce3
Parents: d8f490a
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 12:57:18 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/73770aea/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/73770aea/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/73770aea/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/73770aea/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/73770aea/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/73770aea/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/73770aea/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>
[07/24] 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/7e87889b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7e87889b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7e87889b
Branch: refs/heads/feature/mdl
Commit: 7e87889b2cfc067d9de1ab13093eaaa51f139564
Parents: 4c78873
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Oct 14 20:51:28 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/7e87889b/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/7e87889b/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/7e87889b/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/7e87889b/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/7e87889b/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/7e87889b/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/7e87889b/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/7e87889b/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>
[03/24] 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/85ae5ed3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/85ae5ed3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/85ae5ed3
Branch: refs/heads/feature/mdl
Commit: 85ae5ed3e3bc70fd5472ee9bf135720f6b0b84c8
Parents: acff6b8
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 24 20:19:06 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
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/85ae5ed3/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/85ae5ed3/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/85ae5ed3/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/85ae5ed3/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/85ae5ed3/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/85ae5ed3/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'));
}
}
[05/24] 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/4437b93e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4437b93e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4437b93e
Branch: refs/heads/feature/mdl
Commit: 4437b93ea18aec98012589066aa491f42d5a7ad5
Parents: bda81d1
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 16:16:59 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/4437b93e/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/4437b93e/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);
[10/24] 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/7ecff53d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7ecff53d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7ecff53d
Branch: refs/heads/feature/mdl
Commit: 7ecff53d42243568e879b0e09829df2e26446ed6
Parents: 0693aff
Author: Carlos Rovira <ca...@apache.org>
Authored: Sun Oct 16 11:05:38 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
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/7ecff53d/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/24] 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/599fbf16
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/599fbf16
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/599fbf16
Branch: refs/heads/feature/mdl
Commit: 599fbf16fc5c73c4dbeb1ff5b20f1340114b8749
Parents: d26f390
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 20:57:57 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/599fbf16/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/599fbf16/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/599fbf16/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/599fbf16/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/599fbf16/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/599fbf16/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/599fbf16/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/599fbf16/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/599fbf16/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>
[24/24] 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/d8f490a3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d8f490a3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d8f490a3
Branch: refs/heads/feature/mdl
Commit: d8f490a3d983a630cef47605052985b39887b12f
Parents: 9ac907e
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 26 12:29:26 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/d8f490a3/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/d8f490a3/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/d8f490a3/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/d8f490a3/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/d8f490a3/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>
[16/24] 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/d9713a44
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d9713a44
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d9713a44
Branch: refs/heads/feature/mdl
Commit: d9713a44c21cab903bcb410a4e5d155475cc6f08
Parents: 85ae5ed
Author: Carlos Rovira <ca...@apache.org>
Authored: Tue Oct 25 00:06:03 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/d9713a44/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;
}
}
[15/24] 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/bda81d16
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/bda81d16
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/bda81d16
Branch: refs/heads/feature/mdl
Commit: bda81d16361aea7def00ec8ab5786d70cd2d3274
Parents: dc86a2d
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 16:16:22 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/bda81d16/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/bda81d16/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>
[09/24] 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/0693aff9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0693aff9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0693aff9
Branch: refs/heads/feature/mdl
Commit: 0693aff903c8f69fcbed4caa31d8ecdd65f34733
Parents: 09bb34f
Author: Carlos Rovira <ca...@apache.org>
Authored: Fri Oct 14 23:05:39 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
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/0693aff9/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/0693aff9/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/0693aff9/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/0693aff9/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/0693aff9/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/0693aff9/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/0693aff9/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/0693aff9/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/0693aff9/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>
[13/24] 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/dc86a2da
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dc86a2da
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dc86a2da
Branch: refs/heads/feature/mdl
Commit: dc86a2dab8057544bcea61707e59ee1e9bf22401
Parents: ddd25f9
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 13:40:57 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
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/dc86a2da/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 -->
[17/24] 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/9ac907eb
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9ac907eb
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9ac907eb
Branch: refs/heads/feature/mdl
Commit: 9ac907eb322a4c1da70537c6cba9c3b56612578e
Parents: d9713a4
Author: Carlos Rovira <ca...@apache.org>
Authored: Tue Oct 25 19:02:37 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/9ac907eb/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/9ac907eb/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'));
- }
- }
}
}
[06/24] 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/6f90b153
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6f90b153
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6f90b153
Branch: refs/heads/feature/mdl
Commit: 6f90b15308eb8520c1022c8aa356238450f0ab60
Parents: 4437b93
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 17:58:42 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/6f90b153/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/6f90b153/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>
[21/24] 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/acff6b85
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/acff6b85
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/acff6b85
Branch: refs/heads/feature/mdl
Commit: acff6b85975cc0e45caf048ce0e9dd71165de707
Parents: 402ab8c
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 19 02:21:37 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/acff6b85/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/acff6b85/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'));
+ }
+ }
}
}
[12/24] 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/780528b1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/780528b1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/780528b1
Branch: refs/heads/feature/mdl
Commit: 780528b196eede8aed75da2a6379e8c7134ab600
Parents: 2be7e10
Author: Alex Harui <ah...@apache.org>
Authored: Sun Oct 16 21:25:09 2016 -0700
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/780528b1/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/780528b1/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>
[19/24] 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/402ab8ca
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/402ab8ca
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/402ab8ca
Branch: refs/heads/feature/mdl
Commit: 402ab8ca05c1f7a66e479a6320d63ce9ab846f14
Parents: 9e6692f
Author: Carlos Rovira <ca...@apache.org>
Authored: Wed Oct 19 00:49:48 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/402ab8ca/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/402ab8ca/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;
+ }
+ }
+ }
}
[11/24] 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/2be7e10b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2be7e10b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2be7e10b
Branch: refs/heads/feature/mdl
Commit: 2be7e10ba4b86aed3df23cd4b1cacdf6356ca141
Parents: 7ecff53
Author: Carlos Rovira <ca...@apache.org>
Authored: Sun Oct 16 21:10:10 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/2be7e10b/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>
[14/24] 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/6d7b315e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6d7b315e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6d7b315e
Branch: refs/heads/feature/mdl
Commit: 6d7b315ecaf26f18e16131f738da40b78963835e
Parents: 780528b
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 11:54:29 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
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/6d7b315e/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>
[02/24] git commit: [flex-asjs] [refs/heads/feature/mdl] - fix up
installer after launch script name changes
Posted by ca...@apache.org.
fix up installer after launch script name 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/4c78873d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4c78873d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4c78873d
Branch: refs/heads/feature/mdl
Commit: 4c78873dfa4f5faabd2e0130413be5a9e92776cb
Parents: 561cf33
Author: Alex Harui <ah...@apache.org>
Authored: Wed Oct 26 09:27:04 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Oct 26 09:27:11 2016 -0700
----------------------------------------------------------------------
installer.xml | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4c78873d/installer.xml
----------------------------------------------------------------------
diff --git a/installer.xml b/installer.xml
index d6c8722..47fd118 100644
--- a/installer.xml
+++ b/installer.xml
@@ -967,7 +967,12 @@ tofile="${FLEXJS_HOME}/frameworks/themes/Halo/Halo.swc" />
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
- <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run).launch">
+ <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run IOS).launch">
+ <replacefilter
+ token="$FLEXJS_HOME"
+ value="${FLEXJS_HOME}"/>
+ </replace>
+ <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run Android).launch">
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
@@ -1000,11 +1005,16 @@ tofile="${FLEXJS_HOME}/frameworks/themes/Halo/Halo.swc" />
token="PATH"
value="UNIX_PATH" />
</replace>
- <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run).launch">
+ <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run IOS).launch">
<replacefilter
token="PATH"
value="UNIX_PATH" />
</replace>
+ <replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run Android).launch">
+ <replacefilter
+ token="PATH"
+ value="UNIX_PATH" />
+ </replace>
</target>
<target name="download_using_mirror" depends="check-cache,get-preferred">
[04/24] 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/ddd25f9f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ddd25f9f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ddd25f9f
Branch: refs/heads/feature/mdl
Commit: ddd25f9fb717f89c8a7eaacc75a69bac5f15d7f1
Parents: 6d7b315
Author: Carlos Rovira <ca...@apache.org>
Authored: Mon Oct 17 13:40:29 2016 +0200
Committer: Carlos Rovira <ca...@apache.org>
Committed: Wed Oct 26 22:48:24 2016 +0200
----------------------------------------------------------------------
.../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/ddd25f9f/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/ddd25f9f/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>