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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-01-13 01:36:15 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1123
Merge setup-refactor branch. This completely breaks existing installations;
every path (both filesystem and Python) has changed. Do not upgrade without
knowing what you are doing.

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()});
86
87
     
87
88
    /* We can only safely disable the save button on the first load.
88
89
     * Syntax highlighting changes will also get this function called.
119
120
    language = language ? language : "text";
120
121
    document.getElementById("highlighting_select").value = language;
121
122
 
122
 
    txt_elem.className = "codepress " + language;
 
123
    txt_elem.className = "codepress autocomplete-off " + language;
123
124
    txt_elem.setAttribute("onchange", "edit_text()");
124
125
    /* TODO: Make CSS height: 100% work */
125
126
    txt_elem.setAttribute("rows", "35");
141
142
            'text/css': 'css',
142
143
            'text/plain': 'text',
143
144
            'text/html': 'html',
 
145
            'application/xml': 'html',
144
146
            'application/xhtml+xml': 'html'}[mime];
145
147
}