From: Gerd Flaig Date: Sun, 21 Dec 2008 14:51:49 +0000 (+0100) Subject: replace dojo byId by own version X-Git-Url: http://git.pond.sub.org/?p=eow;a=commitdiff_plain;h=267c9093442c53131316fc813fe7d7cafc751af8 replace dojo byId by own version --- diff --git a/static/eow.js b/static/eow.js index a0defc9..9536629 100644 --- a/static/eow.js +++ b/static/eow.js @@ -1,8 +1,12 @@ +function byId(id) { + return document.getElementById(id); +} + function eowOut(output) { var t = document.createTextNode(output); var p = document.createElement("pre"); p.appendChild(t); - dojo.byId("output").appendChild(p); + byId("output").appendChild(p); window.scrollTo(0, window.scrollMaxY); } @@ -69,7 +73,7 @@ function submit_cmdline(cmdline_form) { } function prompt(minutes, btus) { - dojo.byId("prompt").textContent = "[" + minutes + "," + btus + "]: "; + byId("prompt").textContent = "[" + minutes + "," + btus + "]: "; get_next_update(); } @@ -79,13 +83,13 @@ function msg(m) { } function setup_client() { - var input = dojo.byId("inputfield"); + var input = byId("inputfield"); input.focus(); } function inputfield_keyup(e) { if (e.keyCode == 13) { // Enter - eowOut(dojo.byId("prompt").textContent + e.target.value); + eowOut(byId("prompt").textContent + e.target.value); submit_cmdline(e.target.form.id); window.scrollTo(0, window.scrollMaxY); e.target.value = "";