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

« back to all changes in this revision

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

  • Committer: mattgiuca
  • Date: 2008-01-30 06:32:15 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:333
console.js: enter_line now accepts the line as an argument instead of reading
it from the text box. catch_input reads it from the text box and passes it as
an argument. This allows other services to call enter_line with their own
python code.
tutorial.js: The "Run" button no longer submits Ajax to the tutorial system.
Instead, it calls console's enter_line, with the code, hoping that the console
will execute this code.
(At the moment this doesn't work for multiple lines).

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    var problembox = problemdiv.getElementsByTagName("textarea")[0];
37
37
    var code = problembox.value;
38
38
 
 
39
    /* Dump the entire file to the console */
 
40
    /* FIXME: Multiple lines aren't received properly by the server */
 
41
    console_enter_line(code);
 
42
    return;
 
43
 
 
44
    /* TEMP: Old code here */
39
45
    var args = {"code": code, "problem": filename, "action": "run"};
40
46
 
41
47
    /* Send the form as multipart/form-data, since we are sending a whole lump