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

« back to all changes in this revision

Viewing changes to www/media/browser/editor.js

  • Committer: mattgiuca
  • Date: 2008-07-21 05:25:48 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:920
userdb: Added to table "offering" fields max_students_per_group and
    max_groups_per_student.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
function initialise_codepress()
84
84
{
85
85
    editbox.addChangeHandler(edit_text);
86
 
    editbox.addSaveHandler(function() {document.getElementById("save_button").click()});
87
86
     
88
87
    /* We can only safely disable the save button on the first load.
89
88
     * Syntax highlighting changes will also get this function called.
120
119
    language = language ? language : "text";
121
120
    document.getElementById("highlighting_select").value = language;
122
121
 
123
 
    txt_elem.className = "codepress autocomplete-off " + language;
 
122
    txt_elem.className = "codepress " + language;
124
123
    txt_elem.setAttribute("onchange", "edit_text()");
125
124
    /* TODO: Make CSS height: 100% work */
126
125
    txt_elem.setAttribute("rows", "35");
138
137
function language_from_mime(mime)
139
138
{
140
139
    return {'text/x-python': 'python',
141
 
            'application/x-javascript': 'javascript',
142
140
            'application/javascript': 'javascript',
143
141
            'text/css': 'css',
144
142
            'text/plain': 'text',
145
143
            'text/html': 'html',
146
 
            'application/xml': 'html',
147
144
            'application/xhtml+xml': 'html'}[mime];
148
145
}