From b4165f9269cb71ccb20e9b525c06951e0033ea2b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 30 Dec 2015 15:46:26 +0100 Subject: improved socket.html diff --git a/test/socket.html b/test/socket.html index d038527..ae13e19 100644 --- a/test/socket.html +++ b/test/socket.html @@ -13,6 +13,7 @@ border: 1px solid; padding: 1em; font-family: monospace; + margin-top: 1em; } @@ -22,6 +23,10 @@ $('#rawmsg').text(""); this.sock = new WebSocket("ws://localhost:4080/public/socket"); this.sock.onmessage = function (event) { + msg = $.parseJSON(event.data) + if (msg.TYPE == "ACK") { + $('#sessionid').val(msg.ID); + } $('#rawmsg').append(event.data); } this.sock_onopen = function() { @@ -44,19 +49,29 @@ CLEAR_SHOW_CARTS: true, SOURCE_URI: "fake://10000" }; s = new Session(req); + $('#buttonrun').attr('disabled','disabled') + $('#buttoncancel').removeAttr('disabled') } function cancel() { s.cancel(); + $('#buttonrun').removeAttr('disabled') + $('#buttoncancel').attr('disabled','disabled') + } + + function init() { + $('#buttonrun').removeAttr('disabled') + $('#buttoncancel').attr('disabled','disabled') } - +

Radio Helsinki Rivendell Importer:

- - + + +
-- cgit v0.10.2