openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1608079 - /openoffice/ooo-site/trunk/content/zh-tw/download/index.html
Date Sat, 05 Jul 2014 17:28:39 GMT
Author: marcus
Date: Sat Jul  5 17:28:39 2014
New Revision: 1608079

URL: http://svn.apache.org/r1608079
Log:
Updated JS functions and colored boxes

Modified:
    openoffice/ooo-site/trunk/content/zh-tw/download/index.html

Modified: openoffice/ooo-site/trunk/content/zh-tw/download/index.html
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/zh-tw/download/index.html?rev=1608079&r1=1608078&r2=1608079&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/zh-tw/download/index.html (original)
+++ openoffice/ooo-site/trunk/content/zh-tw/download/index.html Sat Jul  5 17:28:39 2014
@@ -24,20 +24,22 @@
   /* ]]> */
   </style>
   <script>
-    if (window.document.referrer.indexOf("shell.windows.com") != -1)
+    if ( window.document.referrer.indexOf( "shell.windows.com" ) != -1 ) {
        location.href = "http://www.openoffice.org/why/why_odf.html";
-
-    function shareFacebook() {
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'facebook']); 
-      window.open('http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.openoffice.org%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');

-    }
-    function shareTwitter(){
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'twitter']); 
-      window.open('http://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.openoffice.org%2Fdownload%2F&text=Join+the+OpenOffice+revolution%2C+the+free+office+productivity+suite+with+over+90+million+trusted+downloads.','_blank','toolbar=0,status=0,width=580,height=325');
     }
-    function shareGooglePlus(){
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'google+']); 
-      window.open('http://plus.google.com/share?url=http%3A%2F%2Fwww.openoffice.org%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');
+
+    function share( platform ) {
+      _gaq.push( ['_trackEvent', 'social', 'shareDownload', platform] ); 
+
+      if ( platform == 'apacheblog' ) {
+        window.open( 'http://blogs.apache.org/OOo/', '_blank' );
+      } else if ( platform == 'facebook' ) {
+        window.open( 'http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.openoffice.org%2Fdownload%2F',
'_blank', 'toolbar=0, status=0, width=580, height=325' );
+      } else if ( platform == 'twitter' ) {
+        window.open( 'http://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.openoffice.org%2Fdownload%2F&text=Join+the+OpenOffice+revolution%2C+the+free+office+productivity+suite+with+over+100+million+trusted+downloads.',
'_blank', 'toolbar=0, status=0, width=580, height=325' );
+      } else if ( platform == 'google+' ) {
+        window.open( 'http://plus.google.com/share?url=http%3A%2F%2Fwww.openoffice.org%2Fdownload%2F',
'_blank', 'toolbar=0, status=0, width=580, height=325' );
+      }
     }
   </script>
 </head>
@@ -106,17 +108,22 @@
       + "<a style='cursor: default;' title='" + l10n_share_light_blue_box_text_title +
"'>"
         + l10n_share_light_blue_box_text_text
       + "</a>"
-      + "<a style='display: inline; padding: 0 5px 0 30px;' href='javascript:shareFacebook()'"
+      + "<a style='display: inline; padding: 0 5px 0 30px;' href='javascript:share( \"apacheblog\"
)'"
+        + "title='" + l10n_share_light_blue_box_blog_title + "'>"
+        + "<img src='http://www.openoffice.org/images/logo-rss-32.png' alt='"
+        + l10n_share_light_blue_box_blog_alt + "' />"
+      + "</a>"
+      + "<a style='display: inline; padding: 0 5px;' href='javascript:share( \"facebook\"
)'"
         + "title='" + l10n_share_light_blue_box_facebook_title + "'>"
         + "<img src='http://www.openoffice.org/images/logo-facebook-32.png' alt='"
         + l10n_share_light_blue_box_facebook_alt + "' />"
       + "</a>"
-      + "<a style='display: inline; padding: 0 5px;' href='javascript:shareTwitter()'"
+      + "<a style='display: inline; padding: 0 5px;' href='javascript:share( \"twitter\"
)'"
         + "title='" + l10n_share_light_blue_box_twitter_title + "'>"
         + "<img src='http://www.openoffice.org/images/logo-twitter-32.png' alt='"
         + l10n_share_light_blue_box_twitter_alt + "' />"
       + "</a>"
-      + "<a style='display: inline; padding: 0 5px;' href='javascript:shareGooglePlus()'"
+      + "<a style='display: inline; padding: 0 5px;' href='javascript:share( \"google+\")'"
         + "title='" + l10n_share_light_blue_box_googleplus_title + "'>"
         + "<img src='http://www.openoffice.org/images/logo-googleplus-32.png' alt='"
         + l10n_share_light_blue_box_googleplus_alt + "' />"



Mime
View raw message