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

« back to all changes in this revision

Viewing changes to ivle/webapp/console/media/console.js

  • Committer: William Grant
  • Date: 2010-02-25 07:34:50 UTC
  • Revision ID: grantw@unimelb.edu.au-20100225073450-zcl8ev5hlyhbszeu
Activate the Storm C extensions if possible. Moar speed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
    var callback1 = function(xhr)
86
86
        {
87
87
            var json_text = xhr.responseText;
88
 
            server_key = JSON.parse(json_text).key;
89
 
            server_started = true;
90
 
            if (callback != null)
91
 
                callback();
 
88
            try
 
89
            {
 
90
                server_key = JSON.parse(json_text).key;
 
91
                server_started = true;
 
92
                if (callback != null)
 
93
                    callback();
 
94
            }
 
95
            catch (e)
 
96
            {
 
97
                alert("An error occured when starting the IVLE console. " +
 
98
                    "Please refresh the page and try again.\n" +
 
99
                    "Details have been logged for further examination.")
 
100
            }
92
101
        }
93
102
 
94
103
    ajax_call(
124
133
function console_minimize()
125
134
{
126
135
    if (!windowpane_mode) return;
127
 
    console_body.setAttribute("class", "windowpane minimal");
 
136
    console_body.setAttribute("class", "console_body windowpane minimal");
128
137
    console_filler.setAttribute("class", "windowpane minimal");
129
138
}
130
139
 
133
142
function console_maximize()
134
143
{
135
144
    if (!windowpane_mode) return;
136
 
    console_body.setAttribute("class", "windowpane maximal");
 
145
    console_body.setAttribute("class", "console_body windowpane maximal");
137
146
    console_filler.setAttribute("class", "windowpane maximal");
138
147
}
139
148
 
382
391
        // Return early, so we don't re-enable the input box.
383
392
        return;
384
393
    }
 
394
    else if (res.hasOwnProperty('input'))
 
395
    {
 
396
        set_prompt("+++");
 
397
    }
385
398
    else
386
399
    {
387
 
        // assert res.hasOwnProperty('input')
388
 
        set_prompt("...");
 
400
        alert("An internal error occurred in the python console.");
 
401
        return;
389
402
    }
390
403
 
391
404
    if (inputbox != null)