diff --git a/src/main/java/com/metaweb/gridworks/model/Recon.java b/src/main/java/com/metaweb/gridworks/model/Recon.java index 595fff77f..6e9dd7a8a 100644 --- a/src/main/java/com/metaweb/gridworks/model/Recon.java +++ b/src/main/java/com/metaweb/gridworks/model/Recon.java @@ -143,6 +143,8 @@ public class Recon implements HasFields, Jsonizable { public Object getField(String name, Properties bindings) { if ("best".equals(name)) { return candidates != null && candidates.size() > 0 ? candidates.get(0) : null; + } else if ("candidates".equals(name)) { + return candidates; } else if ("judgment".equals(name) || "judgement".equals(name)) { return judgmentToString(); } else if ("judgmentAction".equals(name) || "judgementAction".equals(name)) { diff --git a/src/main/webapp/scripts/project.js b/src/main/webapp/scripts/project.js index 4f5b34411..90ab31257 100644 --- a/src/main/webapp/scripts/project.js +++ b/src/main/webapp/scripts/project.js @@ -66,7 +66,7 @@ function resizeAll() { } function initializeUI(uiState) { - document.title = theProject.metadata.name + " - Gridworks"; + Gridworks.setTitle(); var path = $("#path"); @@ -119,6 +119,14 @@ function initializeUI(uiState) { $(window).bind("resize", resizeAll); } +Gridworks.setTitle = function(status) { + var title = theProject.metadata.name + " - Gridworks"; + if (status) { + title = status + " - " + title; + } + document.title = title; +}; + Gridworks.reinitializeProjectData = function(f) { Ajax.chainGetJSON( "/command/get-project-metadata?" + $.param({ project: theProject.id }), null, diff --git a/src/main/webapp/scripts/widgets/process-widget.js b/src/main/webapp/scripts/widgets/process-widget.js index 05e347ec1..f2e31261c 100644 --- a/src/main/webapp/scripts/widgets/process-widget.js +++ b/src/main/webapp/scripts/widgets/process-widget.js @@ -101,6 +101,7 @@ ProcessWidget.prototype._render = function(newData) { this._div.empty(); if (!newData.processes.length) { + Gridworks.setTitle(); this._div.hide(); } else { this._div.show(); @@ -129,6 +130,7 @@ ProcessWidget.prototype._render = function(newData) { if (process.status == "pending") { div.text(process.description + " (pending)"); } else { + Gridworks.setTitle(process.progress + "%"); div.text(process.description + " (" + process.progress + "%)"); } };