Mercurial > bugzilla-dashboard
diff dashboard.js @ 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 | 11d242c482ca |
line wrap: on
line diff
--- 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;