aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Rogan Creswick <creswick@gmail.com>2013-06-13 18:48:08 -0700
committerGravatar Rogan Creswick <creswick@gmail.com>2013-06-13 18:48:08 -0700
commitc1d8d80f7fa3ec99e402f8bfe0aeac1a0bc257f7 (patch)
treee4288dde5be6626338a791691b3022daf8783de6 /src
parent467a34d97f29701463030c2b5c6c775a0a8342ed (diff)
added color brightness rules and minor tweaks to the ui (adding xpath, report message)
Diffstat (limited to 'src')
-rw-r--r--src/js/fiveui/injected/ui.js8
-rw-r--r--src/js/fiveui/js/background.js3
-rw-r--r--src/js/fiveui/js/state.js6
3 files changed, 12 insertions, 5 deletions
diff --git a/src/js/fiveui/injected/ui.js b/src/js/fiveui/injected/ui.js
index 0c609e9..4affeae 100644
--- a/src/js/fiveui/injected/ui.js
+++ b/src/js/fiveui/injected/ui.js
@@ -111,7 +111,7 @@
/** Problem Content **/
var prMessage = $('<div class="prMessage"></div>');
- probDiv.append(prMessage);
+ probDiv.append(prMessage);
var prTitle = $('<div class="prTitle">'+prob.name+'</div>');
prMessage.append(prTitle);
@@ -119,9 +119,14 @@
var prDetails = $('<div class="prDetails"></div>');
prMessage.append(prDetails);
+
var prDescr = $('<p>'+prob.descr+'</p>');
var prPath = $('<p>'+prob.xpath+'</p>');
prDetails.append(prDescr);
+ if (prob.msg) {
+ var reportMsg = $('<div class="prReportMessage">'+prob.msg+'</div>');
+ prDetails.append(reportMsg);
+ }
prDetails.append(prPath);
prDetails.hide();
@@ -165,7 +170,6 @@
core.ui.dialog('open');
});
-
port.on('ShowProblem', function(problem) {
core.renderProblem(problem);
});
diff --git a/src/js/fiveui/js/background.js b/src/js/fiveui/js/background.js
index e662e95..268526b 100644
--- a/src/js/fiveui/js/background.js
+++ b/src/js/fiveui/js/background.js
@@ -157,7 +157,8 @@ fiveui.Background.prototype.pageLoad = function(tabId, url, data) {
this.loadScripts(tabId, computeScripts, true, data);
var uiScripts = _.flatten(
- [ this.dataLoader('jquery/bundled.css')
+ [ this.dataLoader('underscore.js')
+ , this.dataLoader('jquery/bundled.css')
, this.dataLoader('jquery/jquery-1.8.3.js')
, this.dataLoader('jquery/jquery-ui-1.9.2.custom.js')
, this.dataLoader('injected/injected.css')
diff --git a/src/js/fiveui/js/state.js b/src/js/fiveui/js/state.js
index 226a439..b3487c5 100644
--- a/src/js/fiveui/js/state.js
+++ b/src/js/fiveui/js/state.js
@@ -46,12 +46,14 @@ fiveui.WinState = function(x, y, width, height, closed) {
* @param {string} url The url that the problem occurred at.
* @param {number} severity The severity of the problem
*/
-fiveui.Problem = function(name, descr, url, severity, hash) {
+fiveui.Problem = function(name, descr, url, severity, hash, xpath, msg) {
this.name = name || '';
this.descr = descr || '';
this.url = url || '';
this.severity = severity || 0;
this.hash = hash;
+ this.xpath = xpath;
+ this.msg = msg;
};
/**
@@ -59,7 +61,7 @@ fiveui.Problem = function(name, descr, url, severity, hash) {
* @return {!fiveui.Problem} The problem that the object represents.
*/
fiveui.Problem.fromJSON = function(obj) {
- return new fiveui.Problem(obj.name, obj.descr, obj.url, obj.severity, obj.hash);
+ return new fiveui.Problem(obj.name, obj.descr, obj.url, obj.severity, obj.hash, obj.xpath, obj.msg);
};
/**