You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ma...@apache.org on 2014/07/05 19:26:40 UTC

svn commit: r1608077 - /openoffice/ooo-site/trunk/content/zh-cn/download/index.html

Author: marcus
Date: Sat Jul  5 17:26:40 2014
New Revision: 1608077

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

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

Modified: openoffice/ooo-site/trunk/content/zh-cn/download/index.html
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/zh-cn/download/index.html?rev=1608077&r1=1608076&r2=1608077&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/zh-cn/download/index.html (original)
+++ openoffice/ooo-site/trunk/content/zh-cn/download/index.html Sat Jul  5 17:26:40 2014
@@ -23,34 +23,28 @@
   /* ]]> */
   </style>
   <script>
-    if (window.document.referrer.indexOf("shell.windows.com") != -1)
-      location.href = "../../why/why_odf.html";
-
-    function shareFacebook() {
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'facebook']); 
-      window.open('https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');	
+    if ( window.document.referrer.indexOf( "shell.windows.com" ) != -1 ) {
+       location.href = "http://www.openoffice.org/why/why_odf.html";
     }
 
-    function shareTwitter(){
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'twitter']); 
-      window.open('https://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F&text=%C3%E2%B7%D1%B5%C4office%CC%D7%BC%FE','_blank','toolbar=0,status=0,width=580,height=325');
-    }
+    function share( platform ) {
+      _gaq.push( ['_trackEvent', 'social', 'shareDownload', platform] ); 
 
-    function shareGooglePlus(){
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'google+']); 
-      window.open('https://plus.google.com/share?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');
-    }
-    function shareQzone(){
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'Qzone']); 
-      window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');
-    }
-    function shareSinaWeibo(){
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'SinaWeibo']); 
-      window.open('http://service.weibo.com/share/share.php?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');
-    }
-    function shareTencentWeibo(){
-      _gaq.push(['_trackEvent','social', 'shareDownload', 'TencentWeibo']); 
-      window.open('http://share.v.t.qq.com/index.php?c=share&a=index&url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F&title=Apache%20OpenOffice%20-%20%C3%E2%B7%D1%B5%C4office%CC%D7%BC%FE','_blank','toolbar=0,status=0,width=580,height=325');
+      if ( platform == 'apacheblog' ) {
+        window.open( 'http://blogs.apache.org/OOo/', '_blank' );
+      } else if ( platform == 'facebook' ) {
+        window.open('https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');	
+      } else if ( platform == 'twitter' ) {
+        window.open('https://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F&text=%C3%E2%B7%D1%B5%C4office%CC%D7%BC%FE','_blank','toolbar=0,status=0,width=580,height=325');
+      } else if ( platform == 'google+' ) {
+        window.open('https://plus.google.com/share?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');
+      } else if ( platform == 'Qzone' ) {
+        window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');
+      } else if ( platform == 'SinaWeibo' ) {
+        window.open('http://service.weibo.com/share/share.php?url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F','_blank','toolbar=0,status=0,width=580,height=325');
+      } else if ( platform == 'TencentWeibo' ) {
+        window.open('http://share.v.t.qq.com/index.php?c=share&a=index&url=http%3A%2F%2Fwww.openoffice.org%2Fzh-cn%2Fdownload%2F&title=Apache%20OpenOffice%20-%20%C3%E2%B7%D1%B5%C4office%CC%D7%BC%FE','_blank','toolbar=0,status=0,width=580,height=325');
+      }
     }
   </script>
 </head>
@@ -110,12 +104,12 @@
 	<h2><a>社交媒介</a></h2>
     <p id='ShareDownloadLinks'>
 	  <a>告诉您的朋友关于Apache OpenOffice吧!</a>
-	  <a style="display:inline; padding: 0 5px 0 30px;" href="javascript:shareQzone(); "><img src='images/logo-qzone-32.png' /></a>
-	  <a style="display:inline; padding: 0 5px;" href="javascript:shareSinaWeibo(); "><img src='images/logo-sinaweibo-32.png' /></a>
-	  <a style="display:inline; padding: 0 5px;" href="javascript:shareTencentWeibo(); "><img src='images/logo-tencentweibo-32.png'  /></a>	 
-	  <a style="display:inline; padding: 0 5px 0 30px;" href="javascript:shareFacebook(); "><img src='/images/logo-facebook-32.png' /></a>
-	  <a style="display:inline; padding: 0 5px;" href="javascript:shareTwitter(); "><img src='/images/logo-twitter-32.png' /></a>
-	  <a style="display:inline; padding: 0 5px;" href="javascript:shareGooglePlus(); "><img src='/images/logo-googleplus-32.png'  /></a>	 
+	  <a style="display:inline; padding: 0 5px 0 30px;" href="javascript:share( 'qzone' ); "><img src='images/logo-qzone-32.png' /></a>
+	  <a style="display:inline; padding: 0 5px;" href="javascript:share( 'sinaweibo' ); "><img src='images/logo-sinaweibo-32.png' /></a>
+	  <a style="display:inline; padding: 0 5px;" href="javascript:share( 'tencentweibo' ); "><img src='images/logo-tencentweibo-32.png'  /></a>	 
+	  <a style="display:inline; padding: 0 5px 0 30px;" href="javascript:share( 'facebook' ); "><img src='/images/logo-facebook-32.png' /></a>
+	  <a style="display:inline; padding: 0 5px;" href="javascript:share( 'twitter' ); "><img src='/images/logo-twitter-32.png' /></a>
+	  <a style="display:inline; padding: 0 5px;" href="javascript:share( 'google+' ); "><img src='/images/logo-googleplus-32.png'  /></a>	 
 	</p>
   </div>