X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=examples%2Fhtdocs%2Ftester.html;h=3811653821cd661beece36d865700267d5bb0e8e;hb=41ff0f89f323744bdea421641a7f4f658df74693;hp=f178a17e88fb7a886beeb3426afb4b9927660254;hpb=c96737e2945e273a7d241edc1987c6a2b010850e;p=mkws-moved-to-github.git diff --git a/examples/htdocs/tester.html b/examples/htdocs/tester.html index f178a17..3811653 100644 --- a/examples/htdocs/tester.html +++ b/examples/htdocs/tester.html @@ -191,6 +191,7 @@ header button:hover, header button:active, header button:focus { Settings: + @@ -219,6 +220,9 @@ header button:hover, header button:active, header button:focus {
+
+ +
@@ -244,8 +248,15 @@ if (localStorage.getItem('mkwstest-queries')) { if (localStorage.getItem('mkwstest-widget-markup')) { this.widgetMarkup = localStorage.getItem('mkwstest-widget-markup'); } +if (localStorage.getItem('mkwstest-mkws-config')) { + mkws_config = JSON.parse(localStorage.getItem('mkwstest-mkws-config')); +} $("#queries > textarea").html(this.queries.join("\n")); $("#widget-markup > textarea").html(this.widgetMarkup); +$("#mkws-config > textarea").html(JSON.stringify(mkws_config)); +mkws.setMkwsConfig(mkws_config); +mkws.authenticated = false; +mkws.authenticating = false; this.results = {}; var next = 0; @@ -309,6 +320,22 @@ $("#widget-markup").dialog("option", "buttons", [ {text: "Cancel", click: function() { $(this).dialog("close"); }} ]); +// MKWS config dialog +var updateConfig = function () { + mkws.setMkwsConfig(JSON.parse($("#mkws-config > textarea").val())); + mkws.authenticated = false; + mkws.authenticating = false; + localStorage.setItem("mkwstest-mkws-config", $("#mkws-config > textarea").val()); + startEval(); +} +$("#mkws-config-button").click(function () { + $("#mkws-config").dialog("open"); +}); +$("#mkws-config").dialog("option", "buttons", [ + {text: "Start new evaluation", click: updateConfig}, + {text: "Cancel", click: function() { $(this).dialog("close"); }} +]); + // Queries dialog var updateQueries = function () { context.queries = $("#queries > textarea").val().split("\n");