changeset 8:85027feb6b6e

better way of doing css styling via css classes for bug priority, severity, and status.
author Atul Varma <varmaa@toolness.com>
date Sun, 07 Mar 2010 23:17:26 -0800
parents d27bd0db6bf1
children a5558c563a51
files dashboard.css dashboard.js
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dashboard.css	Sun Mar 07 23:09:11 2010 -0800
+++ b/dashboard.css	Sun Mar 07 23:17:26 2010 -0800
@@ -13,10 +13,6 @@
     background: yellow;
 }
 
-#fixed-bugs .bug-row {
-    text-decoration: line-through;
-}
-
 #reports {
     display: none;
 }
@@ -62,6 +58,10 @@
     color: red;
 }
 
+.status-RESOLVED, .status-VERIFIED {
+    text-decoration: line-through;
+}
+
 .countdown {
     color: #f0f0f0;
 }
--- a/dashboard.js	Sun Mar 07 23:09:11 2010 -0800
+++ b/dashboard.js	Sun Mar 07 23:17:26 2010 -0800
@@ -31,11 +31,13 @@
           var row = rowTemplate.clone();
           row.attr("id", "bug-id-" + bug.id);
           row.find(".summary").text(bug.summary);
-          if (bug.priority != "--")
+          row.addClass("status-" + bug.status);
+          if (bug.priority != "--") {
             row.find(".importance").text(bug.priority + NBSP +
-                                         bug.severity)
-                                   .addClass(bug.priority)
-                                   .addClass(bug.severity);
+                                         bug.severity);
+            row.addClass(bug.priority);
+            row.addClass(bug.severity);
+          }
           row.find(".last-changed").text(prettyDate(bug.last_change_time));
           row.click(
             function() {