diff --git a/web/js/backend.js b/web/js/backend.js index 73bfa203..aad63447 100644 --- a/web/js/backend.js +++ b/web/js/backend.js @@ -43,12 +43,32 @@ * @requires jquery */ -define([ "jquery" ], - function($) { +define([ "jquery", "config", "form", + "laconic" + ], + function($, config, form) { var backend = { ajax: function(options) { return $.ajax(options); + }, + + selectBackend: function() { + function backendBody() { + this.append($.el.table( + { class: "table table-striped table-condensed", + 'data-click-to-select': true, + 'data-single-select': true + }, + $.el.tr($.el.th("Backend"), + $.el.th("URL")), + $.el.tbody())); + } + + form.showDialog( + { title: "SWISH backends", + body: backendBody + }); } } diff --git a/web/js/config.js b/web/js/config.js index 0c821596..469c686b 100644 --- a/web/js/config.js +++ b/web/js/config.js @@ -52,8 +52,8 @@ * @requires jquery */ -define([ "jquery", "backend" ], - function($, backend) { +define([ "jquery" ], + function($) { var KEY = "SWISHCONFIG"; /* Configuration of various server components. We provide @@ -86,7 +86,7 @@ function setCachedConfig(config) { if ( !config ) { if ( !(config = getCachedConfig()) ) { - backend.ajax( + $.ajax( { url: "swish_config.json", dataType: "json", async: false,