]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/base.mako
Add localized time support (on hover).
[xonotic/xonstat.git] / xonstat / templates / base.mako
index 03865330cc194c4b41134cf7b526ee2d7414fbae..3d6af2dc01da957f4c0e2e10f4465ea2ca49bd4a 100644 (file)
       </%block>
 
       <%block name="js">
+      <script src="/static/js/jquery-1.7.1.min.js"></script>
       </%block>
 
+      <!-- RELATIVE TIME CONVERSION -->
+      <script type="text/javascript">
+      $('.abstime').each(function(i,e){
+        var epoch = e.getAttribute('data-epoch');
+        var d = new Date(0);
+        d.setUTCSeconds(epoch);
+        e.setAttribute('title', d.toDateString() + ' ' + d.toTimeString());  
+      });
+      </script>
+
+      <!-- GOOGLE ANALYTICS -->
       <script type="text/javascript">
       var _gaq = _gaq || [];
       _gaq.push(['_setAccount', 'UA-30391685-1']);