struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1431640 - in /struts/site/trunk/src/site: resources/community.js site.xml xdoc/index.xml
Date Thu, 10 Jan 2013 21:08:59 GMT
Author: lukaszlenart
Date: Thu Jan 10 21:08:58 2013
New Revision: 1431640

URL: http://svn.apache.org/viewvc?rev=1431640&view=rev
Log:
Moves JavaScript to dedicated file to solve problem with download.html

Added:
    struts/site/trunk/src/site/resources/community.js
Modified:
    struts/site/trunk/src/site/site.xml
    struts/site/trunk/src/site/xdoc/index.xml

Added: struts/site/trunk/src/site/resources/community.js
URL: http://svn.apache.org/viewvc/struts/site/trunk/src/site/resources/community.js?rev=1431640&view=auto
==============================================================================
--- struts/site/trunk/src/site/resources/community.js (added)
+++ struts/site/trunk/src/site/resources/community.js Thu Jan 10 21:08:58 2013
@@ -0,0 +1,30 @@
+/* Facebook */
+(function (d, s, id) {
+    var js, fjs = d.getElementsByTagName(s)[0];
+    if (d.getElementById(id)) return;
+    js = d.createElement(s);
+    js.id = id;
+    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
+    fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));
+
+/* Google Plus */
+(function () {
+    var po = document.createElement('script');
+    po.type = 'text/javascript';
+    po.async = true;
+    po.src = '//apis.google.com/js/plusone.js';
+    var s = document.getElementsByTagName('script')[0];
+    s.parentNode.insertBefore(po, s);
+})();
+
+/* Twitter */
+!function (d, s, id) {
+    var js, fjs = d.getElementsByTagName(s)[0];
+    if (!d.getElementById(id)) {
+        js = d.createElement(s);
+        js.id = id;
+        js.src = "//platform.twitter.com/widgets.js";
+        fjs.parentNode.insertBefore(js, fjs);
+    }
+}(document, "script", "twitter-wjs");

Modified: struts/site/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/struts/site/trunk/src/site/site.xml?rev=1431640&r1=1431639&r2=1431640&view=diff
==============================================================================
--- struts/site/trunk/src/site/site.xml (original)
+++ struts/site/trunk/src/site/site.xml Thu Jan 10 21:08:58 2013
@@ -32,28 +32,6 @@
         <href>http://struts.apache.org/</href>
     </bannerRight>
     <body>
-        <head>
-            <script type="text/javascript">
-                /* Facebook */
-                (function(d, s, id) {
-                var js, fjs = d.getElementsByTagName(s)[0];
-                if (d.getElementById(id)) return;
-                js = d.createElement(s); js.id = id;
-                js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
-                fjs.parentNode.insertBefore(js, fjs);
-                }(document, 'script', 'facebook-jssdk'));
-
-                /* Google Plus */
-                (function() {
-                var po = document.createElement('script'); po.type = 'text/javascript'; po.async
= true;
-                po.src = '//apis.google.com/js/plusone.js';
-                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po,
s);
-                })();
-
-                /* Twitter */
-                !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
-            </script>
-        </head>
         <links>
             <item
                     name="Apache"

Modified: struts/site/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/struts/site/trunk/src/site/xdoc/index.xml?rev=1431640&r1=1431639&r2=1431640&view=diff
==============================================================================
--- struts/site/trunk/src/site/xdoc/index.xml (original)
+++ struts/site/trunk/src/site/xdoc/index.xml Thu Jan 10 21:08:58 2013
@@ -23,6 +23,10 @@ limitations under the License.
         <title>Welcome</title>
     </properties>
 
+    <head>
+        <script type="text/javascript" src="community.js"></script>
+    </head>
+
     <body>
 
         <div class="hero-unit">



Mime
View raw message