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

[1/2] git commit: [flex-asjs] [refs/heads/develop] - Import optimization

Repository: flex-asjs
Updated Branches:
  refs/heads/develop a010c7836 -> 62150cf44


Import optimization


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

Branch: refs/heads/develop
Commit: 8d3065f153cb4dbb6715f8a4477f9092bae7a313
Parents: a010c78
Author: piotrz <pi...@apache.org>
Authored: Sun Nov 27 23:57:00 2016 +0100
Committer: piotrz <pi...@apache.org>
Committed: Sun Nov 27 23:57:00 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/App.mxml |  1 -
 .../flexjs/MDLExample/src/main/flex/Buttons.mxml  |  1 -
 .../flexjs/MDLExample/src/main/flex/Cards.mxml    |  1 -
 .../flexjs/MDLExample/src/main/flex/Grids.mxml    |  1 -
 .../flexjs/MDLExample/src/main/flex/Lists.mxml    |  1 -
 .../MDLExample/src/main/flex/TextFields.mxml      |  1 -
 .../flexjs/MDLExample/src/main/flex/Toggles.mxml  |  2 --
 .../flex/org/apache/flex/mdl/beads/ListView.as    | 18 ------------------
 8 files changed, 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/examples/flexjs/MDLExample/src/main/flex/App.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/App.mxml b/examples/flexjs/MDLExample/src/main/flex/App.mxml
index 3aff152..3c4e11c 100644
--- a/examples/flexjs/MDLExample/src/main/flex/App.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -20,7 +20,6 @@ limitations under the License.
 <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:js="library://ns.apache.org/flexjs/basic"
                 xmlns:local="*"
-                xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                 xmlns="http://www.w3.org/1999/xhtml">
     
     <js:valuesImpl>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml b/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
index 67ba710..d6c3853 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Buttons.mxml
@@ -19,7 +19,6 @@ limitations under the License.
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:js="library://ns.apache.org/flexjs/basic"
-                 xmlns:local="*"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml">
     

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/examples/flexjs/MDLExample/src/main/flex/Cards.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Cards.mxml b/examples/flexjs/MDLExample/src/main/flex/Cards.mxml
index 9d98d76..e9330db 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Cards.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Cards.mxml
@@ -19,7 +19,6 @@ limitations under the License.
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:js="library://ns.apache.org/flexjs/basic"
-                 xmlns:local="*"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml">
     

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Grids.mxml b/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
index f1d0765..b22b813 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Grids.mxml
@@ -19,7 +19,6 @@ limitations under the License.
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:js="library://ns.apache.org/flexjs/basic"
-                 xmlns:local="*"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml">
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Lists.mxml b/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
index 4614166..db208d3 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
@@ -19,7 +19,6 @@ limitations under the License.
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:js="library://ns.apache.org/flexjs/basic"
-                 xmlns:local="*"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:ui="org.apache.flex.core.*"

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml b/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
index 8385faf..6ddceed 100644
--- a/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/TextFields.mxml
@@ -19,7 +19,6 @@ limitations under the License.
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:js="library://ns.apache.org/flexjs/basic"
-                 xmlns:local="*"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml">
     

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
index f88c90d..ad3bba5 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Toggles.mxml
@@ -18,8 +18,6 @@ limitations under the License.
 
 -->
 <mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
