~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/console/console.js

  • Committer: matt.giuca
  • Date: 2009-01-14 06:28:03 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:branches%2Fstorm:1126
Created a branch 'storm', for replacing the Database layer with the Storm ORM.
(Experimental)

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    var callback1 = function(xhr)
59
59
        {
60
60
            var json_text = xhr.responseText;
61
 
            server_key = JSON.parse(json_text);
 
61
            server_key = JSON.parse(json_text).key;
62
62
            server_started = true;
63
63
            if (callback != null)
64
64
                callback();
261
261
    else
262
262
    {
263
263
        GLOBAL_inputbox = inputbox;     /* For timer */
264
 
        var inputline = inputbox.value;
 
264
        var inputline = inputbox.value + "\n";
265
265
        var graytimer = setTimeout("GLOBAL_inputbox.setAttribute(\"class\", "
266
266
            + "\"disabled\");", 100);
267
267
    }
270
270
        // Print ">>>" span
271
271
        var span = document.createElement("span");
272
272
        span.setAttribute("class", "inputPrompt");
273
 
        span.appendChild(document.createTextNode(">>> "));
 
273
        span.appendChild(document.createTextNode(
 
274
              document.getElementById("console_prompt").firstChild.textContent)
 
275
                        );
274
276
        output.appendChild(span);
275
277
        // Print input line itself in a span
276
278
        var span = document.createElement("span");
277
279
        span.setAttribute("class", "inputMsg");
278
 
        span.appendChild(document.createTextNode(inputline + "\n"));
 
280
        span.appendChild(document.createTextNode(inputline));
279
281
        output.appendChild(span);
280
282
    }
281
283
    var args = {"key": server_key, "text":inputline};