You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pi...@apache.org on 2018/02/25 15:24:45 UTC
[royale-asjs] branch develop updated: MDL: - Move typeNames to
constructor for all components - Add helper for MDL addOrReplaceClassName
which allows adding css classes to className without removing anything
(reference #124)
This is an automated email from the ASF dual-hosted git repository.
piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new d5f1c0f MDL: - Move typeNames to constructor for all components - Add helper for MDL addOrReplaceClassName which allows adding css classes to className without removing anything (reference #124)
d5f1c0f is described below
commit d5f1c0fae114fc3f864fc7bbbbed1d01169ace8d
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Sun Feb 25 16:24:35 2018 +0100
MDL:
- Move typeNames to constructor for all components
- Add helper for MDL addOrReplaceClassName which allows adding css classes to className without removing anything (reference #124)
---
.../projects/Basic/src/main/royale/BasicClasses.as | 1 +
.../royale/html/util/addOrReplaceClassName.as | 63 +
frameworks/projects/MaterialDesignLite/pom.xml | 316 ++---
.../src/main/resources/mdl-manifest.xml | 1 -
.../main/royale/org/apache/royale/mdl/Button.as | 649 +++++-----
.../royale/org/apache/royale/mdl/ButtonChip.as | 139 +--
.../src/main/royale/org/apache/royale/mdl/Card.as | 194 ++-
.../royale/org/apache/royale/mdl/CardActions.as | 114 +-
.../main/royale/org/apache/royale/mdl/CardMedia.as | 112 +-
.../main/royale/org/apache/royale/mdl/CardMenu.as | 112 +-
.../org/apache/royale/mdl/CardSupportingText.as | 112 +-
.../main/royale/org/apache/royale/mdl/CardTitle.as | 112 +-
.../royale/org/apache/royale/mdl/CardTitleText.as | 143 ++-
.../main/royale/org/apache/royale/mdl/CheckBox.as | 532 ++++----
.../src/main/royale/org/apache/royale/mdl/Chip.as | 140 +--
.../main/royale/org/apache/royale/mdl/Dialog.as | 348 +++---
.../royale/org/apache/royale/mdl/DialogActions.as | 181 ++-
.../royale/org/apache/royale/mdl/DialogContent.as | 116 +-
.../royale/org/apache/royale/mdl/DialogTitle.as | 140 ++-
.../main/royale/org/apache/royale/mdl/Drawer.as | 118 +-
.../royale/org/apache/royale/mdl/DropDownList.as | 428 +++----
.../main/royale/org/apache/royale/mdl/Footer.as | 194 +--
.../org/apache/royale/mdl/FooterBottomSection.as | 188 ++-
.../org/apache/royale/mdl/FooterDropDownSection.as | 154 +--
.../royale/org/apache/royale/mdl/FooterHeading.as | 144 ++-
.../org/apache/royale/mdl/FooterLeftSection.as | 196 ++-
.../royale/org/apache/royale/mdl/FooterLinkList.as | 210 ++--
.../royale/org/apache/royale/mdl/FooterLogo.as | 168 ++-
.../org/apache/royale/mdl/FooterMiddleSection.as | 188 ++-
.../org/apache/royale/mdl/FooterRightSection.as | 196 ++-
.../org/apache/royale/mdl/FooterSocialButton.as | 196 ++-
.../org/apache/royale/mdl/FooterTopSection.as | 188 ++-
.../src/main/royale/org/apache/royale/mdl/Grid.as | 203 ++--
.../main/royale/org/apache/royale/mdl/GridCell.as | 1264 ++++++++++----------
.../main/royale/org/apache/royale/mdl/Header.as | 300 ++---
.../main/royale/org/apache/royale/mdl/HeaderRow.as | 120 +-
.../royale/org/apache/royale/mdl/IconToggle.as | 549 ++++-----
.../royale/org/apache/royale/mdl/LayoutTitle.as | 135 ++-
.../src/main/royale/org/apache/royale/mdl/List.as | 111 +-
.../src/main/royale/org/apache/royale/mdl/Menu.as | 422 +++----
.../royale/org/apache/royale/mdl/Navigation.as | 131 +-
.../org/apache/royale/mdl/NavigationLayout.as | 295 ++---
.../apache/royale/mdl/NavigationLayoutContent.as | 122 +-
.../royale/org/apache/royale/mdl/NavigationLink.as | 144 ++-
.../royale/org/apache/royale/mdl/ProgressBar.as | 342 +++---
.../royale/org/apache/royale/mdl/RadioButton.as | 981 ++++++++-------
.../main/royale/org/apache/royale/mdl/Slider.as | 426 ++++---
.../main/royale/org/apache/royale/mdl/Spacer.as | 119 +-
.../main/royale/org/apache/royale/mdl/Spinner.as | 244 ++--
.../main/royale/org/apache/royale/mdl/Switch.as | 479 ++++----
.../src/main/royale/org/apache/royale/mdl/TBody.as | 63 -
.../src/main/royale/org/apache/royale/mdl/THead.as | 64 -
.../main/royale/org/apache/royale/mdl/TabBar.as | 388 +++---
.../royale/org/apache/royale/mdl/TabBarButton.as | 244 ++--
.../royale/org/apache/royale/mdl/TabBarPanel.as | 234 ++--
.../src/main/royale/org/apache/royale/mdl/Table.as | 679 +++++------
.../main/royale/org/apache/royale/mdl/TableCell.as | 185 ++-
.../royale/org/apache/royale/mdl/TableColumn.as | 306 ++---
.../src/main/royale/org/apache/royale/mdl/Tabs.as | 356 +++---
.../main/royale/org/apache/royale/mdl/TextArea.as | 354 +++---
.../main/royale/org/apache/royale/mdl/TextField.as | 276 +++--
.../src/main/royale/org/apache/royale/mdl/Toast.as | 318 +++--
.../apache/royale/mdl/beads/ExpandableSearch.as | 208 ++--
.../royale/mdl/beads/views/DropDownListView.as | 292 ++---
.../mdl/itemRenderers/DropDownListItemRenderer.as | 208 ++--
.../royale/mdl/itemRenderers/ListItemRenderer.as | 350 +++---
.../royale/mdl/itemRenderers/MenuItemRenderer.as | 390 +++---
.../itemRenderers/NavigationLinkItemRenderer.as | 302 ++---
.../TabBarButtonLayoutItemRenderer.as | 96 +-
.../itemRenderers/TabBarButtonTabsItemRenderer.as | 98 +-
.../mdl/itemRenderers/TabBarLayoutItemRenderer.as | 111 +-
.../mdl/itemRenderers/TabBarPanelItemRenderer.as | 96 +-
.../royale/mdl/materialIcons/MaterialIcon.as | 186 +--
.../apache/royale/mdl/supportClasses/CardInner.as | 230 ++--
.../apache/royale/mdl/supportClasses/ChipBase.as | 2 -
.../royale/mdl/supportClasses/MaterialIconBase.as | 581 ++++-----
.../supportClasses/TabBarButtonItemRendererBase.as | 276 ++---
.../mdl/supportClasses/TabItemRendererBase.as | 246 ++--
.../royale/mdl/supportClasses/TextFieldBase.as | 390 +++---
79 files changed, 9929 insertions(+), 10080 deletions(-)
diff --git a/frameworks/projects/Basic/src/main/royale/BasicClasses.as b/frameworks/projects/Basic/src/main/royale/BasicClasses.as
index b282275..dc9de07 100644
--- a/frameworks/projects/Basic/src/main/royale/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/royale/BasicClasses.as
@@ -31,6 +31,7 @@ internal class BasicClasses
{
import org.apache.royale.html.util.addElementToWrapper; addElementToWrapper;
}
+ import org.apache.royale.html.util.addOrReplaceClassName; addOrReplaceClassName;
import org.apache.royale.html.ToolTip; ToolTip;
import org.apache.royale.html.accessories.NumericOnlyTextInputBead; NumericOnlyTextInputBead;
import org.apache.royale.html.beads.DispatchInputFinishedBead; DispatchInputFinishedBead;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/addOrReplaceClassName.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/addOrReplaceClassName.as
new file mode 100644
index 0000000..e1a87e0
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/util/addOrReplaceClassName.as
@@ -0,0 +1,63 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.html.util
+{
+ import org.apache.royale.utils.StringTrimmer;
+
+ /**
+ * Adding or replacing css class in provided className.
+ *
+ * @param className The value of components className
+ * @param newName New css class name which will be added or replace the old one in className
+ * @param oldName Old css class name which will be replaced by newName
+ *
+ * @return The resulting className with added or replaced css class specified by newName
+ */
+ public function addOrReplaceClassName(className:String, newName:String, oldName:String = null):String
+ {
+ if (!newName)
+ {
+ return className;
+ }
+
+ if (newName && oldName && className)
+ {
+ var trimmedOldName:String = StringTrimmer.trim(oldName);
+ if (className.indexOf(trimmedOldName) > -1)
+ {
+ return className.replace(trimmedOldName, StringTrimmer.trim(newName));
+ }
+ else
+ {
+ return className += " " + StringTrimmer.trim(newName);
+ }
+ }
+
+ var isClassNameEmpty:Boolean = !className;
+
+ if (isClassNameEmpty || !oldName)
+ {
+ if (isClassNameEmpty) className = "";
+
+ return className += " " + StringTrimmer.trim(newName);
+ }
+
+ return className;
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/pom.xml b/frameworks/projects/MaterialDesignLite/pom.xml
index 1d8af5a..0cf2091 100644
--- a/frameworks/projects/MaterialDesignLite/pom.xml
+++ b/frameworks/projects/MaterialDesignLite/pom.xml
@@ -1,158 +1,158 @@
-<?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.royale.framework</groupId>
- <artifactId>projects</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- </parent>
-
- <artifactId>MaterialDesignLite</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <packaging>swc</packaging>
-
- <name>Apache Royale: Framework: Libs: Material Design Lite</name>
-
- <build>
- <sourceDirectory>src/main/royale</sourceDirectory>
- <plugins>
- <plugin>
- <groupId>org.apache.royale.compiler</groupId>
- <artifactId>royale-maven-plugin</artifactId>
- <version>${royale.compiler.version}</version>
- <extensions>true</extensions>
- <configuration>
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/royale/mdl</uri>
- <manifest>${project.basedir}/src/main/resources/mdl-manifest.xml</manifest>
- </namespace>
- <namespace>
- <type>as</type>
- <uri>library://ns.apache.org/royale/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>
- <skipExtern>true</skipExtern>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Core</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Core</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Binding</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Binding</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Graphics</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Graphics</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Collections</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Collections</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Basic</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Basic</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>HTML</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>HTML</artifactId>
- <version>0.9.2-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- </dependencies>
-
-</project>
+<?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.royale.framework</groupId>
+ <artifactId>projects</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>MaterialDesignLite</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <packaging>swc</packaging>
+
+ <name>Apache Royale: Framework: Libs: Material Design Lite</name>
+
+ <build>
+ <sourceDirectory>src/main/royale</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.royale.compiler</groupId>
+ <artifactId>royale-maven-plugin</artifactId>
+ <version>${royale.compiler.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/royale/mdl</uri>
+ <manifest>${project.basedir}/src/main/resources/mdl-manifest.xml</manifest>
+ </namespace>
+ <namespace>
+ <type>as</type>
+ <uri>library://ns.apache.org/royale/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>
+ <skipExtern>true</skipExtern>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Core</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Core</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Binding</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Binding</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Graphics</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Graphics</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Collections</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Collections</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Basic</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>Basic</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>HTML</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>swf</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.royale.framework</groupId>
+ <artifactId>HTML</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ <type>swc</type>
+ <classifier>js</classifier>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index a40b0ef..52404b2 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -58,7 +58,6 @@
<component id="ListItemSecondaryInfo" class="org.apache.royale.mdl.beads.ListItemSecondaryInfo"/>
<component id="ListItemTextBody" class="org.apache.royale.mdl.beads.ListItemTextBody"/>
<component id="Table" class="org.apache.royale.mdl.Table"/>
- <component id="THead" class="org.apache.royale.mdl.THead"/>
<component id="TableColumn" class="org.apache.royale.mdl.TableColumn"/>
<component id="TableRowItemRenderer" class="org.apache.royale.mdl.itemRenderers.TableRowItemRenderer"/>
<component id="TableRowItemSingleSelectionMouseRenderer" class="org.apache.royale.mdl.itemRenderers.TableRowItemSingleSelectionMouseRenderer"/>
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Button.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Button.as
index fdf5532..339d4ea 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Button.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Button.as
@@ -1,301 +1,348 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.TextButton;
- import org.apache.royale.mdl.beads.UpgradeElement;
- import org.apache.royale.mdl.supportClasses.IMaterialIconProvider;
- import org.apache.royale.mdl.materialIcons.IMaterialIcon;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * 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 Royale 0.8
- */
- public class Button extends TextButton implements IMaterialIconProvider
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Button()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
-
- addBead(new UpgradeElement());
- }
-
- /**
- * @private
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-button mdl-js-button";
-
- return addElementToWrapper(this,'button');
- }
-
- private var _materialIcon:IMaterialIcon;
- /**
- * A material icon to use with the button.
- * Optional
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get materialIcon():IMaterialIcon
- {
- return _materialIcon;
- }
- public function set materialIcon(value:IMaterialIcon):void
- {
- _materialIcon = value;
-
- COMPILE::JS
- {
- addElement(_materialIcon);
- }
- }
-
- private var _fab:Boolean = false;
- /**
- * A boolean flag to activate "mdl-button--fab" effect selector.
- * Applies fab (circular) display effect. Mutually exclusive with raised, mini-fab, and icon.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get fab():Boolean
- {
- return _fab;
- }
- public function set fab(value:Boolean):void
- {
- _fab = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-button--fab", _fab);
- typeNames = element.className;
- }
- }
-
- private var _raised:Boolean = false;
- /**
- * A boolean flag to activate "mdl-button--raised" effect selector.
- * Applies raised display effect. Mutually exclusive with fab, mini-fab, and icon.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get raised():Boolean
- {
- return _raised;
- }
- public function set raised(value:Boolean):void
- {
- _raised = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-button--raised", _raised);
- typeNames = element.className;
- }
- }
-
- private var _colored:Boolean = false;
- /**
- * A boolean flag to activate "mdl-button--colored" effect selector.
- * Applies colored display effect (primary or accent color, depending on the type of button).
- * Colors are defined in material.min.css
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get colored():Boolean
- {
- return _colored;
- }
- public function set colored(value:Boolean):void
- {
- _colored = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-button--colored", _colored);
- typeNames = element.className;
- }
- }
-
- private var _accent:Boolean = false;
- /**
- * A boolean flag to activate "mdl-button--accent" effect selector.
- * Applies accent color display effect.
- * Colors are defined in material.min.css.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get accent():Boolean
- {
- return _accent;
- }
- public function set accent(value:Boolean):void
- {
- _accent = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-button--accent", _accent);
- typeNames = element.className;
- }
- }
-
- private var _primary:Boolean = false;
- /**
- * A boolean flag to activate "mdl-button--primary" effect selector.
- * Applies primary color display effect.
- * Colors are defined in material.min.css
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get primary():Boolean
- {
- return _primary;
- }
- public function set primary(value:Boolean):void
- {
- _primary = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-button--primary", _primary);
- typeNames = element.className;
- }
- }
-
- private var _minifab:Boolean = false;
- /**
- * A boolean flag to activate "mdl-button--mini-fab" effect selector.
- * Applies mini-fab (small fab circular) display effect.
- * Mutually exclusive with raised, fab, and icon
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get minifab():Boolean
- {
- return _minifab;
- }
- public function set minifab(value:Boolean):void
- {
- _minifab = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-button--mini-fab", _minifab);
- typeNames = element.className;
- }
- }
-
- private var _icon:Boolean = false;
- /**
- * A boolean flag to activate "mdl-button--icon" effect selector.
- * Applies icon (small plain circular) display effect.
- * Mutually exclusive with raised, fab, and mini-fab
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get icon():Boolean
- {
- return _icon;
- }
- public function set icon(value:Boolean):void
- {
- _icon = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-button--icon", _icon);
- typeNames = element.className;
- }
- }
-
- protected var _ripple:Boolean = false;
- /**
- * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
- * Applies ripple click effect. May be used in combination with any other classes
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get ripple():Boolean
- {
- return _ripple;
- }
- public function set ripple(value:Boolean):void
- {
- _ripple = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-js-ripple-effect", _ripple);
- typeNames = element.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.TextButton;
+ import org.apache.royale.mdl.beads.UpgradeElement;
+ import org.apache.royale.mdl.supportClasses.IMaterialIconProvider;
+ import org.apache.royale.mdl.materialIcons.IMaterialIcon;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * 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 Royale 0.8
+ */
+ public class Button extends TextButton implements IMaterialIconProvider
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Button()
+ {
+ super();
+
+ typeNames = "mdl-button mdl-js-button";
+
+ addBead(new UpgradeElement());
+ }
+
+ /**
+ * @private
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ return addElementToWrapper(this,'button');
+ }
+
+ private var _materialIcon:IMaterialIcon;
+ /**
+ * A material icon to use with the button.
+ * Optional
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get materialIcon():IMaterialIcon
+ {
+ return _materialIcon;
+ }
+ public function set materialIcon(value:IMaterialIcon):void
+ {
+ _materialIcon = value;
+
+ COMPILE::JS
+ {
+ addElement(_materialIcon);
+ }
+ }
+
+ private var _fab:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-button--fab" effect selector.
+ * Applies fab (circular) display effect. Mutually exclusive with raised, mini-fab, and icon.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get fab():Boolean
+ {
+ return _fab;
+ }
+ public function set fab(value:Boolean):void
+ {
+ if (_fab != value)
+ {
+ _fab = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-button--fab");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-button--fab");
+ }
+ }
+ }
+ }
+
+ private var _raised:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-button--raised" effect selector.
+ * Applies raised display effect. Mutually exclusive with fab, mini-fab, and icon.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get raised():Boolean
+ {
+ return _raised;
+ }
+ public function set raised(value:Boolean):void
+ {
+ if (_raised != value)
+ {
+ _raised = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-button--raised");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-button--raised");
+ }
+ }
+ }
+ }
+
+ private var _colored:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-button--colored" effect selector.
+ * Applies colored display effect (primary or accent color, depending on the type of button).
+ * Colors are defined in material.min.css
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get colored():Boolean
+ {
+ return _colored;
+ }
+ public function set colored(value:Boolean):void
+ {
+ if (_colored != value)
+ {
+ _colored = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-button--colored");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-button--colored");
+ }
+ }
+ }
+ }
+
+ private var _accent:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-button--accent" effect selector.
+ * Applies accent color display effect.
+ * Colors are defined in material.min.css.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get accent():Boolean
+ {
+ return _accent;
+ }
+ public function set accent(value:Boolean):void
+ {
+ if (_accent != value)
+ {
+ _accent = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-button--accent");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-button--accent");
+ }
+ }
+ }
+ }
+
+ private var _primary:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-button--primary" effect selector.
+ * Applies primary color display effect.
+ * Colors are defined in material.min.css
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get primary():Boolean
+ {
+ return _primary;
+ }
+ public function set primary(value:Boolean):void
+ {
+ if (_primary != value)
+ {
+ _primary = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-button--primary");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-button--primary");
+ }
+ }
+ }
+ }
+
+ private var _minifab:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-button--mini-fab" effect selector.
+ * Applies mini-fab (small fab circular) display effect.
+ * Mutually exclusive with raised, fab, and icon
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get minifab():Boolean
+ {
+ return _minifab;
+ }
+ public function set minifab(value:Boolean):void
+ {
+ if (_minifab != value)
+ {
+ _minifab = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-button--mini-fab");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-button--mini-fab");
+ }
+ }
+ }
+ }
+
+ private var _icon:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-button--icon" effect selector.
+ * Applies icon (small plain circular) display effect.
+ * Mutually exclusive with raised, fab, and mini-fab
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get icon():Boolean
+ {
+ return _icon;
+ }
+ public function set icon(value:Boolean):void
+ {
+ if (_icon != value)
+ {
+ _icon = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-button--icon");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-button--icon");
+ }
+ }
+ }
+ }
+
+ protected var _ripple:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
+ * Applies ripple click effect. May be used in combination with any other classes
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get ripple():Boolean
+ {
+ return _ripple;
+ }
+ public function set ripple(value:Boolean):void
+ {
+ if (_ripple != value)
+ {
+ _ripple = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-js-ripple-effect");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-js-ripple-effect");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/ButtonChip.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/ButtonChip.as
index d5c0b71..b5f7e6d 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/ButtonChip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/ButtonChip.as
@@ -1,67 +1,72 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.ChipBase;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * ButtonChip class represents a MDL button chip variant
- * Chips are complex entities in small blocks.
- *
- * The Material Design Lite (MDL) chip component is a small, interactive element.
- * Chips are commonly used for contacts, text, rules, icons, and photos.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class ButtonChip extends ChipBase
- {
- COMPILE::JS
- private var chip:HTMLButtonElement;
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion HTMLSpanElement
- * @royaleignorecoercion HTMLButtonElement
- * @royaleignorecoercion Text
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-chip";
-
- chipTextSpan = document.createElement("span") as HTMLSpanElement;
- chipTextSpan.classList.add("mdl-chip__text");
-
- textNode = document.createTextNode('') as Text;
- chipTextSpan.appendChild(textNode);
- chip = addElementToWrapper(this,'button') as HTMLButtonElement;
- chip.appendChild(chipTextSpan);
- return element;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.ChipBase;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * ButtonChip class represents a MDL button chip variant
+ * Chips are complex entities in small blocks.
+ *
+ * The Material Design Lite (MDL) chip component is a small, interactive element.
+ * Chips are commonly used for contacts, text, rules, icons, and photos.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class ButtonChip extends ChipBase
+ {
+ public function ButtonChip()
+ {
+ super();
+
+ typeNames = "mdl-chip";
+ }
+
+ COMPILE::JS
+ private var chip:HTMLButtonElement;
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion HTMLSpanElement
+ * @royaleignorecoercion HTMLButtonElement
+ * @royaleignorecoercion Text
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ chipTextSpan = document.createElement("span") as HTMLSpanElement;
+ chipTextSpan.classList.add("mdl-chip__text");
+
+ textNode = document.createTextNode('') as Text;
+ chipTextSpan.appendChild(textNode);
+ chip = addElementToWrapper(this,'button') as HTMLButtonElement;
+ chip.appendChild(chipTextSpan);
+ return element;
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Card.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Card.as
index 14f7421..3a5e539 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Card.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Card.as
@@ -1,104 +1,90 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The Card class is a self-contained pieces of paper with data.
- * The Material Design Lite (MDL) card component is a user interface element
- * representing a virtual piece of paper that contains related data — such as a
- * photo, some text, and a link — that are all about a single subject.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Card extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Card()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-card";
- return addElementToWrapper(this,'div');
- }
-
- protected var _shadow:Number = 0;
- /**
- * A boolean flag to activate "mdl-shadow--Xdp" effect selector.
- * Assigns variable shadow depths (0, 2, 3, 4, 6, 8, or 16) to card
- *
- * Cards are a convenient means of coherently displaying related content
- * that is composed of different types of objects. They are also well-suited
- * for presenting similar objects whose size or supported actions can vary
- * considerably, like photos with captions of variable length. Cards have
- * a constant width and a variable height, depending on their content.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get shadow():Number
- {
- return _shadow;
- }
- public function set shadow(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-shadow--" + _shadow + "dp");
-
- if(value == 2 || value == 3 || value == 4 || value == 6 || value == 8 || value == 16)
- {
- _shadow = value;
-
- element.classList.add("mdl-shadow--" + _shadow + "dp");
- }
-
- typeNames = element.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+ /**
+ * The Card class is a self-contained pieces of paper with data.
+ * The Material Design Lite (MDL) card component is a user interface element
+ * representing a virtual piece of paper that contains related data — such as a
+ * photo, some text, and a link — that are all about a single subject.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Card extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Card()
+ {
+ super();
+
+ typeNames = "mdl-card";
+ }
+
+ protected var _shadow:Number = 0;
+ /**
+ * A boolean flag to activate "mdl-shadow--Xdp" effect selector.
+ * Assigns variable shadow depths (0, 2, 3, 4, 6, 8, or 16) to card
+ *
+ * Cards are a convenient means of coherently displaying related content
+ * that is composed of different types of objects. They are also well-suited
+ * for presenting similar objects whose size or supported actions can vary
+ * considerably, like photos with captions of variable length. Cards have
+ * a constant width and a variable height, depending on their content.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get shadow():Number
+ {
+ return _shadow;
+ }
+ public function set shadow(value:Number):void
+ {
+ if (_shadow != value)
+ {
+ COMPILE::JS
+ {
+ className = addOrReplaceClassName(className, "mdl-shadow--" + value + "dp", "mdl-shadow--" + _shadow + "dp");
+ if (value == 2 || value == 3 || value == 4 || value == 6 || value == 8 || value == 16)
+ {
+ _shadow = value;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardActions.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardActions.as
index eccc92a..901d5a5 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardActions.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardActions.as
@@ -1,64 +1,50 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.CardInner;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The CardActions class is a inner card container component.
- * Its mission is to hold buttons or other ways to present
- * actions for the user.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class CardActions extends CardInner
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function CardActions()
- {
- super();
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-card__actions";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.CardInner;
+
+ /**
+ * The CardActions class is a inner card container component.
+ * Its mission is to hold buttons or other ways to present
+ * actions for the user.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class CardActions extends CardInner
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function CardActions()
+ {
+ super();
+
+ typeNames = "mdl-card__actions";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMedia.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMedia.as
index 12e4cc1..681c690 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMedia.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMedia.as
@@ -1,63 +1,49 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.CardInner;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The CardMedia class is a inner card container component.
- * Its mission is to hold media like photos, images or video content.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class CardMedia extends CardInner
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function CardMedia()
- {
- super();
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-card__media";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.CardInner;
+
+ /**
+ * The CardMedia class is a inner card container component.
+ * Its mission is to hold media like photos, images or video content.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class CardMedia extends CardInner
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function CardMedia()
+ {
+ super();
+
+ typeNames = "mdl-card__media";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMenu.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMenu.as
index 2d0abde..f614e8a 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMenu.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardMenu.as
@@ -1,63 +1,49 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.CardInner;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The CardMenu class is a inner card container component.
- * Its mission is to hold menu options for the user to interact.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class CardMenu extends CardInner
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function CardMenu()
- {
- super();
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-card__menu";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.CardInner;
+
+ /**
+ * The CardMenu class is a inner card container component.
+ * Its mission is to hold menu options for the user to interact.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class CardMenu extends CardInner
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function CardMenu()
+ {
+ super();
+
+ typeNames = "mdl-card__menu";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardSupportingText.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardSupportingText.as
index 40008c0..7c00305 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardSupportingText.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardSupportingText.as
@@ -1,63 +1,49 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.CardInner;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The CardSupportingText class is a inner card container component.
- * Its mission is to hold text info for the user.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class CardSupportingText extends CardInner
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function CardSupportingText()
- {
- super();
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-card__supporting-text";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.CardInner;
+
+ /**
+ * The CardSupportingText class is a inner card container component.
+ * Its mission is to hold text info for the user.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class CardSupportingText extends CardInner
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function CardSupportingText()
+ {
+ super();
+
+ typeNames = "mdl-card__supporting-text";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitle.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitle.as
index 23651d2..b4327d9 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitle.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitle.as
@@ -1,63 +1,49 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.CardInner;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The CardTitle class is a inner card container component.
- * Its mission is to hold the title of the card
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class CardTitle extends CardInner
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function CardTitle()
- {
- super();
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-card__title";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.CardInner;
+
+ /**
+ * The CardTitle class is a inner card container component.
+ * Its mission is to hold the title of the card
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class CardTitle extends CardInner
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function CardTitle()
+ {
+ super();
+
+ typeNames = "mdl-card__title";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitleText.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitleText.as
index 994e323..1157487 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitleText.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CardTitleText.as
@@ -1,72 +1,71 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.elements.H2;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The CardTitleText class is an extended H2 heading used in MDL CardTitle.
- *
- * (This is implemented as a class H4 and not as a bead that decorates other html text
- * classes since MDL generate the same visuals for all of them)
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class CardTitleText extends H2
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function CardTitleText()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion Text
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-card__title-text";
- addElementToWrapper(this,'h2');
-
- textNode = document.createTextNode('') as Text;
- element.appendChild(textNode);
- return element;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.elements.H2;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The CardTitleText class is an extended H2 heading used in MDL CardTitle.
+ *
+ * (This is implemented as a class H4 and not as a bead that decorates other html text
+ * classes since MDL generate the same visuals for all of them)
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class CardTitleText extends H2
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function CardTitleText()
+ {
+ super();
+
+ typeNames = "mdl-card__title-text";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion Text
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ addElementToWrapper(this,'h2');
+
+ textNode = document.createTextNode('') as Text;
+ element.appendChild(textNode);
+ return element;
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CheckBox.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CheckBox.as
index 9baaae2..aa1ed97 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CheckBox.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/CheckBox.as
@@ -1,264 +1,268 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.CheckBox;
- import org.apache.royale.core.IToggleButtonModel;
- import org.apache.royale.mdl.beads.UpgradeChildren;
- import org.apache.royale.mdl.beads.UpgradeElement;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.events.Event;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The CheckBox class provides a MDL UI-like appearance for a CheckBox.
- *
- * The Material Design Lite (MDL) checkbox component is an enhanced version
- * of the standard HTML <input type="checkbox"> element. A checkbox consists
- * of a small square and, typically, text that clearly communicates a binary
- * condition that will be set or unset when the user clicks or touches it.
- * Checkboxes typically, but not necessarily, appear in groups, and can be
- * selected and deselected individually. The MDL checkbox component allows
- * you to add display and click effects.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class CheckBox extends org.apache.royale.html.CheckBox
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function CheckBox()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
-
- addBead(new UpgradeElement());
- addBead(new UpgradeChildren(["mdl-checkbox__ripple-container"]));
- }
-
- COMPILE::JS
- protected var input:HTMLInputElement;
-
- COMPILE::JS
- protected var checkbox:HTMLSpanElement;
-
- COMPILE::JS
- protected var label:HTMLLabelElement;
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion HTMLLabelElement
- * @royaleignorecoercion HTMLInputElement
- * @royaleignorecoercion HTMLSpanElement
- * @royaleignorecoercion Text
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-checkbox mdl-js-checkbox";
-
-
- label = addElementToWrapper(this,'label') as HTMLLabelElement;
-
- input = document.createElement('input') as HTMLInputElement;
- input.type = 'checkbox';
- input.className = 'mdl-checkbox__input';
- label.appendChild(input);
-
- checkbox = document.createElement('span') as HTMLSpanElement;
- checkbox.className = 'mdl-checkbox__label';
- label.appendChild(checkbox);
-
- (input as WrappedHTMLElement).royale_wrapper = this;
- (checkbox as WrappedHTMLElement).royale_wrapper = this;
- return element;
- }
-
- protected var _ripple:Boolean = false;
-
- /**
- * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
- * Applies ripple click effect. May be used in combination with any other classes
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get ripple():Boolean
- {
- return _ripple;
- }
- public function set ripple(value:Boolean):void
- {
- _ripple = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-js-ripple-effect", _ripple);
- typeNames = element.className;
- }
- }
-
- /**
- * The text label for the CheckBox.
- *
- * @royaleignorecoercion Text
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- override public function get text():String
- {
- COMPILE::SWF
- {
- return IToggleButtonModel(model).text;
- }
- COMPILE::JS
- {
- return textNode ? textNode.nodeValue : "";
- }
- }
-
- /**
- * @private
- */
- override public function set text(value:String):void
- {
- COMPILE::SWF
- {
- IToggleButtonModel(model).text = value;
- }
-
- COMPILE::JS
- {
- if(!textNode)
- {
- textNode = document.createTextNode('') as Text;
- checkbox.appendChild(textNode);
- }
-
- textNode.nodeValue = value;
- }
- }
-
- /**
- * The value associated with the CheckBox.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.9
- */
- public function get value():String
- {
- COMPILE::SWF
- {
- return IToggleButtonModel(model).html;
- }
-
- COMPILE::JS
- {
- return input.value;
- }
- }
- public function set value(newValue:String):void
- {
- COMPILE::SWF
- {
- IToggleButtonModel(model).html = newValue;
- }
-
- COMPILE::JS
- {
- input.value = newValue;
- }
- }
-
- COMPILE::JS
- protected var textNode:Text;
-
- [Bindable("change")]
- /**
- * <code>true</code> if the check mark is displayed.
- *
- * @default false
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- override public function get selected():Boolean
- {
- COMPILE::SWF
- {
- return IToggleButtonModel(model).selected;
- }
- COMPILE::JS
- {
- return input.checked;
- }
- }
-
- /**
- * @private
- */
- override public function set selected(value:Boolean):void
- {
- COMPILE::SWF
- {
- IToggleButtonModel(model).selected = value;
- }
-
- COMPILE::JS
- {
- if(input.checked == value)
- return;
- var instance:Object = element['MaterialCheckbox'];
- if(instance)
- {
- if(value)
- instance["check"]();
- else
- instance["uncheck"]();
- }
- else
- input.checked = value;
- dispatchEvent(new Event(Event.CHANGE));
- }
- }
- }
-
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.CheckBox;
+ import org.apache.royale.core.IToggleButtonModel;
+ import org.apache.royale.mdl.beads.UpgradeChildren;
+ import org.apache.royale.mdl.beads.UpgradeElement;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.events.Event;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The CheckBox class provides a MDL UI-like appearance for a CheckBox.
+ *
+ * The Material Design Lite (MDL) checkbox component is an enhanced version
+ * of the standard HTML <input type="checkbox"> element. A checkbox consists
+ * of a small square and, typically, text that clearly communicates a binary
+ * condition that will be set or unset when the user clicks or touches it.
+ * Checkboxes typically, but not necessarily, appear in groups, and can be
+ * selected and deselected individually. The MDL checkbox component allows
+ * you to add display and click effects.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class CheckBox extends org.apache.royale.html.CheckBox
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function CheckBox()
+ {
+ super();
+
+ typeNames = "mdl-checkbox mdl-js-checkbox";
+
+ addBead(new UpgradeElement());
+ addBead(new UpgradeChildren(["mdl-checkbox__ripple-container"]));
+ }
+
+ COMPILE::JS
+ protected var input:HTMLInputElement;
+
+ COMPILE::JS
+ protected var checkbox:HTMLSpanElement;
+
+ COMPILE::JS
+ protected var label:HTMLLabelElement;
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion HTMLLabelElement
+ * @royaleignorecoercion HTMLInputElement
+ * @royaleignorecoercion HTMLSpanElement
+ * @royaleignorecoercion Text
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ label = addElementToWrapper(this,'label') as HTMLLabelElement;
+
+ input = document.createElement('input') as HTMLInputElement;
+ input.type = 'checkbox';
+ input.className = 'mdl-checkbox__input';
+ label.appendChild(input);
+
+ checkbox = document.createElement('span') as HTMLSpanElement;
+ checkbox.className = 'mdl-checkbox__label';
+ label.appendChild(checkbox);
+
+ (input as WrappedHTMLElement).royale_wrapper = this;
+ (checkbox as WrappedHTMLElement).royale_wrapper = this;
+ return element;
+ }
+
+ protected var _ripple:Boolean = false;
+
+ /**
+ * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
+ * Applies ripple click effect. May be used in combination with any other classes
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get ripple():Boolean
+ {
+ return _ripple;
+ }
+ public function set ripple(value:Boolean):void
+ {
+ if (_ripple != value)
+ {
+ _ripple = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-js-ripple-effect");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-js-ripple-effect");
+ }
+ }
+ }
+ }
+
+ /**
+ * The text label for the CheckBox.
+ *
+ * @royaleignorecoercion Text
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ override public function get text():String
+ {
+ COMPILE::SWF
+ {
+ return IToggleButtonModel(model).text;
+ }
+ COMPILE::JS
+ {
+ return textNode ? textNode.nodeValue : "";
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function set text(value:String):void
+ {
+ COMPILE::SWF
+ {
+ IToggleButtonModel(model).text = value;
+ }
+
+ COMPILE::JS
+ {
+ if(!textNode)
+ {
+ textNode = document.createTextNode('') as Text;
+ checkbox.appendChild(textNode);
+ }
+
+ textNode.nodeValue = value;
+ }
+ }
+
+ /**
+ * The value associated with the CheckBox.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9
+ */
+ public function get value():String
+ {
+ COMPILE::SWF
+ {
+ return IToggleButtonModel(model).html;
+ }
+
+ COMPILE::JS
+ {
+ return input.value;
+ }
+ }
+ public function set value(newValue:String):void
+ {
+ COMPILE::SWF
+ {
+ IToggleButtonModel(model).html = newValue;
+ }
+
+ COMPILE::JS
+ {
+ input.value = newValue;
+ }
+ }
+
+ COMPILE::JS
+ protected var textNode:Text;
+
+ [Bindable("change")]
+ /**
+ * <code>true</code> if the check mark is displayed.
+ *
+ * @default false
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ override public function get selected():Boolean
+ {
+ COMPILE::SWF
+ {
+ return IToggleButtonModel(model).selected;
+ }
+ COMPILE::JS
+ {
+ return input.checked;
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function set selected(value:Boolean):void
+ {
+ COMPILE::SWF
+ {
+ IToggleButtonModel(model).selected = value;
+ }
+
+ COMPILE::JS
+ {
+ if(input.checked == value)
+ return;
+ var instance:Object = element['MaterialCheckbox'];
+ if(instance)
+ {
+ if(value)
+ instance["check"]();
+ else
+ instance["uncheck"]();
+ }
+ else
+ input.checked = value;
+ dispatchEvent(new Event(Event.CHANGE));
+ }
+ }
+ }
+
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Chip.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Chip.as
index 1e13f29..d1d20aa 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Chip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Chip.as
@@ -1,68 +1,72 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.ChipBase;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * Chip class represents a MDL basic Chip
- * Chips are complex entities in small blocks.
- *
- * The Material Design Lite (MDL) chip component is a small, interactive element.
- * Chips are commonly used for contacts, text, rules, icons, and photos.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Chip extends ChipBase
- {
- COMPILE::JS
- private var chip:HTMLSpanElement;
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion HTMLSpanElement
- * @royaleignorecoercion Text
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-chip";
-
- chipTextSpan = document.createElement("span") as HTMLSpanElement;
- chipTextSpan.classList.add("mdl-chip__text");
-
- textNode = document.createTextNode('') as Text;
- chipTextSpan.appendChild(textNode);
-
- chip = addElementToWrapper(this,'span') as HTMLSpanElement;
- chip.appendChild(chipTextSpan);
-
- return element;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.ChipBase;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * Chip class represents a MDL basic Chip
+ * Chips are complex entities in small blocks.
+ *
+ * The Material Design Lite (MDL) chip component is a small, interactive element.
+ * Chips are commonly used for contacts, text, rules, icons, and photos.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Chip extends ChipBase
+ {
+ public function Chip()
+ {
+ super();
+ typeNames = "mdl-chip";
+ }
+
+ COMPILE::JS
+ private var chip:HTMLSpanElement;
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion HTMLSpanElement
+ * @royaleignorecoercion Text
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ chipTextSpan = document.createElement("span") as HTMLSpanElement;
+ chipTextSpan.classList.add("mdl-chip__text");
+
+ textNode = document.createTextNode('') as Text;
+ chipTextSpan.appendChild(textNode);
+
+ chip = addElementToWrapper(this,'span') as HTMLSpanElement;
+ chip.appendChild(chipTextSpan);
+
+ return element;
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Dialog.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Dialog.as
index 5f331fd..99bfcb2 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Dialog.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Dialog.as
@@ -1,175 +1,173 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
- import org.apache.royale.mdl.Application;
- import org.apache.royale.core.IPopUp;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The MDL Dialog class creates modal windows for dedicated user input.
- * The Material Design Lite (MDL) dialog component allows for verification of user actions, simple data input,
- * and alerts to provide extra information to users.
- *
- * Note: Dialogs use the HTML <dialog> element, which currently has very limited cross-browser support.
- * To ensure support across all modern browsers, we use use dialogPolyfill extern or creating your own.
- * There is no polyfill included with MDL.
- *
- * Use DialogContent to insert content and DialogActions for the buttons to allow user interaction
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Dialog extends Group implements IPopUp
- {
- /**
- * constructor.
- *
- * <inject_html>
- * <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.css">
- * <script src="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.js"></script>
- * </inject_html>
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Dialog()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * The html dialog component that parents the dialog content
- */
- COMPILE::JS
- private var dialog:HTMLDialogElement;
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion HTMLDialogElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-dialog";
-
- dialog = addElementToWrapper(this,'dialog') as HTMLDialogElement;
- return element;
- }
-
- /**
- * flag to ensure only one dialog is created
- */
- private var lockDialogCreation:Boolean = false;
-
- /**
- * This function make the dialog be added to document.body only once
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- private function prepareDialog():void
- {
- COMPILE::JS
- {
- if(!lockDialogCreation)
- {
- lockDialogCreation = true;
- var body:HTMLElement = document.getElementsByTagName('body')[0];
- body.appendChild(element);
- this.addedToParent();
-
- if (!("showModal" in dialog))
- {
- window["dialogPolyfill"]["registerDialog"](dialog);
- }
- }
- }
- }
-
- /**
- * Displays the dialog element and makes it the top-most modal dialog.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function showModal():void
- {
- prepareDialog();
-
- COMPILE::JS
- {
- dialog.showModal()
- }
- }
-
- /**
- * Displays the dialog element.
- *
- * Note: It seems MDL does not support non modal dialogs, since there's no examples
- * and dialogs are always added to "document.body".
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function show():void
- {
- prepareDialog();
-
- COMPILE::JS
- {
- dialog.show();
- }
- }
-
- /**
- * Closes the dialog element.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function close():void
- {
- COMPILE::JS
- {
- dialog.close();
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+ import org.apache.royale.mdl.Application;
+ import org.apache.royale.core.IPopUp;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The MDL Dialog class creates modal windows for dedicated user input.
+ * The Material Design Lite (MDL) dialog component allows for verification of user actions, simple data input,
+ * and alerts to provide extra information to users.
+ *
+ * Note: Dialogs use the HTML <dialog> element, which currently has very limited cross-browser support.
+ * To ensure support across all modern browsers, we use use dialogPolyfill extern or creating your own.
+ * There is no polyfill included with MDL.
+ *
+ * Use DialogContent to insert content and DialogActions for the buttons to allow user interaction
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Dialog extends Group implements IPopUp
+ {
+ /**
+ * constructor.
+ *
+ * <inject_html>
+ * <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.css">
+ * <script src="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.js"></script>
+ * </inject_html>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Dialog()
+ {
+ super();
+
+ typeNames = "mdl-dialog";
+ }
+
+ /**
+ * The html dialog component that parents the dialog content
+ */
+ COMPILE::JS
+ private var dialog:HTMLDialogElement;
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion HTMLDialogElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ dialog = addElementToWrapper(this,'dialog') as HTMLDialogElement;
+ return element;
+ }
+
+ /**
+ * flag to ensure only one dialog is created
+ */
+ private var lockDialogCreation:Boolean = false;
+
+ /**
+ * This function make the dialog be added to document.body only once
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ private function prepareDialog():void
+ {
+ COMPILE::JS
+ {
+ if(!lockDialogCreation)
+ {
+ lockDialogCreation = true;
+ var body:HTMLElement = document.getElementsByTagName('body')[0];
+ body.appendChild(element);
+ this.addedToParent();
+
+ if (!("showModal" in dialog))
+ {
+ window["dialogPolyfill"]["registerDialog"](dialog);
+ }
+ }
+ }
+ }
+
+ /**
+ * Displays the dialog element and makes it the top-most modal dialog.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function showModal():void
+ {
+ prepareDialog();
+
+ COMPILE::JS
+ {
+ dialog.showModal()
+ }
+ }
+
+ /**
+ * Displays the dialog element.
+ *
+ * Note: It seems MDL does not support non modal dialogs, since there's no examples
+ * and dialogs are always added to "document.body".
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function show():void
+ {
+ prepareDialog();
+
+ COMPILE::JS
+ {
+ dialog.show();
+ }
+ }
+
+ /**
+ * Closes the dialog element.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function close():void
+ {
+ COMPILE::JS
+ {
+ dialog.close();
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogActions.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogActions.as
index 39f3323..c72e876 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogActions.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogActions.as
@@ -1,92 +1,89 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The DialogActions class is a container to use inside Dialog class
- * that holds buttons or other components to perform user actions
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class DialogActions extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function DialogActions()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-dialog__actions";
- return addElementToWrapper(this,'div');
- }
-
- protected var _fullWidth:Boolean = false;
- /**
- * A boolean flag to activate "mdl-dialog__actions--full-width" effect selector.
- * Modifies the actions to each take the full width of the container.
- * This makes each take their own line.
- * Optional on action container.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get fullWidth():Boolean
- {
- return _fullWidth;
- }
- public function set fullWidth(value:Boolean):void
- {
- _fullWidth = value;
-
- COMPILE::JS
- {
- positioner.classList.toggle("mdl-dialog__actions--full-width", _fullWidth);
- typeNames = positioner.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The DialogActions class is a container to use inside Dialog class
+ * that holds buttons or other components to perform user actions
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class DialogActions extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function DialogActions()
+ {
+ super();
+
+ typeNames = "mdl-dialog__actions";
+ }
+
+ protected var _fullWidth:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-dialog__actions--full-width" effect selector.
+ * Modifies the actions to each take the full width of the container.
+ * This makes each take their own line.
+ * Optional on action container.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get fullWidth():Boolean
+ {
+ return _fullWidth;
+ }
+ public function set fullWidth(value:Boolean):void
+ {
+ if (_fullWidth != value)
+ {
+ _fullWidth = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-dialog__actions--full-width");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-dialog__actions--full-width");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogContent.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogContent.as
index 6f43c91..19d9ff3 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogContent.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogContent.as
@@ -1,66 +1,50 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The DialogContent class is a container to use inside Dialog class
- * that holds content and information so the user gets notified and
- * could take some action.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class DialogContent extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function DialogContent()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-dialog__content";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ /**
+ * The DialogContent class is a container to use inside Dialog class
+ * that holds content and information so the user gets notified and
+ * could take some action.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class DialogContent extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function DialogContent()
+ {
+ super();
+
+ typeNames = "mdl-dialog__content";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogTitle.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogTitle.as
index 62e320a..599bef8 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogTitle.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DialogTitle.as
@@ -1,71 +1,69 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.elements.H4;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The DialogTitle class is an extended H4 heading used in Dialog.
- * (This is implemented as a class H4 and not as a bead that decorates other html text
- * classes since MDL generate the same visuals for all of them)
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class DialogTitle extends H4
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function DialogTitle()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion Text
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-dialog__title";
-
- addElementToWrapper(this,'h4');
- textNode = document.createTextNode('') as Text;
- element.appendChild(textNode);
- return element;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.elements.H4;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The DialogTitle class is an extended H4 heading used in Dialog.
+ * (This is implemented as a class H4 and not as a bead that decorates other html text
+ * classes since MDL generate the same visuals for all of them)
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class DialogTitle extends H4
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function DialogTitle()
+ {
+ super();
+
+ typeNames = "mdl-dialog__title";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion Text
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ addElementToWrapper(this,'h4');
+ textNode = document.createTextNode('') as Text;
+ element.appendChild(textNode);
+ return element;
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Drawer.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Drawer.as
index 2ce82d6..61b9edc 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Drawer.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Drawer.as
@@ -1,67 +1,51 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The Drawer class is a container component used for navigation
- * in smaller screens. Can appear automatically in smaller screens
- * and may be opened with the menu icon on any screen size.
- * If fixed could serve as sidebar navigation on larger screens.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Drawer extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Drawer()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-layout__drawer";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ /**
+ * The Drawer class is a container component used for navigation
+ * in smaller screens. Can appear automatically in smaller screens
+ * and may be opened with the menu icon on any screen size.
+ * If fixed could serve as sidebar navigation on larger screens.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Drawer extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Drawer()
+ {
+ super();
+
+ typeNames = "mdl-layout__drawer";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DropDownList.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DropDownList.as
index 0a9f599..00d7333 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DropDownList.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/DropDownList.as
@@ -1,213 +1,215 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.core.IItemRenderer;
- import org.apache.royale.core.ISelectionModel;
- import org.apache.royale.core.UIBase;
- import org.apache.royale.events.ItemAddedEvent;
- import org.apache.royale.html.DataContainer;
- import org.apache.royale.html.elements.Select;
- import org.apache.royale.mdl.beads.UpgradeElement;
- import org.apache.royale.mdl.beads.models.IDropDownListModel;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- [Event(name="change", type="org.apache.royale.events.Event")]
-
- /**
- * The DropDownList class is a component that displays label field and
- * Select with Options. Selecting an item from the pop-up list
- * places that item into the label field of the DropDownList.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class DropDownList extends DataContainer
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function DropDownList()
- {
- super();
-
- className = "";
-
- addBead(new UpgradeElement());
- }
-
- private var _prompt:String = "";
-
- /**
- * The prompt for the DropDownList control.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.9
- */
- public function get prompt():String
- {
- return _prompt;
- }
-
- public function set prompt(value:String):void
- {
- _prompt = value;
- }
-
- protected var _dropDown:Select;
-
- public function get dropDown():Select
- {
- return _dropDown;
- }
-
- public function set dropDown(value:Select):void
- {
- _dropDown = value;
- }
-
- COMPILE::JS
- {
- protected var _labelDisplay:HTMLLabelElement;
-
- /**
- * @royaleignorecoercion HTMLLabelElement
- */
- public function get labelDisplay():HTMLLabelElement
- {
- return _labelDisplay;
- }
-
- /**
- * @royaleignorecoercion HTMLLabelElement
- */
- public function set labelDisplay(value:HTMLLabelElement):void
- {
- _labelDisplay = value;
- }
- }
-
- [Bindable("change")]
- /**
- * @copy org.apache.royale.core.IDropDownListModel#selectedValue
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.9
- */
- public function get selectedValue():String
- {
- return IDropDownListModel(model).selectedValue;
- }
- public function set selectedValue(value:String):void
- {
- IDropDownListModel(model).selectedValue = value;
- }
-
- [Bindable("change")]
- /**
- * @copy org.apache.royale.core.ISelectionModel#selectedIndex
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get selectedIndex():int
- {
- return ISelectionModel(model).selectedIndex;
- }
- public function set selectedIndex(value:int):void
- {
- ISelectionModel(model).selectedIndex = value;
- }
-
- [Bindable("change")]
- /**
- * @copy org.apache.royale.core.ISelectionModel#selectedItem
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get selectedItem():Object
- {
- return ISelectionModel(model).selectedItem;
- }
- public function set selectedItem(value:Object):void
- {
- ISelectionModel(model).selectedItem = value;
- }
-
- override public function removeAllItemRenderers():void
- {
- COMPILE::JS
- {
- var optionsCount:int = dropDown.numElements;
-
- for (var i:int = 1; i < optionsCount; i++)
- {
- var item:UIBase = dropDown.getElementAt(i) as UIBase;
- dropDown.removeElement(item);
- }
- }
- }
-
- override public function addItemRenderer(renderer:IItemRenderer):void
- {
- COMPILE::JS
- {
- dropDown.addElement(renderer);
- }
-
- var newEvent:ItemAddedEvent = new ItemAddedEvent("itemAdded");
- newEvent.item = renderer;
-
- dispatchEvent(newEvent);
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = 'mdl-textfield mdl-js-textfield';
- addElementToWrapper(this,'div');
- element.classList.add("mdl-textfield--floating-label");
- return element;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.core.IItemRenderer;
+ import org.apache.royale.core.ISelectionModel;
+ import org.apache.royale.core.UIBase;
+ import org.apache.royale.events.ItemAddedEvent;
+ import org.apache.royale.html.DataContainer;
+ import org.apache.royale.html.elements.Select;
+ import org.apache.royale.mdl.beads.UpgradeElement;
+ import org.apache.royale.mdl.beads.models.IDropDownListModel;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ [Event(name="change", type="org.apache.royale.events.Event")]
+
+ /**
+ * The DropDownList class is a component that displays label field and
+ * Select with Options. Selecting an item from the pop-up list
+ * places that item into the label field of the DropDownList.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class DropDownList extends DataContainer
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function DropDownList()
+ {
+ super();
+
+ typeNames = 'mdl-textfield mdl-js-textfield';
+
+ addBead(new UpgradeElement());
+ }
+
+ private var _prompt:String = "";
+
+ /**
+ * The prompt for the DropDownList control.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9
+ */
+ public function get prompt():String
+ {
+ return _prompt;
+ }
+
+ public function set prompt(value:String):void
+ {
+ _prompt = value;
+ }
+
+ protected var _dropDown:Select;
+
+ public function get dropDown():Select
+ {
+ return _dropDown;
+ }
+
+ public function set dropDown(value:Select):void
+ {
+ _dropDown = value;
+ }
+
+ COMPILE::JS
+ {
+ protected var _labelDisplay:HTMLLabelElement;
+
+ /**
+ * @royaleignorecoercion HTMLLabelElement
+ */
+ public function get labelDisplay():HTMLLabelElement
+ {
+ return _labelDisplay;
+ }
+
+ /**
+ * @royaleignorecoercion HTMLLabelElement
+ */
+ public function set labelDisplay(value:HTMLLabelElement):void
+ {
+ _labelDisplay = value;
+ }
+ }
+
+ [Bindable("change")]
+ /**
+ * @copy org.apache.royale.core.IDropDownListModel#selectedValue
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.9
+ */
+ public function get selectedValue():String
+ {
+ return IDropDownListModel(model).selectedValue;
+ }
+ public function set selectedValue(value:String):void
+ {
+ IDropDownListModel(model).selectedValue = value;
+ }
+
+ [Bindable("change")]
+ /**
+ * @copy org.apache.royale.core.ISelectionModel#selectedIndex
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get selectedIndex():int
+ {
+ return ISelectionModel(model).selectedIndex;
+ }
+ public function set selectedIndex(value:int):void
+ {
+ ISelectionModel(model).selectedIndex = value;
+ }
+
+ [Bindable("change")]
+ /**
+ * @copy org.apache.royale.core.ISelectionModel#selectedItem
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get selectedItem():Object
+ {
+ return ISelectionModel(model).selectedItem;
+ }
+ public function set selectedItem(value:Object):void
+ {
+ ISelectionModel(model).selectedItem = value;
+ }
+
+ override public function removeAllItemRenderers():void
+ {
+ COMPILE::JS
+ {
+ var optionsCount:int = dropDown.numElements;
+
+ for (var i:int = 1; i < optionsCount; i++)
+ {
+ var item:UIBase = dropDown.getElementAt(i) as UIBase;
+ dropDown.removeElement(item);
+ }
+ }
+ }
+
+ override public function addItemRenderer(renderer:IItemRenderer):void
+ {
+ COMPILE::JS
+ {
+ dropDown.addElement(renderer);
+ }
+
+ var newEvent:ItemAddedEvent = new ItemAddedEvent("itemAdded");
+ newEvent.item = renderer;
+
+ dispatchEvent(newEvent);
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ element = super.createElement();
+
+ className = addOrReplaceClassName(className, "mdl-textfield--floating-label");
+
+ return element;
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Footer.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Footer.as
index a802673..eb1c4e5 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Footer.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Footer.as
@@ -1,96 +1,98 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The Footer class is a Container component capable of parenting other
- * components
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Footer extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Footer()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer";
- return addElementToWrapper(this,'footer');
- }
-
- protected var _mini:Boolean = false;
- /**
- * A boolean flag to activate "mdl-mega-footer" or "mdl-mini-footer" effect selector.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get mini():Boolean
- {
- return _mini;
- }
- public function set mini(value:Boolean):void
- {
- _mini = value;
-
- COMPILE::JS
- {
- element.classList.remove(typeNames);
- if(!_mini)
- {
- typeNames = "mdl-mega-footer";
- } else
- {
- typeNames = "mdl-mini-footer";
- }
- element.classList.add(typeNames);
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The Footer class is a Container component capable of parenting other
+ * components
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Footer extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Footer()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ return addElementToWrapper(this,'footer');
+ }
+
+ protected var _mini:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-mega-footer" or "mdl-mini-footer" effect selector.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get mini():Boolean
+ {
+ return _mini;
+ }
+ public function set mini(value:Boolean):void
+ {
+ _mini = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove(typeNames);
+ if(!_mini)
+ {
+ element.classList.add("mdl-mega-footer");
+ className = addOrReplaceClassName(className, "mdl-mega-footer");
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer";
+ className = addOrReplaceClassName(className, "mdl-mini-footer");
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterBottomSection.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterBottomSection.as
index eb1f6be..bc3e0d2 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterBottomSection.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterBottomSection.as
@@ -1,98 +1,90 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
- import org.apache.royale.mdl.supportClasses.IFooterSection;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterBottomSection class is a footer bottom container section capable
- * of parenting other components
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterBottomSection extends Group implements IFooterSection
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterBottomSection()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__bottom-section";
- return addElementToWrapper(this,'div');
- }
-
- /**
- * Configuration depends on parent Footer.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is Footer)
- {
- element.classList.remove(typeNames);
- if(!Footer(parent).mini)
- {
- typeNames = "mdl-mega-footer__bottom-section";
- } else
- {
- typeNames = "mdl-mini-footer__bottom-section";
- }
- element.classList.add(typeNames);
- }
- else
- {
- throw new Error("FooterBottomSection can not be used if parent is not a MDL Footer component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The FooterBottomSection class is a footer bottom container section capable
+ * of parenting other components
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterBottomSection extends Group implements IFooterSection
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterBottomSection()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__bottom-section";
+ }
+
+ /**
+ * Configuration depends on parent Footer.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is Footer)
+ {
+ element.classList.remove(typeNames);
+ if(!Footer(parent).mini)
+ {
+ className = addOrReplaceClassName(className, "mdl-mega-footer__bottom-section");
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer__bottom-section";
+ className = addOrReplaceClassName(className, "mdl-mini-footer__bottom-section");
+ }
+ }
+ else
+ {
+ throw new Error("FooterBottomSection can not be used if parent is not a MDL Footer component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterDropDownSection.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterDropDownSection.as
index 5705d35..9c9b715 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterDropDownSection.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterDropDownSection.as
@@ -1,98 +1,56 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
- import org.apache.royale.mdl.supportClasses.IFooterSection;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterDropDownSection class is a footer drop-down container (vertical)
- * content area.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterDropDownSection extends Group implements IFooterSection
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterDropDownSection()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__drop-down-section";
- return addElementToWrapper(this,'div');
- }
-
- /**
- * Configuration depends on parent Footer.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
-
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is FooterMiddleSection)
- {
- element.classList.remove(typeNames);
- if(!Footer(parent).mini)
- {
- typeNames = "mdl-mega-footer__drop-down-section";
- } else
- {
- typeNames = "mdl-mini-footer__drop-down-section";
- }
- element.classList.add(typeNames);
- }
- else
- {
- throw new Error("FooterDropDownSection can not be used if parent is not a MDL FooterMiddleSection component.");
- }
- }*/
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The FooterDropDownSection class is a footer drop-down container (vertical)
+ * content area.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterDropDownSection extends Group implements IFooterSection
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterDropDownSection()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__drop-down-section";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterHeading.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterHeading.as
index 0385e02..df11127 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterHeading.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterHeading.as
@@ -1,73 +1,71 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.elements.H1;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterHeading class is an extended H1 heading used in MDL footer
- * drop down section.
- *
- * (This is implemented as a class H4 and not as a bead that decorates other html text
- * classes since MDL generate the same visuals for all of them)
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterHeading extends H1
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterHeading()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion Text
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__heading";
-
- addElementToWrapper(this,'h1');
- textNode = document.createTextNode('') as Text;
- element.appendChild(textNode);
- return element;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.elements.H1;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The FooterHeading class is an extended H1 heading used in MDL footer
+ * drop down section.
+ *
+ * (This is implemented as a class H4 and not as a bead that decorates other html text
+ * classes since MDL generate the same visuals for all of them)
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterHeading extends H1
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterHeading()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__heading";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion Text
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ addElementToWrapper(this,'h1');
+ textNode = document.createTextNode('') as Text;
+ element.appendChild(textNode);
+ return element;
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLeftSection.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLeftSection.as
index 2d54c4a..8644d25 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLeftSection.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLeftSection.as
@@ -1,101 +1,95 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
- import org.apache.royale.mdl.supportClasses.IFooterSection;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterLeftSection class is a footer left container section capable
- * of parenting other components
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterLeftSection extends Group implements IFooterSection
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterLeftSection()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__left-section";
- return addElementToWrapper(this,'div');
- }
-
- /**
- * Configuration depends on parent Footer or IFooterSection.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is Footer)
- {
- element.classList.remove(typeNames);
- if(!Footer(parent).mini)
- {
- typeNames = "mdl-mega-footer__left-section";
- } else
- {
- typeNames = "mdl-mini-footer__left-section";
- }
- element.classList.add(typeNames);
- } else if(parent is IFooterSection)
- {
-
- }
- else
- {
- throw new Error("FooterLeftSection can not be used if parent is not a MDL Footer or IFooterSection component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The FooterLeftSection class is a footer left container section capable
+ * of parenting other components
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterLeftSection extends Group implements IFooterSection
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterLeftSection()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__left-section";
+ }
+
+ /**
+ * Configuration depends on parent Footer or IFooterSection.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is Footer)
+ {
+ element.classList.remove(typeNames);
+ if(!Footer(parent).mini)
+ {
+ className = addOrReplaceClassName(className, "mdl-mega-footer__left-section");
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer__left-section";
+ className = addOrReplaceClassName(className, "mdl-mini-footer__left-section");
+ }
+
+ }
+ else if(parent is IFooterSection)
+ {
+
+ }
+ else
+ {
+ throw new Error("FooterLeftSection can not be used if parent is not a MDL Footer or IFooterSection component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLinkList.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLinkList.as
index 4826303..b4efb8f 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLinkList.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLinkList.as
@@ -1,104 +1,106 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.supportClasses.IFooterSection;
- import org.apache.royale.core.UIBase;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * FooterLinkList class defines an footer unordered list as a drop-down (vertical) list
- * and relies on an itemRenderer factory to produce its children components
- * and on a layout to arrange them. This is the only UI element aside from the
- * itemRenderers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterLinkList extends List
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterLinkList()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__link-list";
- return addElementToWrapper(this,'ul');
- }
-
- /**
- * Configuration depends on parent Footer.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is IFooterSection)
- {
- var parentSection:IFooterSection = parent as IFooterSection;
- if(UIBase(parentSection).parent is Footer)
- {
- element.classList.remove(typeNames);
- if(!Footer(UIBase(parentSection).parent).mini)
- {
- typeNames = "mdl-mega-footer__link-list";
- } else
- {
- typeNames = "mdl-mini-footer__link-list";
- }
- element.classList.add(typeNames);
- }
- }
- else
- {
- throw new Error("FooterLinkList can not be used if parent is not a MDL Footer Section component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+ import org.apache.royale.core.UIBase;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * FooterLinkList class defines an footer unordered list as a drop-down (vertical) list
+ * and relies on an itemRenderer factory to produce its children components
+ * and on a layout to arrange them. This is the only UI element aside from the
+ * itemRenderers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterLinkList extends List
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterLinkList()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__link-list";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ return addElementToWrapper(this,'ul');
+ }
+
+ /**
+ * Configuration depends on parent Footer.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is IFooterSection)
+ {
+ var parentSection:IFooterSection = parent as IFooterSection;
+ if(UIBase(parentSection).parent is Footer)
+ {
+ element.classList.remove(typeNames);
+ if(!Footer(UIBase(parentSection).parent).mini)
+ {
+ className = addOrReplaceClassName(className, "mdl-mega-footer__link-list");
+
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer__link-list";
+ className = addOrReplaceClassName(className, "mdl-mini-footer__link-list");
+ }
+ }
+ }
+ else
+ {
+ throw new Error("FooterLinkList can not be used if parent is not a MDL Footer Section component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLogo.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLogo.as
index d89204a..37bda2a 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLogo.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterLogo.as
@@ -1,89 +1,79 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.elements.Div;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterLogo class defines a container as a styled section heading
- * This is used in footer bottom or left sections
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterLogo extends Div
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterLogo()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-logo";
- return addElementToWrapper(this,'div');
- }
-
- /**
- * Configuration depends on parent Footer.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is FooterLeftSection || parent is FooterBottomSection)
- {
- //ok
- }
- else
- {
- throw new Error("FooterLeftSection can not be used if parent is not a MDL Footer component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.elements.Div;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The FooterLogo class defines a container as a styled section heading
+ * This is used in footer bottom or left sections
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterLogo extends Div
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterLogo()
+ {
+ super();
+
+ typeNames = "mdl-logo";
+ }
+
+ /**
+ * Configuration depends on parent Footer.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is FooterLeftSection || parent is FooterBottomSection)
+ {
+ //ok
+ }
+ else
+ {
+ throw new Error("FooterLeftSection can not be used if parent is not a MDL Footer component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterMiddleSection.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterMiddleSection.as
index 66e7bd1..1d2026d 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterMiddleSection.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterMiddleSection.as
@@ -1,98 +1,90 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
- import org.apache.royale.mdl.supportClasses.IFooterSection;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterMiddleSection class is a footer middle container section capable
- * of parenting other components
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterMiddleSection extends Group implements IFooterSection
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterMiddleSection()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__middle-section";
- return addElementToWrapper(this,'div');
- }
-
- /**
- * Configuration depends on parent Footer.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is Footer)
- {
- element.classList.remove(typeNames);
- if(!Footer(parent).mini)
- {
- typeNames = "mdl-mega-footer__middle-section";
- } else
- {
- typeNames = "mdl-mini-footer__middle-section";
- }
- element.classList.add(typeNames);
- }
- else
- {
- throw new Error("FooterMiddleSection can not be used if parent is not a MDL Footer component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The FooterMiddleSection class is a footer middle container section capable
+ * of parenting other components
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterMiddleSection extends Group implements IFooterSection
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterMiddleSection()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__middle-section";
+ }
+
+ /**
+ * Configuration depends on parent Footer.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is Footer)
+ {
+ element.classList.remove(typeNames);
+ if(!Footer(parent).mini)
+ {
+ className = addOrReplaceClassName(className, "mdl-mega-footer__middle-section");
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer__middle-section";
+ className = addOrReplaceClassName(className, "mdl-mini-footer__middle-section");
+ }
+ }
+ else
+ {
+ throw new Error("FooterMiddleSection can not be used if parent is not a MDL Footer component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterRightSection.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterRightSection.as
index 63f8e62..aff9704 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterRightSection.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterRightSection.as
@@ -1,101 +1,95 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
- import org.apache.royale.mdl.supportClasses.IFooterSection;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterRightSection class is a footer right container section capable
- * of parenting other components
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterRightSection extends Group implements IFooterSection
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterRightSection()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__right-section";
- return addElementToWrapper(this,'div');
- }
-
- /**
- * Configuration depends on parent Footer or IFooterSection.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is Footer)
- {
- element.classList.remove(typeNames);
- if(!Footer(parent).mini)
- {
- typeNames = "mdl-mega-footer__right-section";
- } else
- {
- typeNames = "mdl-mini-footer__right-section";
- }
- element.classList.add(typeNames);
- } else if(parent is IFooterSection)
- {
-
- }
- else
- {
- throw new Error("FooterRightSection can not be used if parent is not a MDL Footer or IFooterSection component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The FooterRightSection class is a footer right container section capable
+ * of parenting other components
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterRightSection extends Group implements IFooterSection
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterRightSection()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__right-section";
+ }
+
+ /**
+ * Configuration depends on parent Footer or IFooterSection.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is Footer)
+ {
+ element.classList.remove(typeNames);
+ if(!Footer(parent).mini)
+ {
+ element.classList.add("mdl-mega-footer__right-section");
+ className = addOrReplaceClassName(className, "mdl-mega-footer__right-section");
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer__right-section";
+ className = addOrReplaceClassName(className, "mdl-mini-footer__right-section");
+ }
+ }
+ else if(parent is IFooterSection)
+ {
+
+ }
+ else
+ {
+ throw new Error("FooterRightSection can not be used if parent is not a MDL Footer or IFooterSection component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterSocialButton.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterSocialButton.as
index 8669caf..6737630 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterSocialButton.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterSocialButton.as
@@ -1,102 +1,94 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.TextButton;
- import org.apache.royale.mdl.supportClasses.IFooterSection;
- import org.apache.royale.core.UIBase;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterSocialButton class defines a footer decorative square within a footer
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterSocialButton extends TextButton
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterSocialButton()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__social-btn";
- return addElementToWrapper(this,'button');
- }
-
- /**
- * Configuration depends on parent Footer.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is IFooterSection)
- {
- var parentSection:IFooterSection = parent as IFooterSection;
- if(UIBase(parentSection).parent is Footer)
- {
- element.classList.remove(typeNames);
- if(!Footer(UIBase(parentSection).parent).mini)
- {
- typeNames = "mdl-mega-footer__social-btn";
- } else
- {
- typeNames = "mdl-mini-footer__social-btn";
- }
- element.classList.add(typeNames);
- }
- }
- else
- {
- throw new Error("FooterSocialButton can not be used if parent is not a MDL Footer component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.TextButton;
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+ import org.apache.royale.core.UIBase;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The FooterSocialButton class defines a footer decorative square within a footer
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterSocialButton extends TextButton
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterSocialButton()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__social-btn";
+ }
+
+ /**
+ * Configuration depends on parent Footer.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is IFooterSection)
+ {
+ var parentSection:IFooterSection = parent as IFooterSection;
+ if(UIBase(parentSection).parent is Footer)
+ {
+ element.classList.remove(typeNames);
+ if(!Footer(UIBase(parentSection).parent).mini)
+ {
+ className = addOrReplaceClassName(className, "mdl-mega-footer__social-btn");
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer__social-btn";
+ className = addOrReplaceClassName(className, "mdl-mini-footer__social-btn");
+ }
+ }
+ }
+ else
+ {
+ throw new Error("FooterSocialButton can not be used if parent is not a MDL Footer component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterTopSection.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterTopSection.as
index 8f1ad79..52e63d6 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterTopSection.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/FooterTopSection.as
@@ -1,98 +1,90 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
- import org.apache.royale.mdl.supportClasses.IFooterSection;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The FooterTopSection class is a footer top container section capable
- * of parenting other components
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class FooterTopSection extends Group implements IFooterSection
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function FooterTopSection()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-mega-footer__top-section";
- return addElementToWrapper(this,'div');
- }
-
- /**
- * Configuration depends on parent Footer.
- * Check to see if is mega or mini.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
-
- if(parent is Footer)
- {
- element.classList.remove(typeNames);
- if(!Footer(parent).mini)
- {
- typeNames = "mdl-mega-footer__top-section";
- } else
- {
- typeNames = "mdl-mini-footer__top-section";
- }
- element.classList.add(typeNames);
- }
- else
- {
- throw new Error("FooterTopSection can not be used if parent is not a MDL Footer component.");
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+ import org.apache.royale.mdl.supportClasses.IFooterSection;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The FooterTopSection class is a footer top container section capable
+ * of parenting other components
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class FooterTopSection extends Group implements IFooterSection
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function FooterTopSection()
+ {
+ super();
+
+ typeNames = "mdl-mega-footer__top-section";
+ }
+
+ /**
+ * Configuration depends on parent Footer.
+ * Check to see if is mega or mini.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ if(parent is Footer)
+ {
+ element.classList.remove(typeNames);
+ if(!Footer(parent).mini)
+ {
+ className = addOrReplaceClassName(className, "mdl-mega-footer__top-section");
+ }
+ else
+ {
+ typeNames = "mdl-mini-footer__top-section";
+ className = addOrReplaceClassName(className, "mdl-mini-footer__top-section");
+ }
+ }
+ else
+ {
+ throw new Error("FooterTopSection can not be used if parent is not a MDL Footer component.");
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Grid.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Grid.as
index ba8831a..35a6664 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Grid.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Grid.as
@@ -1,103 +1,100 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The Material Design Lite (MDL) grid component is a simplified method for
- * laying out content for multiple screen sizes. It reduces the usual coding burden
- * required to correctly display blocks of content in a variety of display conditions.
- *
- * The MDL grid is defined and enclosed by a container element. A grid has 12 columns in
- * the desktop screen size, 8 in the tablet size, and 4 in the phone size, each size having
- * predefined margins and gutters. Cells are laid out sequentially in a row, in the order
- * they are defined, with some exceptions:
- *
- * If a cell doesn't fit in the row in one of the screen sizes, it flows into the following line.
- * If a cell has a specified column size equal to or larger than the number of columns for the
- * current screen size, it takes up the entirety of its row.
- *
- * You can set a maximum grid width, after which the grid stays centered with padding on either
- * side, by setting its max-width CSS property.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Grid extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Grid()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-grid";
- return addElementToWrapper(this,'div');
- }
-
- protected var _nospacing:Boolean = false;
- /**
- * A boolean flag to activate "mdl-grid--no-spacing" effect selector.
- * Optional. Modifies the grid cells to have no margin between them.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get nospacing():Boolean
- {
- return _nospacing;
- }
- public function set nospacing(value:Boolean):void
- {
- _nospacing = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-grid--no-spacing", _nospacing);
- typeNames = element.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The Material Design Lite (MDL) grid component is a simplified method for
+ * laying out content for multiple screen sizes. It reduces the usual coding burden
+ * required to correctly display blocks of content in a variety of display conditions.
+ *
+ * The MDL grid is defined and enclosed by a container element. A grid has 12 columns in
+ * the desktop screen size, 8 in the tablet size, and 4 in the phone size, each size having
+ * predefined margins and gutters. Cells are laid out sequentially in a row, in the order
+ * they are defined, with some exceptions:
+ *
+ * If a cell doesn't fit in the row in one of the screen sizes, it flows into the following line.
+ * If a cell has a specified column size equal to or larger than the number of columns for the
+ * current screen size, it takes up the entirety of its row.
+ *
+ * You can set a maximum grid width, after which the grid stays centered with padding on either
+ * side, by setting its max-width CSS property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Grid extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Grid()
+ {
+ super();
+
+ typeNames = "mdl-grid";
+ }
+
+ protected var _nospacing:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-grid--no-spacing" effect selector.
+ * Optional. Modifies the grid cells to have no margin between them.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get nospacing():Boolean
+ {
+ return _nospacing;
+ }
+ public function set nospacing(value:Boolean):void
+ {
+ if (_nospacing != value)
+ {
+ _nospacing = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-grid--no-spacing");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-grid--no-spacing");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/GridCell.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/GridCell.as
index 118148c..623fe9f 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/GridCell.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/GridCell.as
@@ -1,627 +1,637 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The GridCell class represents a cell in MDL component.
- * This cell is a container component capable of parenting other
- * components. It has several properties to allow multiple layouts
- * configurations
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class GridCell extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function GridCell()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-cell";
- return addElementToWrapper(this,'div');
- }
-
- protected var _column:Number = 4;
- /**
- * A boolean flag to activate "mdl-cell--N-col" effect selector.
- * Sets the column size for the cell to N. N is 1-12 inclusive.
- * Defaults to 4. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get column():Number
- {
- return _column;
- }
- public function set column(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _column + "-col");
-
- if(value > 0 || value < 13)
- {
- _column = value;
-
- element.classList.add("mdl-cell--" + _column + "-col");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _columnDesktop:Number;
- /**
- * A boolean flag to activate "mdl-cell--N-col-desktop" effect selector.
- * Sets the column size for the cell to N in desktop mode only.
- * N is 1-12 inclusive. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get columnDesktop():Number
- {
- return _columnDesktop;
- }
- public function set columnDesktop(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _columnDesktop + "-col-desktop");
-
- if(value > 0 || value < 13)
- {
- _columnDesktop = value;
-
- element.classList.add("mdl-cell--" + _columnDesktop + "-col-desktop");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _columnTablet:Number;
- /**
- * A boolean flag to activate "mdl-cell--N-col-tablet" effect selector.
- * Sets the column size for the cell to N in tablet mode only.
- * N is 1-8 inclusive. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get columnTablet():Number
- {
- return _columnTablet;
- }
- public function set columnTablet(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _columnTablet + "-col-tablet");
-
- if(value > 0 || value < 9)
- {
- _columnTablet = value;
-
- element.classList.add("mdl-cell--" + _columnTablet + "-col-tablet");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _columnPhone:Number;
- /**
- * A boolean flag to activate "mdl-cell--N-col-phone" effect selector.
- * Sets the column size for the cell to N in phone mode only.
- * N is 1-4 inclusive. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get columnPhone():Number
- {
- return _columnPhone;
- }
- public function set columnPhone(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _columnPhone + "-col-phone");
-
- if(value > 0 || value < 5)
- {
- _columnPhone = value;
-
- element.classList.add("mdl-cell--" + _columnPhone + "-col-phone");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _offset:Number;
- /**
- * A boolean flag to activate "mdl-cell--N-offset" effect selector.
- * Adds N columns of whitespace before the cell.
- * N is 1-11 inclusive. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get offset():Number
- {
- return _offset;
- }
- public function set offset(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _offset + "-offset");
-
- if(value > 0 || value < 12)
- {
- _offset = value;
-
- element.classList.add("mdl-cell--" + _offset + "-offset");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _offsetDesktop:Number;
- /**
- * A boolean flag to activate "mdl-cell--N-offset-desktop" effect selector.
- * Adds N columns of whitespace before the cell in desktop mode.
- * N is 1-11 inclusive. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get offsetDesktop():Number
- {
- return _offsetDesktop;
- }
- public function set offsetDesktop(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _offsetDesktop + "-offset-desktop");
-
- if(value > 0 || value < 12)
- {
- _offsetDesktop = value;
-
- element.classList.add("mdl-cell--" + _offsetDesktop + "-offset-desktop");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _offsetTablet:Number;
- /**
- * A boolean flag to activate "mdl-cell--N-offset-tablet" effect selector.
- * Adds N columns of whitespace before the cell in tablet mode.
- * N is 1-11 inclusive. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get offsetTablet():Number
- {
- return _offsetTablet;
- }
- public function set offsetTablet(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _offsetTablet + "-offset-tablet");
-
- if(value > 0 || value < 12)
- {
- _offsetTablet = value;
-
- element.classList.add("mdl-cell--" + _offsetTablet + "-offset-tablet");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _offsetPhone:Number;
- /**
- * A boolean flag to activate "mdl-cell--N-offset-phone" effect selector.
- * Adds N columns of whitespace before the cell in phone mode.
- * N is 1-11 inclusive. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get offsetPhone():Number
- {
- return _offsetPhone;
- }
- public function set offsetPhone(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--" + _offsetPhone + "-offset-phone");
-
- if(value > 0 || value < 12)
- {
- _offsetPhone = value;
-
- element.classList.add("mdl-cell--" + _offsetPhone + "-offset-phone");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _order:Number;
- /**
- * A boolean flag to activate "mdl-cell--order-N" effect selector.
- * Reorders cell to position N.
- * N is 1-12 inclusive; optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get order():Number
- {
- return _order;
- }
- public function set order(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--order-" + _order);
-
- if(value > 0 || value < 13)
- {
- _order = value;
-
- element.classList.add("mdl-cell--order-" + _order);
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _orderDesktop:Number;
- /**
- * A boolean flag to activate "mdl-cell--order-N-desktop" effect selector.
- * Reorders cell to position N when in desktop mode.
- * N is 1-12 inclusive; optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get orderDesktop():Number
- {
- return _orderDesktop;
- }
- public function set orderDesktop(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--order-" + _orderDesktop + "-desktop");
-
- if(value > 0 || value < 13)
- {
- _orderDesktop = value;
-
- element.classList.add("mdl-cell--order-" + _orderDesktop + "-desktop");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _orderTablet:Number;
- /**
- * A boolean flag to activate "mdl-cell--order-N-tablet" effect selector.
- * Reorders cell to position N when in tablet mode.
- * N is 1-12 inclusive; optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get orderTablet():Number
- {
- return _orderTablet;
- }
- public function set orderTablet(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--order-" + _orderTablet + "-tablet");
-
- if(value > 0 || value < 13)
- {
- _orderTablet = value;
-
- element.classList.add("mdl-cell--order-" + _orderTablet + "-tablet");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _orderPhone:Number;
- /**
- * A boolean flag to activate "mdl-cell--order-N-phone" effect selector.
- * Reorders cell to position N when in phone mode.
- * N is 1-12 inclusive; optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get orderPhone():Number
- {
- return _orderPhone;
- }
- public function set orderPhone(value:Number):void
- {
- COMPILE::JS
- {
- element.classList.remove("mdl-cell--order-" + _orderPhone + "-phone");
-
- if(value > 0 || value < 13)
- {
- _orderPhone = value;
-
- element.classList.add("mdl-cell--order-" + _orderPhone + "-phone");
- }
-
- typeNames = element.className;
- }
- }
-
- protected var _hideDesktop:Boolean = false;
- /**
- * A boolean flag to activate "mdl-cell--hide-desktop" effect selector.
- * Hides the cell when in desktop mode. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get hideDesktop():Boolean
- {
- return _hideDesktop;
- }
- public function set hideDesktop(value:Boolean):void
- {
- _hideDesktop = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-cell--hide-desktop", _hideDesktop);
- typeNames = element.className;
- }
- }
-
- protected var _hideTablet:Boolean = false;
- /**
- * A boolean flag to activate "mdl-cell--hide-tablet" effect selector.
- * Hides the cell when in tablet mode. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get hideTablet():Boolean
- {
- return _hideTablet;
- }
- public function set hideTablet(value:Boolean):void
- {
- _hideTablet = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-cell--hide-tablet", _hideTablet);
- typeNames = element.className;
- }
- }
-
- protected var _hidePhone:Boolean = false;
- /**
- * A boolean flag to activate "mdl-cell--hide-phone" effect selector.
- * Hides the cell when in phone mode. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get hidePhone():Boolean
- {
- return _hidePhone;
- }
- public function set hidePhone(value:Boolean):void
- {
- _hidePhone = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-cell--hide-phone", _hidePhone);
- typeNames = element.className;
- }
- }
-
- protected var _strech:Boolean = false;
- /**
- * A boolean flag to activate "mdl-cell--stretch" effect selector.
- * Stretches the cell vertically to fill the parent. Default.
- * Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get strech():Boolean
- {
- return _strech;
- }
- public function set strech(value:Boolean):void
- {
- _strech = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-cell--stretch", _strech);
- typeNames = element.className;
- }
- }
-
- protected var _alignTop:Boolean = false;
- /**
- * A boolean flag to activate "mdl-cell--top" effect selector.
- * Aligns the cell to the top of the parent. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get alignTop():Boolean
- {
- return _alignTop;
- }
- public function set alignTop(value:Boolean):void
- {
- _alignTop = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-cell--top", _alignTop);
- typeNames = element.className;
- }
- }
-
- protected var _alignMiddle:Boolean = false;
- /**
- * A boolean flag to activate "mdl-cell--middle" effect selector.
- * Aligns the cell to the middle of the parent. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get alignMiddle():Boolean
- {
- return _alignMiddle;
- }
- public function set alignMiddle(value:Boolean):void
- {
- _alignMiddle = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-cell--middle", _alignMiddle);
- typeNames = element.className;
- }
- }
-
- protected var _alignBottom:Boolean = false;
- /**
- * A boolean flag to activate "mdl-cell--bottom" effect selector.
- * Aligns the cell to the bottom of the parent. Optional on "inner" div elements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get alignBottom():Boolean
- {
- return _alignBottom;
- }
- public function set alignBottom(value:Boolean):void
- {
- _alignBottom = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-cell--bottom", _alignBottom);
- typeNames = element.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The GridCell class represents a cell in MDL component.
+ * This cell is a container component capable of parenting other
+ * components. It has several properties to allow multiple layouts
+ * configurations
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class GridCell extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function GridCell()
+ {
+ super();
+
+ typeNames = "mdl-cell";
+ }
+
+ protected var _column:Number = 4;
+ /**
+ * A boolean flag to activate "mdl-cell--N-col" effect selector.
+ * Sets the column size for the cell to N. N is 1-12 inclusive.
+ * Defaults to 4. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get column():Number
+ {
+ return _column;
+ }
+ public function set column(value:Number):void
+ {
+ if (_column != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 13)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-col", "mdl-cell--" + _column + "-col");
+ _column = value;
+ }
+ }
+ }
+ }
+
+ protected var _columnDesktop:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--N-col-desktop" effect selector.
+ * Sets the column size for the cell to N in desktop mode only.
+ * N is 1-12 inclusive. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get columnDesktop():Number
+ {
+ return _columnDesktop;
+ }
+ public function set columnDesktop(value:Number):void
+ {
+ if (_columnDesktop != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 13)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-col-desktop", "mdl-cell--" + _columnDesktop + "-col-desktop");
+ _columnDesktop = value;
+ }
+ }
+ }
+ }
+
+ protected var _columnTablet:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--N-col-tablet" effect selector.
+ * Sets the column size for the cell to N in tablet mode only.
+ * N is 1-8 inclusive. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get columnTablet():Number
+ {
+ return _columnTablet;
+ }
+ public function set columnTablet(value:Number):void
+ {
+ if (_columnTablet != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 13)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-col-tablet", "mdl-cell--" + _columnTablet + "-col-tablet");
+ _columnTablet = value;
+ }
+ }
+ }
+ }
+
+ protected var _columnPhone:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--N-col-phone" effect selector.
+ * Sets the column size for the cell to N in phone mode only.
+ * N is 1-4 inclusive. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get columnPhone():Number
+ {
+ return _columnPhone;
+ }
+ public function set columnPhone(value:Number):void
+ {
+ if (_columnPhone != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 5)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-col-phone", "mdl-cell--" + _columnPhone + "-col-phone");
+ _columnPhone = value;
+ }
+ }
+ }
+ }
+
+ protected var _offset:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--N-offset" effect selector.
+ * Adds N columns of whitespace before the cell.
+ * N is 1-11 inclusive. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get offset():Number
+ {
+ return _offset;
+ }
+ public function set offset(value:Number):void
+ {
+ if (_offset != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 12)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-offset", "mdl-cell--" + _offset + "-offset");
+ _offset = value;
+ }
+ }
+ }
+ }
+
+ protected var _offsetDesktop:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--N-offset-desktop" effect selector.
+ * Adds N columns of whitespace before the cell in desktop mode.
+ * N is 1-11 inclusive. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get offsetDesktop():Number
+ {
+ return _offsetDesktop;
+ }
+ public function set offsetDesktop(value:Number):void
+ {
+ if (_offsetDesktop != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 12)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-offset-desktop", "mdl-cell--" + _offsetDesktop + "-offset-desktop");
+ _offsetDesktop = value;
+ }
+ }
+ }
+ }
+
+ protected var _offsetTablet:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--N-offset-tablet" effect selector.
+ * Adds N columns of whitespace before the cell in tablet mode.
+ * N is 1-11 inclusive. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get offsetTablet():Number
+ {
+ return _offsetTablet;
+ }
+ public function set offsetTablet(value:Number):void
+ {
+ if (_offsetTablet != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 12)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-offset-tablet", "mdl-cell--" + _offsetTablet + "-offset-tablet");
+ _offsetTablet = value;
+ }
+ }
+ }
+ }
+
+ protected var _offsetPhone:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--N-offset-phone" effect selector.
+ * Adds N columns of whitespace before the cell in phone mode.
+ * N is 1-11 inclusive. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get offsetPhone():Number
+ {
+ return _offsetPhone;
+ }
+ public function set offsetPhone(value:Number):void
+ {
+ if (_offsetPhone != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 12)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--" + value + "-offset-phone", "mdl-cell--" + _offsetPhone + "-offset-phone");
+ _offsetPhone = value;
+ }
+ }
+ }
+ }
+
+ protected var _order:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--order-N" effect selector.
+ * Reorders cell to position N.
+ * N is 1-12 inclusive; optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get order():Number
+ {
+ return _order;
+ }
+ public function set order(value:Number):void
+ {
+ if (_order != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 13)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--order-" + value, "mdl-cell--order-" + _order);
+ _order = value;
+ }
+ }
+ }
+ }
+
+ protected var _orderDesktop:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--order-N-desktop" effect selector.
+ * Reorders cell to position N when in desktop mode.
+ * N is 1-12 inclusive; optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get orderDesktop():Number
+ {
+ return _orderDesktop;
+ }
+ public function set orderDesktop(value:Number):void
+ {
+ if (_orderDesktop != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 13)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--order-" + value + "-desktop", "mdl-cell--order-" + _orderDesktop + "-desktop");
+ _orderDesktop = value;
+ }
+ }
+ }
+ }
+
+ protected var _orderTablet:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--order-N-tablet" effect selector.
+ * Reorders cell to position N when in tablet mode.
+ * N is 1-12 inclusive; optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get orderTablet():Number
+ {
+ return _orderTablet;
+ }
+ public function set orderTablet(value:Number):void
+ {
+ if (_orderTablet != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 13)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--order-" + value + "-tablet", "mdl-cell--order-" + _orderTablet + "-tablet");
+ _orderTablet = value;
+ }
+ }
+ }
+ }
+
+ protected var _orderPhone:Number;
+ /**
+ * A boolean flag to activate "mdl-cell--order-N-phone" effect selector.
+ * Reorders cell to position N when in phone mode.
+ * N is 1-12 inclusive; optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get orderPhone():Number
+ {
+ return _orderPhone;
+ }
+ public function set orderPhone(value:Number):void
+ {
+ if (_orderPhone != value)
+ {
+ COMPILE::JS
+ {
+ if (value > 0 || value < 13)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--order-" + value + "-phone", "mdl-cell--order-" + _orderPhone + "-phone");
+ _orderPhone = value;
+ }
+ }
+ }
+ }
+
+ protected var _hideDesktop:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-cell--hide-desktop" effect selector.
+ * Hides the cell when in desktop mode. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get hideDesktop():Boolean
+ {
+ return _hideDesktop;
+ }
+ public function set hideDesktop(value:Boolean):void
+ {
+ if (_hideDesktop != value)
+ {
+ _hideDesktop = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-cell--hide-desktop");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--hide-desktop");
+ }
+ }
+ }
+ }
+
+ protected var _hideTablet:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-cell--hide-tablet" effect selector.
+ * Hides the cell when in tablet mode. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get hideTablet():Boolean
+ {
+ return _hideTablet;
+ }
+ public function set hideTablet(value:Boolean):void
+ {
+ if (_hideTablet != value)
+ {
+ _hideTablet = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-cell--hide-tablet");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--hide-tablet");
+ }
+ }
+ }
+ }
+
+ protected var _hidePhone:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-cell--hide-phone" effect selector.
+ * Hides the cell when in phone mode. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get hidePhone():Boolean
+ {
+ return _hidePhone;
+ }
+ public function set hidePhone(value:Boolean):void
+ {
+ if (_hidePhone != value)
+ {
+ _hidePhone = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-cell--hide-phone");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--hide-phone");
+ }
+ }
+ }
+ }
+
+ protected var _strech:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-cell--stretch" effect selector.
+ * Stretches the cell vertically to fill the parent. Default.
+ * Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get strech():Boolean
+ {
+ return _strech;
+ }
+ public function set strech(value:Boolean):void
+ {
+ if (_strech != value)
+ {
+ _strech = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-cell--stretch");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--stretch");
+ }
+ }
+ }
+ }
+
+ protected var _alignTop:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-cell--top" effect selector.
+ * Aligns the cell to the top of the parent. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get alignTop():Boolean
+ {
+ return _alignTop;
+ }
+ public function set alignTop(value:Boolean):void
+ {
+ if (_alignTop != value)
+ {
+ _alignTop = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-cell--top");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--top");
+ }
+ }
+ }
+ }
+
+ protected var _alignMiddle:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-cell--middle" effect selector.
+ * Aligns the cell to the middle of the parent. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get alignMiddle():Boolean
+ {
+ return _alignMiddle;
+ }
+ public function set alignMiddle(value:Boolean):void
+ {
+ if (_alignMiddle != value)
+ {
+ _alignMiddle = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-cell--middle");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--middle");
+ }
+ }
+ }
+ }
+
+ protected var _alignBottom:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-cell--bottom" effect selector.
+ * Aligns the cell to the bottom of the parent. Optional on "inner" div elements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get alignBottom():Boolean
+ {
+ return _alignBottom;
+ }
+
+ public function set alignBottom(value:Boolean):void
+ {
+ if (_alignBottom != value)
+ {
+ _alignBottom = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-cell--bottom");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-cell--bottom");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Header.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Header.as
index 7c65d96..11816b6 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Header.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Header.as
@@ -1,141 +1,159 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The Header class is a Container component mainly used in NavigationLayout
- * and Tabs components. It used to hold a HeaderRow and/or a TabBar components
- * to layout a Title, a navigation link or a tab bar navigation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Header extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Header()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-layout__header";
- return addElementToWrapper(this,'header');
- }
-
- protected var _transparent:Boolean;
- /**
- * A boolean flag to activate "mdl-transparent--Xdp" effect selector.
- * Assigns variable transparent depths (0, 2, 3, 4, 6, 8, or 16) to card
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get transparent():Boolean
- {
- return _transparent;
- }
- public function set transparent(value:Boolean):void
- {
- _transparent = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-layout__header--transparent", _transparent);
- typeNames = element.className;
- }
- }
-
- protected var _scrollable:Boolean;
- /**
- * A boolean flag to activate "mdl-layout__header--scroll" effect selector.
- * Optional. Makes the header scroll with the content
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get scrollable():Boolean
- {
- return _scrollable;
- }
- public function set scrollable(value:Boolean):void
- {
- _scrollable = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-layout__header--scroll", _scrollable);
- typeNames = element.className;
- }
- }
-
- protected var _waterfall:Boolean;
- /**
- * A boolean flag to activate "mdl-layout__header--waterfall" effect selector.
- * Optional. Allows a "waterfall" effect with multiple header lines
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get waterfall():Boolean
- {
- return _waterfall;
- }
- public function set waterfall(value:Boolean):void
- {
- _waterfall = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-layout__header--waterfall", _waterfall);
- typeNames = element.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The Header class is a Container component mainly used in NavigationLayout
+ * and Tabs components. It used to hold a HeaderRow and/or a TabBar components
+ * to layout a Title, a navigation link or a tab bar navigation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Header extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Header()
+ {
+ super();
+
+ typeNames = "mdl-layout__header"
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {;
+ return addElementToWrapper(this,'header');
+ }
+
+ protected var _transparent:Boolean;
+ /**
+ * A boolean flag to activate "mdl-transparent--Xdp" effect selector.
+ * Assigns variable transparent depths (0, 2, 3, 4, 6, 8, or 16) to card
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get transparent():Boolean
+ {
+ return _transparent;
+ }
+ public function set transparent(value:Boolean):void
+ {
+ if (_transparent != value)
+ {
+ _transparent = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-layout__header--transparent");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-layout__header--transparent");
+ }
+ }
+ }
+ }
+
+ protected var _scrollable:Boolean;
+ /**
+ * A boolean flag to activate "mdl-layout__header--scroll" effect selector.
+ * Optional. Makes the header scroll with the content
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get scrollable():Boolean
+ {
+ return _scrollable;
+ }
+ public function set scrollable(value:Boolean):void
+ {
+ if (_scrollable != value)
+ {
+ _scrollable = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-layout__header--scroll");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-layout__header--scroll");
+ }
+ }
+ }
+ }
+
+ protected var _waterfall:Boolean;
+ /**
+ * A boolean flag to activate "mdl-layout__header--waterfall" effect selector.
+ * Optional. Allows a "waterfall" effect with multiple header lines
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get waterfall():Boolean
+ {
+ return _waterfall;
+ }
+ public function set waterfall(value:Boolean):void
+ {
+ if (_waterfall != value)
+ {
+ _waterfall = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-layout__header--waterfall");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-layout__header--waterfall");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/HeaderRow.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/HeaderRow.as
index 9f91420..f4adecd 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/HeaderRow.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/HeaderRow.as
@@ -1,65 +1,55 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The HeaderRow class is a Container component used normaly inside a Header
- * to layout things like a title, a navigation component,...
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class HeaderRow extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function HeaderRow()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-layout__header-row";
- return addElementToWrapper(this,'div');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The HeaderRow class is a Container component used normaly inside a Header
+ * to layout things like a title, a navigation component,...
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class HeaderRow extends Group
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function HeaderRow()
+ {
+ super();
+
+ typeNames = "mdl-layout__header-row";
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/IconToggle.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/IconToggle.as
index 7353ac6..c3241fd 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/IconToggle.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/IconToggle.as
@@ -1,272 +1,277 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.mdl.beads.UpgradeChildren;
- import org.apache.royale.mdl.beads.UpgradeElement;
- import org.apache.royale.mdl.supportClasses.IMaterialIconProvider;
- import org.apache.royale.mdl.materialIcons.IMaterialIcon;
- import org.apache.royale.mdl.supportClasses.MaterialIconBase;
- import org.apache.royale.core.IToggleButtonModel;
- import org.apache.royale.events.Event;
- import org.apache.royale.events.MouseEvent;
- import org.apache.royale.core.IStrand;
- import org.apache.royale.html.TextButton;
- import org.apache.royale.events.IEventDispatcher;
- import org.apache.royale.core.IUIBase;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * Dispatched when the user clicks on IconToggle.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- [Event(name="click", type="org.apache.royale.events.MouseEvent")]
-
- /**
- * Dispatched when IconToggle is being selected/unselected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- [Event(name="change", type="org.apache.royale.events.Event")]
-
- /**
- * The Material Design Lite (MDL) icon-toggle component is an enhanced version of
- * the standard HTML <input type="checkbox"> element. An icon-toggle consists of a
- * user defined icon that indicates, by visual highlighting, a binary condition that
- * will be set or unset when the user clicks or touches it. Like checkboxes,
- * icon-toggles may appear individually or in groups, and can be selected and
- * deselected individually.
- *
- * Icon toggles, particularly as a replacement for certain checkboxes, can be a valuable
- * feature in user interfaces, regardless of a site's content or function.
- *
- * The icon-toggle component can have a more customized visual look than a standard
- * checkbox, and may be initially or programmatically disabled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class IconToggle extends TextButton implements IStrand, IEventDispatcher, IUIBase, IMaterialIconProvider
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function IconToggle()
- {
- super();
-
- COMPILE::SWF
- {
- addEventListener(MouseEvent.CLICK, internalMouseHandler);
- }
-
- className = "";
-
- addBead(new UpgradeElement());
- addBead(new UpgradeChildren(["mdl-icon-toggle__ripple-container"]));
- }
-
- [Bindable("change")]
- /**
- * <code>true</code> if the Button is selected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get selected():Boolean
- {
- return IToggleButtonModel(model).selected;
- }
-
- /**
- * @private
- */
- public function set selected(value:Boolean):void
- {
- if (IToggleButtonModel(model).selected != value)
- {
- IToggleButtonModel(model).selected = value;
- dispatchEvent(new Event(Event.CHANGE))
- }
- }
-
- private var _dataMdlFor:String = "icon-toggle-1";
- /**
- * The id value of the associated input
- * Need to specify for display content of IconToggle
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get dataMdlFor():String
- {
- return _dataMdlFor;
- }
- public function set dataMdlFor(value:String):void
- {
- _dataMdlFor = value;
-
- COMPILE::JS
- {
- if (input)
- {
- input.id = _dataMdlFor;
- }
- element.setAttribute('for', _dataMdlFor);
- }
- }
-
- private var _ripple:Boolean = false;
- /**
- * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
- * Applies ripple click effect. May be used in combination with any other classes
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get ripple():Boolean
- {
- return _ripple;
- }
-
- public function set ripple(value:Boolean):void
- {
- _ripple = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-js-ripple-effect", _ripple);
- typeNames = element.className;
- }
- }
-
- private var _materialIcon:IMaterialIcon;
- /**
- * A material icon.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get materialIcon():IMaterialIcon
- {
- return _materialIcon;
- }
- public function set materialIcon(value:IMaterialIcon):void
- {
- _materialIcon = value;
-
- COMPILE::JS
- {
- var icon:MaterialIconBase = (value as MaterialIconBase);
- if (icon)
- {
- icon.iconToggleLabel = true;
- }
-
- addElement(_materialIcon);
- }
- }
-
- COMPILE::JS
- protected var label:HTMLLabelElement;
-
- COMPILE::JS
- protected var input:HTMLInputElement;
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- * @royaleignorecoercion HTMLLabelElement
- * @royaleignorecoercion HTMLInputElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-icon-toggle mdl-js-icon-toggle";
-
- label = addElementToWrapper(this,'label') as HTMLLabelElement;
-
- element.setAttribute('for', _dataMdlFor);
-
- if (_dataMdlFor)
- {
- input = document.createElement("input") as HTMLInputElement;
- input.id = _dataMdlFor;
- input.type = "checkbox";
- input.checked = false;
- input.classList.add("mdl-icon-toggle__input");
-
- label.appendChild(input);
- }
- else
- {
- throw new Error("dataMdlFor need to be specify in order to display IconToggle");
- }
-
- (input as WrappedHTMLElement).royale_wrapper = this;
- element.addEventListener(MouseEvent.CLICK, clickHandler, false);
- return element;
- }
-
- COMPILE::JS
- public function clickHandler(event:Event):void
- {
- event.preventDefault();
- selected = !selected;
- input.checked = selected;
- label.classList.toggle("is-checked", selected);
- }
-
- COMPILE::SWF
- private function internalMouseHandler(event:MouseEvent) : void
- {
- //selected = !selected;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.mdl.beads.UpgradeChildren;
+ import org.apache.royale.mdl.beads.UpgradeElement;
+ import org.apache.royale.mdl.supportClasses.IMaterialIconProvider;
+ import org.apache.royale.mdl.materialIcons.IMaterialIcon;
+ import org.apache.royale.mdl.supportClasses.MaterialIconBase;
+ import org.apache.royale.core.IToggleButtonModel;
+ import org.apache.royale.events.Event;
+ import org.apache.royale.events.MouseEvent;
+ import org.apache.royale.core.IStrand;
+ import org.apache.royale.html.TextButton;
+ import org.apache.royale.events.IEventDispatcher;
+ import org.apache.royale.core.IUIBase;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched when the user clicks on IconToggle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ [Event(name="click", type="org.apache.royale.events.MouseEvent")]
+
+ /**
+ * Dispatched when IconToggle is being selected/unselected.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ [Event(name="change", type="org.apache.royale.events.Event")]
+
+ /**
+ * The Material Design Lite (MDL) icon-toggle component is an enhanced version of
+ * the standard HTML <input type="checkbox"> element. An icon-toggle consists of a
+ * user defined icon that indicates, by visual highlighting, a binary condition that
+ * will be set or unset when the user clicks or touches it. Like checkboxes,
+ * icon-toggles may appear individually or in groups, and can be selected and
+ * deselected individually.
+ *
+ * Icon toggles, particularly as a replacement for certain checkboxes, can be a valuable
+ * feature in user interfaces, regardless of a site's content or function.
+ *
+ * The icon-toggle component can have a more customized visual look than a standard
+ * checkbox, and may be initially or programmatically disabled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class IconToggle extends TextButton implements IStrand, IEventDispatcher, IUIBase, IMaterialIconProvider
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function IconToggle()
+ {
+ super();
+
+ typeNames = "mdl-icon-toggle mdl-js-icon-toggle";
+
+ COMPILE::SWF
+ {
+ addEventListener(MouseEvent.CLICK, internalMouseHandler);
+ }
+
+ addBead(new UpgradeElement());
+ addBead(new UpgradeChildren(["mdl-icon-toggle__ripple-container"]));
+ }
+
+ [Bindable("change")]
+ /**
+ * <code>true</code> if the Button is selected.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get selected():Boolean
+ {
+ return IToggleButtonModel(model).selected;
+ }
+
+ /**
+ * @private
+ */
+ public function set selected(value:Boolean):void
+ {
+ if (IToggleButtonModel(model).selected != value)
+ {
+ IToggleButtonModel(model).selected = value;
+ dispatchEvent(new Event(Event.CHANGE))
+ }
+ }
+
+ private var _dataMdlFor:String = "icon-toggle-1";
+ /**
+ * The id value of the associated input
+ * Need to specify for display content of IconToggle
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get dataMdlFor():String
+ {
+ return _dataMdlFor;
+ }
+ public function set dataMdlFor(value:String):void
+ {
+ _dataMdlFor = value;
+
+ COMPILE::JS
+ {
+ if (input)
+ {
+ input.id = _dataMdlFor;
+ }
+ element.setAttribute('for', _dataMdlFor);
+ }
+ }
+
+ private var _ripple:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
+ * Applies ripple click effect. May be used in combination with any other classes
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get ripple():Boolean
+ {
+ return _ripple;
+ }
+
+ public function set ripple(value:Boolean):void
+ {
+ if (_ripple != value)
+ {
+ _ripple = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-js-ripple-effect");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-js-ripple-effect");
+ }
+ }
+ }
+ }
+
+ private var _materialIcon:IMaterialIcon;
+ /**
+ * A material icon.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get materialIcon():IMaterialIcon
+ {
+ return _materialIcon;
+ }
+ public function set materialIcon(value:IMaterialIcon):void
+ {
+ _materialIcon = value;
+
+ COMPILE::JS
+ {
+ var icon:MaterialIconBase = (value as MaterialIconBase);
+ if (icon)
+ {
+ icon.iconToggleLabel = true;
+ }
+
+ addElement(_materialIcon);
+ }
+ }
+
+ COMPILE::JS
+ protected var label:HTMLLabelElement;
+
+ COMPILE::JS
+ protected var input:HTMLInputElement;
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ * @royaleignorecoercion HTMLLabelElement
+ * @royaleignorecoercion HTMLInputElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ label = addElementToWrapper(this,'label') as HTMLLabelElement;
+
+ element.setAttribute('for', _dataMdlFor);
+
+ if (_dataMdlFor)
+ {
+ input = document.createElement("input") as HTMLInputElement;
+ input.id = _dataMdlFor;
+ input.type = "checkbox";
+ input.checked = false;
+ input.classList.add("mdl-icon-toggle__input");
+
+ label.appendChild(input);
+ }
+ else
+ {
+ throw new Error("dataMdlFor need to be specify in order to display IconToggle");
+ }
+
+ (input as WrappedHTMLElement).royale_wrapper = this;
+ element.addEventListener(MouseEvent.CLICK, clickHandler, false);
+ return element;
+ }
+
+ COMPILE::JS
+ public function clickHandler(event:Event):void
+ {
+ event.preventDefault();
+ selected = !selected;
+ input.checked = selected;
+ label.classList.toggle("is-checked", selected);
+ }
+
+ COMPILE::SWF
+ private function internalMouseHandler(event:MouseEvent) : void
+ {
+ //selected = !selected;
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/LayoutTitle.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/LayoutTitle.as
index 7b3b61e..6558983 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/LayoutTitle.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/LayoutTitle.as
@@ -1,68 +1,67 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.elements.Span;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The LayoutTitle class is an extended Span used in MDL Layout Header inside
- * a HeaderRow in a Drawer to style the title.
- *
- * (This is implemented as a class H4 and not as a bead that decorates other html text
- * classes since MDL generate the same visuals for all of them)
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class LayoutTitle extends Span
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function LayoutTitle()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-layout-title";
- return addElementToWrapper(this,'span');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.elements.Span;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The LayoutTitle class is an extended Span used in MDL Layout Header inside
+ * a HeaderRow in a Drawer to style the title.
+ *
+ * (This is implemented as a class H4 and not as a bead that decorates other html text
+ * classes since MDL generate the same visuals for all of them)
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class LayoutTitle extends Span
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function LayoutTitle()
+ {
+ super();
+
+ typeNames = "mdl-layout-title";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ return addElementToWrapper(this,'span');
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/List.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/List.as
index e7155ea..400a23d 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/List.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/List.as
@@ -1,53 +1,58 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.List;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * List in MDL are customizable scrollable lists. Lists present multiple line
- * items vertically as a single continuous element.
- *
- * In Royale MDL relies on an itemRenderer factory to produce its children components
- * and on a layout to arrange them. This is the only UI element aside from the itemRenderers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.0
- */
- public class List extends org.apache.royale.html.List
- {
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-list";
- return addElementToWrapper(this,'ul');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.List;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * List in MDL are customizable scrollable lists. Lists present multiple line
+ * items vertically as a single continuous element.
+ *
+ * In Royale MDL relies on an itemRenderer factory to produce its children components
+ * and on a layout to arrange them. This is the only UI element aside from the itemRenderers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ public class List extends org.apache.royale.html.List
+ {
+ public function List()
+ {
+ super();
+ typeNames = "mdl-list";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ return addElementToWrapper(this,'ul');
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Menu.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Menu.as
index b7340d3..07305b5 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Menu.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Menu.as
@@ -1,208 +1,214 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.events.Event;
- import org.apache.royale.html.List;
- import org.apache.royale.mdl.beads.UpgradeElement;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The Menu class creates a MDL menu. A menu in MDL is a lists
- * of clickable actions.
- *
- * The Material Design Lite (MDL) menu component is a user interface
- * element that allows users to select one of a number of options.
- * The selection typically results in an action initiation, a setting
- * change, or other observable effect. Menu options are always presented
- * in sets of two or more, and options may be programmatically enabled or
- * disabled as required. The menu appears when the user is asked to choose
- * among a series of options, and is usually dismissed after the choice is made.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Menu extends org.apache.royale.html.List
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Menu()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- addEventListener("beadsAdded", addUpgradeBead);
- }
-
- protected function addUpgradeBead(event:Event):void
- {
- addBead(new UpgradeElement());
- }
-
- /**
- * Default position for Menu in MDL is bottom/left (or no class selector specified)
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- private var currentMenuPosition:String = "";
-
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-menu mdl-js-menu";
- return addElementToWrapper(this,'ul');
- }
-
- private var _bottom:Boolean = true;
- /**
- * Position the menu relative to the associated button.
- * Used in conjunction with "left"
- * deafult is true
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get bottom():Boolean
- {
- return _bottom;
- }
- public function set bottom(value:Boolean):void
- {
- _bottom = value;
-
- var newMenuPosition:String;
-
- if(currentMenuPosition == "")
- {
- currentMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
- className += currentMenuPosition;
- } else
- {
- newMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
- className = className.replace( "/(?:^|\s)" + currentMenuPosition + "(?!\S)/g" , newMenuPosition);
- }
-
- currentMenuPosition = newMenuPosition;
- }
-
- private var _left:Boolean = true;
- /**
- * Position the menu relative to the associated button.
- * Used in conjunction with "bottom"
- * deafult is true
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get left():Boolean
- {
- return _left;
- }
- public function set left(value:Boolean):void
- {
- _left = value;
-
- var newMenuPosition:String;
-
- if(currentMenuPosition == "")
- {
- currentMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
- className += currentMenuPosition;
- } else
- {
- newMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
- className = className.replace( "/(?:^|\s)" + currentMenuPosition + "(?!\S)/g" , newMenuPosition);
- }
-
- currentMenuPosition = newMenuPosition;
- }
-
- private var _dataMdlFor:String;
- /**
- * The id value of the associated button that opens this menu.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get dataMdlFor():String
- {
- return _dataMdlFor;
- }
- public function set dataMdlFor(value:String):void
- {
- _dataMdlFor = value;
-
- COMPILE::JS
- {
- element.setAttribute('for', dataMdlFor);
- }
- }
-
- protected var _ripple:Boolean = false;
- /**
- * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
- * Applies ripple click effect to option links. Optional
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get ripple():Boolean
- {
- return _ripple;
- }
- public function set ripple(value:Boolean):void
- {
- _ripple = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-js-ripple-effect", _ripple);
- typeNames = element.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.events.Event;
+ import org.apache.royale.html.List;
+ import org.apache.royale.mdl.beads.UpgradeElement;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The Menu class creates a MDL menu. A menu in MDL is a lists
+ * of clickable actions.
+ *
+ * The Material Design Lite (MDL) menu component is a user interface
+ * element that allows users to select one of a number of options.
+ * The selection typically results in an action initiation, a setting
+ * change, or other observable effect. Menu options are always presented
+ * in sets of two or more, and options may be programmatically enabled or
+ * disabled as required. The menu appears when the user is asked to choose
+ * among a series of options, and is usually dismissed after the choice is made.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Menu extends org.apache.royale.html.List
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Menu()
+ {
+ super();
+
+ typeNames = "mdl-menu mdl-js-menu";
+ addEventListener("beadsAdded", addUpgradeBead);
+ }
+
+ protected function addUpgradeBead(event:Event):void
+ {
+ addBead(new UpgradeElement());
+ }
+
+ /**
+ * Default position for Menu in MDL is bottom/left (or no class selector specified)
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ private var currentMenuPosition:String = "";
+
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ return addElementToWrapper(this,'ul');
+ }
+
+ private var _bottom:Boolean = true;
+ /**
+ * Position the menu relative to the associated button.
+ * Used in conjunction with "left"
+ * deafult is true
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get bottom():Boolean
+ {
+ return _bottom;
+ }
+ public function set bottom(value:Boolean):void
+ {
+ _bottom = value;
+
+ var newMenuPosition:String;
+
+ if(currentMenuPosition == "")
+ {
+ currentMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
+ className += currentMenuPosition;
+ } else
+ {
+ newMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
+ className = className.replace( "/(?:^|\s)" + currentMenuPosition + "(?!\S)/g" , newMenuPosition);
+ }
+
+ currentMenuPosition = newMenuPosition;
+ }
+
+ private var _left:Boolean = true;
+ /**
+ * Position the menu relative to the associated button.
+ * Used in conjunction with "bottom"
+ * deafult is true
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get left():Boolean
+ {
+ return _left;
+ }
+ public function set left(value:Boolean):void
+ {
+ _left = value;
+
+ var newMenuPosition:String;
+
+ if(currentMenuPosition == "")
+ {
+ currentMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
+ className += currentMenuPosition;
+ } else
+ {
+ newMenuPosition = " mdl-menu--" + (_bottom ? "bottom" : "top") + "-" + (_left ? "left" : "right");
+ className = className.replace( "/(?:^|\s)" + currentMenuPosition + "(?!\S)/g" , newMenuPosition);
+ }
+
+ currentMenuPosition = newMenuPosition;
+ }
+
+ private var _dataMdlFor:String;
+ /**
+ * The id value of the associated button that opens this menu.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get dataMdlFor():String
+ {
+ return _dataMdlFor;
+ }
+ public function set dataMdlFor(value:String):void
+ {
+ _dataMdlFor = value;
+
+ COMPILE::JS
+ {
+ element.setAttribute('for', dataMdlFor);
+ }
+ }
+
+ protected var _ripple:Boolean = false;
+ /**
+ * A boolean flag to activate "mdl-js-ripple-effect" effect selector.
+ * Applies ripple click effect to option links. Optional
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get ripple():Boolean
+ {
+ return _ripple;
+ }
+ public function set ripple(value:Boolean):void
+ {
+ if (_ripple != value)
+ {
+ _ripple = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-js-ripple-effect");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-js-ripple-effect");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Navigation.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Navigation.as
index c7a302c..e260092 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Navigation.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/Navigation.as
@@ -1,66 +1,65 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The Navigation class is a <nav> tag in HTML. It parents a list of links
- * In Royale Navigation is implemented as a List component and by default
- * it uses NavigationLinkItemRenderer class to define each item.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class Navigation extends List
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function Navigation()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-navigation";
- return addElementToWrapper(this,'nav');
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ }
+
+ /**
+ * The Navigation class is a <nav> tag in HTML. It parents a list of links
+ * In Royale Navigation is implemented as a List component and by default
+ * it uses NavigationLinkItemRenderer class to define each item.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class Navigation extends List
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function Navigation()
+ {
+ super();
+
+ typeNames = "mdl-navigation";
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ return addElementToWrapper(this,'nav');
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayout.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayout.as
index f262b3a..383525c 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayout.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayout.as
@@ -1,146 +1,149 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.core.IApplicationView;
- import org.apache.royale.events.Event;
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The NavigationLayout class is a Container component capable of parenting other
- * components.
- * It normaly can host a Header, a Drawer and a NavigationLaoutContent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class NavigationLayout extends Group implements IApplicationView
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function NavigationLayout()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- private var _applicationModel:Object;
-
- [Bindable("modelChanged")]
-
- /**
- * A reference to the Application's model. Usually,
- * a view is displaying the main model for an
- * application.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.0
- */
- public function get applicationModel():Object
- {
- return _applicationModel;
- }
-
- /**
- * @private
- */
- public function set applicationModel(value:Object):void
- {
- _applicationModel = value;
- dispatchEvent(new Event("modelChanged"));
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- typeNames = "mdl-layout mdl-js-layout";
- return addElementToWrapper(this,'div');
- }
-
- protected var _fixedHeader:Boolean;
- /**
- * A boolean flag to activate "mdl-layout--fixed-header" effect selector.
- * Optional. Makes the header always visible, even in small screens.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get fixedHeader():Boolean
- {
- return _fixedHeader;
- }
- public function set fixedHeader(value:Boolean):void
- {
- _fixedHeader = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-layout--fixed-header", _fixedHeader);
- typeNames = element.className;
- }
- }
-
- protected var _fixedDrawer:Boolean;
- /**
- * A boolean flag to activate "mdl-layout--fixed-drawer" effect selector.
- * Optional. Makes the drawer always visible and open in larger screens.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function get fixedDrawer():Boolean
- {
- return _fixedDrawer;
- }
- public function set fixedDrawer(value:Boolean):void
- {
- _fixedDrawer = value;
-
- COMPILE::JS
- {
- element.classList.toggle("mdl-layout--fixed-drawer", _fixedDrawer);
- typeNames = element.className;
- }
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.royale.mdl
+{
+ import org.apache.royale.core.IApplicationView;
+ import org.apache.royale.events.Event;
+ import org.apache.royale.html.Group;
+
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ import org.apache.royale.html.util.addElementToWrapper;
+ import org.apache.royale.html.util.addOrReplaceClassName;
+ }
+
+ /**
+ * The NavigationLayout class is a Container component capable of parenting other
+ * components.
+ * It normaly can host a Header, a Drawer and a NavigationLaoutContent
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public class NavigationLayout extends Group implements IApplicationView
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function NavigationLayout()
+ {
+ super();
+
+ typeNames = "mdl-layout mdl-js-layout";
+ }
+
+ private var _applicationModel:Object;
+
+ [Bindable("modelChanged")]
+
+ /**
+ * A reference to the Application's model. Usually,
+ * a view is displaying the main model for an
+ * application.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ public function get applicationModel():Object
+ {
+ return _applicationModel;
+ }
+
+ /**
+ * @private
+ */
+ public function set applicationModel(value:Object):void
+ {
+ _applicationModel = value;
+ dispatchEvent(new Event("modelChanged"));
+ }
+
+ protected var _fixedHeader:Boolean;
+ /**
+ * A boolean flag to activate "mdl-layout--fixed-header" effect selector.
+ * Optional. Makes the header always visible, even in small screens.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get fixedHeader():Boolean
+ {
+ return _fixedHeader;
+ }
+ public function set fixedHeader(value:Boolean):void
+ {
+ if (_fixedHeader != value)
+ {
+ _fixedHeader = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-layout--fixed-header");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-layout--fixed-header");
+ }
+ }
+ }
+ }
+
+ protected var _fixedDrawer:Boolean;
+ /**
+ * A boolean flag to activate "mdl-layout--fixed-drawer" effect selector.
+ * Optional. Makes the drawer always visible and open in larger screens.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.8
+ */
+ public function get fixedDrawer():Boolean
+ {
+ return _fixedDrawer;
+ }
+ public function set fixedDrawer(value:Boolean):void
+ {
+ if (_fixedDrawer != value)
+ {
+ _fixedDrawer = value;
+
+ COMPILE::JS
+ {
+ element.classList.remove("mdl-layout--fixed-drawer");
+ if (value)
+ {
+ className = addOrReplaceClassName(className, "mdl-layout--fixed-drawer");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayoutContent.as b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayoutContent.as
index 2640005..262a265 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayoutContent.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/royale/org/apache/royale/mdl/NavigationLayoutContent.as
@@ -1,66 +1,56 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.royale.mdl
-{
- import org.apache.royale.html.Group;
-
- COMPILE::JS
- {
- import org.apache.royale.core.WrappedHTMLElement;
- import org.apache.royale.html.util.addElementToWrapper;
- }
-
- /**
- * The NavigationLayoutContent class is a Container component capable of parenting
- * the content of the NavigationLayout parent. If the navigation uses a TabBar component
- * for navigation, each piece of content will be a TabBarPanel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public class NavigationLayoutContent extends Group
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion Royale 0.8
- */
- public function NavigationLayoutContent()
- {
- super();
-
- className = ""; //set to empty string avoid 'undefined' output when no class selector is assigned by user;
- }
-
- /**
... 10518 lines suppressed ...
--
To stop receiving notification emails like this one, please contact
piotrz@apache.org.