diff options
-rw-r--r-- | munia.html | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -14,7 +14,7 @@ <div id="wslm_lastmsg"></div> <div id="wslm_drawing"></div> <div id="box" style="position: absolute;">Hello World</div> -<input type="text" id="input_data" value="Do magic here" onfocus="clear()"/> +<input type="text" id="input_data" value="add title description 100 100" onfocus="clear()"/> <input type="button" value="submit" onclick="submit()"/> </div> <script> @@ -110,7 +110,6 @@ var socket_lm; var color = "#000000"; var dragged = ""; -// alert(BrowserDetect.browser); if (BrowserDetect.browser == "Firefox") { socket_lm = new MozWebSocket(get_appropriate_ws_url(), "lws-mirror-protocol"); } else { @@ -125,8 +124,7 @@ try { } socket_lm.onmessage = function got_packet(msg) { -// alert(msg.data); -// document.getElementById("wslm_lastmsg").textContent = msg.data; + document.getElementById("wslm_lastmsg").textContent = msg.data; j = msg.data.split(';'); f = 0; @@ -146,13 +144,11 @@ try { ctx.stroke(); } else if (i[0] == "del") { -// alert("Deleting task"); var task = document.getElementById("task_" + i[1]); // task.style.display = "none"; document.body.removeChild(task); } else if (i[0] == "move") { -// alert("Moving task"); var task = document.getElementById("task_" + i[1]); task.style.left = i[2] + "px"; task.style.top = i[3] + "px"; @@ -243,17 +239,14 @@ function ev_mousemove (ev) function submit() { var data = document.getElementById("input_data").value; - alert(data); socket_lm.send(data); } function clear() { - alert('asd'); document.getElementById("input_data").value = ""; } function deleteTask(id) { -// alert(id); socket_lm.send("del " + id + ";"); } |