accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject svn commit: r1631787 - /accumulo/site/trunk/content/downloads/index.mdtext
Date Tue, 14 Oct 2014 15:24:41 GMT
Author: elserj
Date: Tue Oct 14 15:24:41 2014
New Revision: 1631787

URL: http://svn.apache.org/r1631787
Log:
Use jquery instead of the onClick attribute

Modified:
    accumulo/site/trunk/content/downloads/index.mdtext

Modified: accumulo/site/trunk/content/downloads/index.mdtext
URL: http://svn.apache.org/viewvc/accumulo/site/trunk/content/downloads/index.mdtext?rev=1631787&r1=1631786&r2=1631787&view=diff
==============================================================================
--- accumulo/site/trunk/content/downloads/index.mdtext (original)
+++ accumulo/site/trunk/content/downloads/index.mdtext Tue Oct 14 15:24:41 2014
@@ -23,28 +23,20 @@ Notice:    Licensed to the Apache Softwa
 * This function takes a valid URL string as an argument, and uses that URL string
 * as the event label.
 */
-var trackOutboundLink = function(url) {
-  var hrefUrl = this.target.getAttribute('href')
+$('.download_tarball').click(function(event) {
+  var hrefUrl = event.target.getAttribute('href')
   if (event.ctrlKey || event.shiftKey || event.metaKey || event.which == 2) {
     var newWin = true;}
 
   if (newWin) {
-    ga('send', 'event', 'outbound', 'click', url, {'nonInteraction': 1});
+    ga('send', 'event', 'outbound', 'click', $(this).id, {'nonInteraction': 1});
     return true;
   } else {
-    ga('send', 'event', 'outbound', 'click', url, {'hitCallback': 
+    ga('send', 'event', 'outbound', 'click', $(this).id, {'hitCallback': 
     function () {window.location.href = hrefUrl;}}, {'nonInteraction': 1});
     return false;
   }
-};
-/* original GA code
-var trackOutboundLink = function(url) {
-   ga('send', 'event', 'outbound', 'click', url, {'hitCallback':
-     function () {
-     document.location = url;
-     }
-   });
-}*/
+});
 
 var createSection = function(name, items, divider) {
   var section = '';
@@ -115,7 +107,7 @@ For convenience, [MD5][MD5SUM_161] and [
 <table class="table">
 <tr>
 <th>Generic Binaries</th>
-<td><a href="https://www.apache.org/dyn/closer.cgi/accumulo/1.6.1/accumulo-1.6.1-bin.tar.gz"
link-suffix="/accumulo/1.6.1/accumulo-1.6.1-bin.tar.gz" onClick="return trackOutboundLink('/downloads/accumulo-1.6.1-bin.tar.gz');">accumulo-1.6.1-bin.tar.gz</a></td>
+<td><a href="https://www.apache.org/dyn/closer.cgi/accumulo/1.6.1/accumulo-1.6.1-bin.tar.gz"
link-suffix="/accumulo/1.6.1/accumulo-1.6.1-bin.tar.gz" class="download_tarball" id="/downloads/accumulo-1.6.1-bin.tar.gz">accumulo-1.6.1-bin.tar.gz</a></td>
 <td><a href="https://www.apache.org/dist/accumulo/1.6.1/accumulo-1.6.1-bin.tar.gz.asc">ASC</a></td>
 </tr>
 <tr>



Mime
View raw message