]> git.pond.sub.org Git - eow/commitdiff
replace dojo byId by own version
authorGerd Flaig <gefla@gefla-mac-zrh>
Sun, 21 Dec 2008 14:51:49 +0000 (15:51 +0100)
committerGerd Flaig <gefla@gefla-mac-zrh>
Sun, 21 Dec 2008 14:51:49 +0000 (15:51 +0100)
static/eow.js

index a0defc92b9fc76712ba573d994f697d06240f73e..95366290973af9ae6c03cb9a2f5c3bed6d7cbad0 100644 (file)
@@ -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);
 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);
 }
 
   window.scrollTo(0, window.scrollMaxY);
 }
 
@@ -69,7 +73,7 @@ function submit_cmdline(cmdline_form) {
 }
 
 function prompt(minutes, btus) {
 }
 
 function prompt(minutes, btus) {
-  dojo.byId("prompt").textContent = "[" + minutes + "," + btus + "]: ";
+  byId("prompt").textContent = "[" + minutes + "," + btus + "]: ";
   get_next_update();
 }
 
   get_next_update();
 }
 
@@ -79,13 +83,13 @@ function msg(m) {
 }
 
 function setup_client() {
 }
 
 function setup_client() {
-  var input = dojo.byId("inputfield");
+  var input = byId("inputfield");
   input.focus();
 }
 
 function inputfield_keyup(e) {
   if (e.keyCode == 13) { // Enter
   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 = "";
     submit_cmdline(e.target.form.id);
     window.scrollTo(0, window.scrollMaxY);
     e.target.value = "";