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

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

Replaced Link by js:Anchor


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

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

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


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

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

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