This is an automated email from the ASF dual-hosted git repository.

carlosrovira 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 017e16e  add link to Gihub source code that opens in a new browser tab
017e16e is described below

commit 017e16e397bdc7c84b39a14e55646239a0f8f8f0
Author: Carlos Rovira <carlosrov...@apache.org>
AuthorDate: Thu Dec 27 01:14:26 2018 +0100

    add link to Gihub source code that opens in a new browser tab
---
 .../royale/components/ExampleAndSourceCodeTabbedSectionContent.as | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/examples/royale/TourDeJewel/src/main/royale/components/ExampleAndSourceCodeTabbedSectionContent.as
 
b/examples/royale/TourDeJewel/src/main/royale/components/ExampleAndSourceCodeTabbedSectionContent.as
index c7e5688..4042bd0 100644
--- 
a/examples/royale/TourDeJewel/src/main/royale/components/ExampleAndSourceCodeTabbedSectionContent.as
+++ 
b/examples/royale/TourDeJewel/src/main/royale/components/ExampleAndSourceCodeTabbedSectionContent.as
@@ -35,6 +35,7 @@ package components
     import org.apache.royale.utils.MXMLDataInterpreter;
     import org.apache.royale.core.IContainerBaseStrandChildrenHost;
     import org.apache.royale.core.IChild;
+    import org.apache.royale.html.elements.A;
 
     [DefaultProperty("mxmlContent")]
 
@@ -69,6 +70,7 @@ package components
         private var sourceCodeMXMLText:Code;
 
         private var sourceCodeUrlPrefix:String = 
"https://api.github.com/repos/apache/royale-asjs/contents/examples/royale/TourDeJewel/src/main/royale/";;
+        private var sourceCodeUrlWebPrefix:String = 
"https://github.com/apache/royale-asjs/blob/develop/examples/royale/TourDeJewel/src/main/royale/";;
         
         private var _sourceCodeUrl:String;
         /**
@@ -98,6 +100,12 @@ package components
             
             sourceCodeTab = new SectionContent();
             sourceCodeTab.name = "sourceCodeTab";
+            var link:A = new A();
+            link.href = sourceCodeUrlWebPrefix + sourceCodeUrl;
+            link.text = "Source code in GitHub";
+            link.target = "_blank";
+            link.rel = "noreferrer noopener"
+            sourceCodeTab.addElement(link);
             var pre:Pre = new Pre();
             sourceCodeMXMLText = new Code();
             sourceCodeMXMLText.className = "xml codeExample";

Reply via email to