incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r831464 - in /websites/staging/flex/trunk: cgi-bin/ content/ content/flex/installerbadge/index.html
Date Sun, 09 Sep 2012 11:47:36 GMT
Author: buildbot
Date: Sun Sep  9 11:47:35 2012
New Revision: 831464

Log:
Staging update by buildbot for flex

Modified:
    websites/staging/flex/trunk/cgi-bin/   (props changed)
    websites/staging/flex/trunk/content/   (props changed)
    websites/staging/flex/trunk/content/flex/installerbadge/index.html

Propchange: websites/staging/flex/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Sep  9 11:47:35 2012
@@ -1 +1 @@
-1382462
+1382466

Propchange: websites/staging/flex/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Sep  9 11:47:35 2012
@@ -1 +1 @@
-1382462
+1382466

Modified: websites/staging/flex/trunk/content/flex/installerbadge/index.html
==============================================================================
--- websites/staging/flex/trunk/content/flex/installerbadge/index.html (original)
+++ websites/staging/flex/trunk/content/flex/installerbadge/index.html Sun Sep  9 11:47:35
2012
@@ -1,10 +1,3 @@
-<style type="text/css"> 
-    body { margin: 0; padding: 0; }   
-    object:focus { outline: none; }
-    #flashContent { display: none; }
-    #${application} { border: 1px solid #172647; }
-</style>
-
 <div id="flashContent">
     <script type="text/javascript"> 
         var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");

@@ -23,7 +16,7 @@
 <script type="text/javascript">
     /* use strict */
 
-    var swfVersionStr, params, attributes;
+    var _widget;
 
     function displayType() {
         if ((window.top != window.self) && window.parent)
@@ -33,7 +26,7 @@
     }
 
     function init() {
-        var prefix, theElement, theHeight, theWidth, widget;
+        var prefix, theElement, theHeight, theWidth;
 
         if (displayType() != "") {
             if (typeof window.innerWidth === 'number') {
@@ -46,27 +39,39 @@
                 theWidth = theElement.clientWidth;
             }
 
-            widget = document.getElementById("InstallApacheFlexBadge");
-
-            console.log("HERE '" + widget + "'");
+           console.log("HERE '" + _widget + "'");
 
-            widget.style.height = (theHeight - 2) + "px";
-            widget.style.width = (theWidth - 2) + "px";
+            _widget.style.height = (theHeight - 2) + "px";
+            _widget.style.width = (theWidth - 2) + "px";
 
             document.getElementById("InstallApacheFlexBadge").style.border = "1px solid #172647";
         }
     }
 
-    swfVersionStr = "11.1.0";
-    flashVars = { serviceURL: "http://incubator.apache.org/flex/" };
-    params = { quality: "high", bgcolor: "#ffffff", allowscriptaccess: "sameDomain",
-        allowfullscreen: "true" };
-    attributes = { id: "InstallApacheFlexBadge", name: "InstallApacheFlexBadge" };
+    function start() {
+        var swfVersionStr, params, attributes;
+
+        swfVersionStr = "11.1.0";
+        flashVars = { serviceURL: "http://incubator.apache.org/flex/" };
+        params = { quality: "high", bgcolor: "#ffffff", allowscriptaccess: "sameDomain",
+            allowfullscreen: "true" };
+        attributes = { id: "InstallApacheFlexBadge", name: "InstallApacheFlexBadge" };
+
+        swfobject.embedSWF("InstallApacheFlexBadge.swf", "flashContent", "10", "10", 
+            swfVersionStr, "", flashVars, params, attributes);
+
+        swfobject.createCSS("#flashContent", "display: block;");
 
-    swfobject.embedSWF("InstallApacheFlexBadge.swf", "flashContent", "10", "10", 
-        swfVersionStr, "", flashVars, params, attributes);
+        waitForWidget();
+    }
+
+    function waitForWidget() {
+        _widget = document.getElementById("InstallApacheFlexBadge");
+
+        if (!_widget)
+            setTimeout(function () { waitForWidget(); }, 1000);
+    }
 
-    swfobject.createCSS("#flashContent", "display: block;");
+    start();
 
-    setTimeout(function () { init(); }, 1000);
 </script>
\ No newline at end of file



Mime
View raw message