changeset 2:5aa3693fe1ac

Replaced priority column w/ importance, added css styling for priority+severity components.
author Atul Varma <varmaa@toolness.com>
date Sun, 07 Mar 2010 14:51:03 -0800
parents bddbe7723643
children 5eb1d8b6f017
files dashboard.css dashboard.js index.html
diffstat 3 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dashboard.css	Sun Mar 07 14:28:52 2010 -0800
+++ b/dashboard.css	Sun Mar 07 14:51:03 2010 -0800
@@ -41,3 +41,7 @@
 th, td {
     padding: 0.5em;
 }
+
+.P1.critical, .P1.blocker {
+    color: red;
+}
--- a/dashboard.js	Sun Mar 07 14:28:52 2010 -0800
+++ b/dashboard.js	Sun Mar 07 14:51:03 2010 -0800
@@ -2,16 +2,21 @@
   function() {
     function showBugs(query, bugs) {
       var table = $("#templates .bugs").clone();
-      var row = table.find(".bug-row").remove();
+      var rowTemplate = table.find(".bug-row").remove();
       bugs.reverse();
       bugs.forEach(
         function(bug) {
+          var row = rowTemplate.clone();
           row.find(".summary").text(bug.summary);
           row.find(".summary").attr("href", 
                                     Bugzilla.getShowBugURL(bug.id));
-          row.find(".priority").text(bug.priority);
+          if (bug.priority != "--")
+            row.find(".importance").text(bug.priority + NBSP +
+                                         bug.severity)
+                                   .addClass(bug.priority)
+                                   .addClass(bug.severity);
           row.find(".last-changed").text(prettyDate(bug.last_change_time));
-          table.append(row.clone());
+          table.append(row);
         });
       query.append(table);
     }
@@ -33,6 +38,7 @@
       return then.toLocaleFormat("%Y-%m-%d");
     }
 
+    const NBSP = "\u00a0";
     const MS_PER_HOUR = 1000 * 60 * 60;
     const MS_PER_DAY =  MS_PER_HOUR * 24;
     const MS_PER_WEEK = MS_PER_DAY * 7;
--- a/index.html	Sun Mar 07 14:28:52 2010 -0800
+++ b/index.html	Sun Mar 07 14:51:03 2010 -0800
@@ -17,12 +17,12 @@
   <table class="bugs">
     <tr class="header">
       <th>Summary</th>
-      <th>Priority</th>
+      <th>Importance</th>
       <th>Last Changed</th>
     </tr>
     <tr class="bug-row">
       <td><a target="_new" class="summary"></a></td>
-      <td class="priority"></td>
+      <td class="importance"></td>
       <td class="last-changed"></td>
     </tr>
   </table>