diff options
author | Benjamin Jones <bjones@galois.com> | 2013-11-04 15:21:32 -0800 |
---|---|---|
committer | Benjamin Jones <bjones@galois.com> | 2013-11-04 15:21:32 -0800 |
commit | f241200b5f19c9b389bfc4152751b0e509b991e7 (patch) | |
tree | c04c80bff28621e32ba5322d6e99ef6bbf215f38 | |
parent | f1d3202e54fac77246d56977c3ae12bf454c4da2 (diff) | |
parent | 51f5a2477adb718a1868483cf00e04816bf7423a (diff) |
Merge branch 'new-ui'
-rw-r--r-- | src/js/fiveui/css/ui.css | 12 | ||||
-rw-r--r-- | src/js/fiveui/injected/compute.js | 16 |
2 files changed, 22 insertions, 6 deletions
diff --git a/src/js/fiveui/css/ui.css b/src/js/fiveui/css/ui.css index 0b723c9..2a08a69 100644 --- a/src/js/fiveui/css/ui.css +++ b/src/js/fiveui/css/ui.css @@ -108,9 +108,17 @@ div.fiveui-problem-body { } div.fiveui-severity-0 { - background-color: #F2FC7E; + background-color: #F5B3B3; } div.fiveui-severity-1 { - background-color: #F5B3B3; + background-color: #F2FC7E; +} + +div.fiveui-severity-2 { + background-color: rgba(0, 255, 0, 0.5); +} + +div.fiveui-severity-3 { + background-color: rgba(0, 0, 255, 0.5); } diff --git a/src/js/fiveui/injected/compute.js b/src/js/fiveui/injected/compute.js index 9fc16a8..d8ae9e8 100644 --- a/src/js/fiveui/injected/compute.js +++ b/src/js/fiveui/injected/compute.js @@ -101,7 +101,7 @@ msg: message, descr: rule.description, url: window.location.href, - severity: 1, + severity: 0, // default is error xpath: core.getElementXPath(node), phash: null, hash: null, @@ -238,15 +238,23 @@ }; fiveui.stats.numElts = 0; // reset stats element counter - var report = { - error:function(message, node) { + var genericReporter = function (severity) { + return function (message, node) { var prob = core.hash(theRule, message, node); var query = $(node); // let the backend sort out if this problem has been reported already query.addClass(prob.hash); + prob.severity = severity; core.reportProblem(prob); - } + }; + }; + + var report = { + error: genericReporter(0), + warning: genericReporter(1), + advisory: genericReporter(2), + info: genericReporter(3) }; core.beforeRules(); |