diff --git a/index.html b/index.html
index c94bee5..cfe28ac 100644
--- a/index.html
+++ b/index.html
@@ -58,9 +58,10 @@
Tin Can Statement Viewer
- |
+ |
|
|
diff --git a/scripts/TinCanViewer.js b/scripts/TinCanViewer.js
index 6c57de2..ebaf267 100644
--- a/scripts/TinCanViewer.js
+++ b/scripts/TinCanViewer.js
@@ -115,12 +115,21 @@ TINCAN.Viewer.prototype.TinCanSearchHelper = function () {
var agent = null,
agentCfg = {},
agentProperty = this.getSearchVar("agentProperty"),
- agentValue = this.getSearchVar("agentValue");
-
- if (agentProperty !== null && agentValue !== null) {
- agentCfg[agentProperty] = agentValue;
-
- agent = new TinCan.Agent(agentCfg);
+ agentValue = this.getSearchVar("agentValue"),
+ agentAccountName = this.getSearchVar("agentAccountName"),
+ agentAccountHomePage = this.getSearchVar("agentAccountHomePage");
+
+ if (agentProperty !== null) {
+ if (agentProperty == 'account' && agentAccountHomePage !== null && agentAccountName !== null){
+ agentCfg.account = {
+ name: agentAccountName,
+ homePage: agentAccountHomePage
+ };
+ agent = new TinCan.Agent(agentCfg);
+ } else if (agentValue !== null) {
+ agentCfg[agentProperty] = agentValue;
+ agent = new TinCan.Agent(agentCfg);
+ }
}
return agent;
@@ -776,6 +785,22 @@ TINCAN.Viewer.prototype.pageInitialize = function () {
}
);
+ $("#agentAccountName").hide();
+ $("#agentAccountHomePage").hide();
+ $("#agentProperty").change(
+ function (e) {
+ if ($("#agentProperty").val() == 'mbox') {
+ $("#agentValue").show();
+ $("#agentAccountName").hide();
+ $("#agentAccountHomePage").hide();
+ } else if ($("#agentProperty").val() == 'account') {
+ $("#agentValue").hide();
+ $("#agentAccountName").show();
+ $("#agentAccountHomePage").show();
+ }
+ }
+ );
+
$("#showAdvancedOptions").click(
function () {
var version = $("#version").val(),