changeset 5:cc7d72e1ac2e

Fixed strike-through and Safari compatibility.
author Atul Varma <varmaa@toolness.com>
date Sun, 07 Mar 2010 15:32:37 -0800
parents 11d242c482ca
children 8c29933b8435
files dashboard.css dashboard.js
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dashboard.css	Sun Mar 07 15:11:15 2010 -0800
+++ b/dashboard.css	Sun Mar 07 15:32:37 2010 -0800
@@ -13,7 +13,7 @@
     background: yellow;
 }
 
-#fixed-bugs a {
+#fixed-bugs .bug-row {
     text-decoration: line-through;
 }
 
--- a/dashboard.js	Sun Mar 07 15:11:15 2010 -0800
+++ b/dashboard.js	Sun Mar 07 15:32:37 2010 -0800
@@ -34,10 +34,22 @@
                       });
     }
 
+    // Taken from MDC @ Core_JavaScript_1.5_Reference/Objects/Date.
+    function ISODateString(d) {
+      function pad(n) { return n < 10 ? '0' + n : n; }
+
+      return (d.getUTCFullYear() + '-' +
+              pad(d.getUTCMonth() + 1) + '-' +
+              pad(d.getUTCDate()) + 'T' + 
+              pad(d.getUTCHours()) + ':' +
+              pad(d.getUTCMinutes()) + ':' +
+              pad(d.getUTCSeconds()) + 'Z');
+    }
+
     function timeAgo(ms) {
       var now = new Date();
       var then = new Date(now - ms);
-      return then.toLocaleFormat("%Y-%m-%d");
+      return ISODateString(then);
     }
 
     const NBSP = "\u00a0";