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

« back to all changes in this revision

Viewing changes to www/apps/tutorial/__init__.py

  • Committer: mattgiuca
  • Date: 2008-03-28 07:32:15 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:718
Tutorial: Minor fixes wrt addition of reset button.
    * Swapped Reset and Save button so Save is on the far left.
        (I find it is a different, more passive action than the other 3, so it
        belongs on its own. Also it's grey most of the time so it looks better
        separated).
    * Reset button now activates the Save button (as it has modified the text
        box), in the same way that directly editing the text does.
    * Added a bit of padding under the text box, because there was none before
        and it looked bad.

Show diffs side-by-side

added added

removed removed

Lines of Context:
456
456
        % (exerciseid, exerciseid, filename, exerciseid, filename,
457
457
            rows, cgi.escape(exercisepartial)))
458
458
    req.write("""\n<div class="exercisebuttons">\n""")
459
 
    req.write("""  <input type="button" value="Reset"
460
 
    id="resetbutton_exercise%d"
461
 
    onclick="resetexercise(&quot;exercise%d&quot;)"
462
 
    title="Reload the original partial solution for this exercise" />\n"""
463
 
        % (exerciseid, exerciseid))
464
459
    req.write("""  <input type="button" value="Saved" disabled="disabled"
465
460
    id="savebutton_exercise%d"
466
461
    onclick="saveexercise(&quot;exercise%d&quot;, %s)"
467
462
    title="Save your solution to this exercise" />\n"""
468
463
        % (exerciseid, exerciseid, filename))
 
464
    req.write("""  <input type="button" value="Reset"
 
465
    id="resetbutton_exercise%d"
 
466
    onclick="resetexercise(&quot;exercise%d&quot;, %s)"
 
467
    title="Reload the original partial solution for this exercise" />\n"""
 
468
        % (exerciseid, exerciseid, filename))
469
469
    req.write("""  <input type="button" value="Run"
470
470
    onclick="runexercise(&quot;exercise%d&quot;, %s)"
471
471
    title="Run this program in the console" />\n"""