-                 xmlns:js="library://ns.apache.org/flexjs/basic"
-                 xmlns:local="*"
                  xmlns:mdl="library://ns.apache.org/flexjs/mdl"
                  xmlns="http://www.w3.org/1999/xhtml">
     

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8d3065f1/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListView.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListView.as
index dd65596..b6f9778 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListView.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/ListView.as
@@ -20,32 +20,14 @@ package org.apache.flex.mdl.beads
 {	
     import org.apache.flex.html.beads.IListView;
     import org.apache.flex.html.beads.ContainerView;
-	import org.apache.flex.core.BeadViewBase;
-	import org.apache.flex.core.ContainerBase;
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.IBeadLayout;
-	import org.apache.flex.core.IBeadModel;
-	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.ISelectableItemRenderer;
-	import org.apache.flex.core.IItemRenderer;
 	import org.apache.flex.core.IItemRendererParent;
-	import org.apache.flex.core.IParent;
-    import org.apache.flex.core.IParentIUIBase;
 	import org.apache.flex.core.IRollOverModel;
 	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.IStrand;
     import org.apache.flex.core.IUIBase;
-	import org.apache.flex.core.Strand;
-	import org.apache.flex.core.UIBase;
-	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
-	import org.apache.flex.events.IEventDispatcher;
-	import org.apache.flex.html.beads.models.ArraySelectionModel;
-	import org.apache.flex.html.beads.models.ScrollBarModel;
-	import org.apache.flex.html.beads.models.SingleLineBorderModel;
 	import org.apache.flex.html.supportClasses.Border;
-	import org.apache.flex.html.supportClasses.DataGroup;
-	import org.apache.flex.html.supportClasses.ScrollBar;
 
 	/**
 	 *  The List class creates the visual elements of the org.apache.flex.html.List 


[2/2] git commit: [flex-asjs] [refs/heads/develop] - Add basic Chip component to MDL

Posted by pi...@apache.org.
Add basic Chip component to MDL


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

Branch: refs/heads/develop
Commit: 62150cf44a55f0c1a96cf2197658f435266c4098
Parents: 8d3065f
Author: piotrz <pi...@apache.org>
Authored: Sun Nov 27 23:58:39 2016 +0100
Committer: piotrz <pi...@apache.org>
Committed: Sun Nov 27 23:58:39 2016 +0100

----------------------------------------------------------------------
 .../flexjs/MDLExample/src/main/flex/Chips.mxml  |  27 +++++
 .../src/main/flex/MainNavigation.mxml           |   3 +
 .../src/main/flex/org/apache/flex/mdl/Chip.as   | 101 +++++++++++++++++++
 .../src/main/resources/mdl-manifest.xml         |   1 +
 4 files changed, 132 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/62150cf4/examples/flexjs/MDLExample/src/main/flex/Chips.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Chips.mxml b/examples/flexjs/MDLExample/src/main/flex/Chips.mxml
new file mode 100644
index 0000000..8d8c16a
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/flex/Chips.mxml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<mdl:TabBarPanel xmlns:fx="http://ns.adobe.com/mxml/2009"
+                 xmlns:mdl="library://ns.apache.org/flexjs/mdl">
+    <mdl:Grid>
+        <mdl:GridCell column="1">
+            <mdl:Chip text="Basic Chip" />
+        </mdl:GridCell>
+    </mdl:Grid>
+</mdl:TabBarPanel>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/62150cf4/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
index fcbbddd..0a647d7 100644
--- a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
@@ -36,6 +36,7 @@ limitations under the License.
         </mdl:HeaderRow>
         <mdl:TabBar ripple="true">
             <mdl:TabBarButton text="Cards" href="#cards_panel" isActive="true"/>
+            <mdl:TabBarButton text="Chips" href="#chips_panel"/>
             <mdl:TabBarButton text="Grids" href="#grids_panel"/>
             <mdl:TabBarButton text="Buttons" href="#buttons_panel" />
             <mdl:TabBarButton text="TextFields" href="#textfield_panel"/>
@@ -59,6 +60,8 @@ limitations under the License.
         
         <local:Cards id="cards_panel" isActive="true"/>
 
+        <local:Chips id="chips_panel" />
+
         <local:Grids id="grids_panel"/>
         
         <local:Buttons id="buttons_panel"/>

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

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/62150cf4/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
index be37dc1..44d4a75 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
+++ b/frameworks/projects/MaterialDesignLite/src/main/resources/mdl-manifest.xml
@@ -57,5 +57,6 @@
     <component id="TabBarPanel" class="org.apache.flex.mdl.TabBarPanel"/>
     <component id="Grid" class="org.apache.flex.mdl.Grid"/>
     <component id="GridCell" class="org.apache.flex.mdl.GridCell"/>
+    <component id="Chip" class="org.apache.flex.mdl.Chip"/>
 
 </componentPackage>