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/2a8b1797
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2a8b1797
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2a8b1797

Branch: refs/heads/feature/mdl
Commit: 2a8b179734e331b763f3b6570eeb2c7efddb6178
Parents: fe775c6
Author: Carlos Rovira <carlosrov...@apache.org>
Authored: Fri Nov 4 15:39:51 2016 +0100
Committer: Carlos Rovira <carlosrov...@apache.org>
Committed: Sun Nov 6 02:28:52 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/2a8b1797/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/2a8b1797/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/2a8b1797/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"/>

Reply via email to