incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject svn commit: r1379296 - in /incubator/flex/utilities/trunk/installerBadge: html-template/index.template.html src/InstallApacheFlexBadge.mxml
Date Fri, 31 Aug 2012 05:42:38 GMT
Author: erikdebruin
Date: Fri Aug 31 05:42:38 2012
New Revision: 1379296

URL: http://svn.apache.org/viewvc?rev=1379296&view=rev
Log:
Update to allow the badge to be run from Om's site during the vote. Used FlashVar instead
of constant to point the badge to the location of the config XML and the mirror CGI.

Modified:
    incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html
    incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml

Modified: incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html?rev=1379296&r1=1379295&r2=1379296&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html (original)
+++ incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html Fri Aug
31 05:42:38 2012
@@ -70,12 +70,13 @@
         }
         
         swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+        flashVars = { serviceURL: "http://people.apache.org/~bigosmallm/installapacheflex_RC1/binaries/"
};
         params = { quality: "high", bgcolor: "${bgcolor}", allowscriptaccess: "sameDomain",
             allowfullscreen: "true" };
         attributes = { id: "${application}", name: "${application}" };
         
         swfobject.embedSWF("${swf}.swf", "flashContent", "300", "300", 
-            swfVersionStr, "", {}, params, attributes);
+            swfVersionStr, "", flashVars, params, attributes);
         
         swfobject.createCSS("#flashContent", "display: block;");
     </script>

Modified: incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml?rev=1379296&r1=1379295&r2=1379296&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml (original)
+++ incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml Fri Aug
31 05:42:38 2012
@@ -27,8 +27,8 @@ limitations under the License.
 	<fx:Style source="/org/apache/flex/installApacheFlexBadge/styles/ApacheFlexBadgeStyle.css"
/>
 	
 	<fx:Script><![CDATA[
-		
 		import mx.controls.Alert;
+		import mx.core.FlexGlobals;
 		import mx.events.FlexEvent;
 		
 		import org.apache.flex.installApacheFlexBadge.resources.EmbeddedMedia;
@@ -69,6 +69,8 @@ limitations under the License.
 		
 		private var _mirrorURLUtil:MirrorURLUtil = MirrorURLUtil.instance;
 
+		private var _serviceURL:String;
+
 		[Bindable]
 		private var _sdkVersionString:String = "";
 		
@@ -105,6 +107,8 @@ limitations under the License.
 		
 		private function creationCompleteHandler(event:FlexEvent):void
 		{
+			_serviceURL = FlexGlobals.topLevelApplication.parameters.serviceURL;
+			
 			var displayType:String = ExternalInterface.call("displayType"); 
 			
 			var newStateName:String;
@@ -127,7 +131,7 @@ limitations under the License.
 			}
 			currentState = newStateName;
 			
-			var url:String = Constants.APACHE_FLEX_URL + Constants.CONFIG_XML_NAME;
+			var url:String = _serviceURL + Constants.CONFIG_XML_NAME;
 			
 			if (useCURL())
 				_internetUtil.fetch("badgeConfigService.php", internetFetchResultHandler, "url=" + escape(url));
@@ -166,9 +170,7 @@ limitations under the License.
 				{
 					var mirrorURLCGI:String = files.(@name == 'MirrorURLCGI').@file.toString();
 					
-					_mirrorURLUtil.getMirrorURL(
-						Constants.APACHE_FLEX_URL + mirrorURLCGI,
-						getMirrorURLResultHandler);
+					_mirrorURLUtil.getMirrorURL(_serviceURL + mirrorURLCGI, getMirrorURLResultHandler);
 				}
 				else
 				{
@@ -218,7 +220,7 @@ limitations under the License.
 			var localDomain:String = InternetUtil.getTLDFromURL(
 				ExternalInterface.call("function () { return window.location.hostname; }"));
 
-			var remoteDomain:String = InternetUtil.getTLDFromURL(Constants.APACHE_FLEX_URL);
+			var remoteDomain:String = InternetUtil.getTLDFromURL(_serviceURL);
 
 			return (localDomain) && (localDomain != remoteDomain);
 		}



Mime
View raw message