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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/media/exercise_admin.js

  • Committer: William Grant
  • Date: 2009-12-15 05:14:56 UTC
  • mfrom: (1428.1.3 trunk)
  • Revision ID: me@williamgrant.id.au-20091215051456-jptc3rnbwgub4z68
Polish up the test suite editing UI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
 
130
130
function add_suite()
131
131
{
132
 
    var desc = $('#new_test_suite_description').val();
133
 
    var func = $('#new_test_suite_function').val();
134
 
    var stdin = $('#new_test_suite_stdin').val();
 
132
    var desc = $('#test_suite_new_description').val();
 
133
    var func = $('#test_suite_new_function').val();
 
134
    var stdin = $('#test_suite_new_stdin').val();
135
135
    
136
136
    var callback = function(xhr)
137
137
    {
481
481
    enable_test_part_function(partid, enable);
482
482
    set_test_part_function(partid, test_type);
483
483
};
 
484
 
 
485
/* When a test suite attribute checkbox is toggled, enable or disable
 
486
 * and clear the textbox.
 
487
 */
 
488
function test_suite_checkbox_toggled(which, suiteid)
 
489
{
 
490
    var name = "test_suite_" + suiteid + "_" + which;
 
491
    var textbox_elem = $("#" + name);
 
492
 
 
493
    if ($("#" + name + "_enabled").is(":checked"))
 
494
        textbox_elem.removeAttr("disabled")
 
495
    else
 
496
    {
 
497
        textbox_elem.attr("disabled", "disabled");
 
498
        textbox_elem.val("");
 
499
    }
 
500
};