| | |
| | | } |
| | | }; |
| | | fd.append('dateiauswahlfeld', datei); |
| | | fd.append('pfad', pfad); |
| | | xhr.send(fd); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | function fm_text_edit(content) { |
| | | function fm_text_edit(content, mode) { |
| | | fm_filectls_hide(); |
| | | $('.codeeditor-space').show(); |
| | | $('.code-editor-container').show(); |
| | | fm_code_edit(content); |
| | | fm_code_edit(content, mode); |
| | | openEditor = 'text'; |
| | | } |
| | | |
| | |
| | | var u = '../svc' + m; |
| | | fm_get(u, "text", function(resp) { |
| | | if(typ == 'text') { |
| | | fm_text_edit(resp); |
| | | var mode = "text/x-java"; |
| | | if(fname.endsWith('js')) { |
| | | mode = 'javascript'; |
| | | } else if(fname.endsWith('xml')) { |
| | | mode = 'xml'; |
| | | } else if(fname.endsWith('properties')) { |
| | | mode = 'xml'; |
| | | } |
| | | fm_text_edit(resp, mode); |
| | | } else { |
| | | fm_dok_edit(resp); |
| | | } |
| | |
| | | |
| | | /* ---- codemirror editor handling -------- */ |
| | | |
| | | function fm_code_edit(content) { |
| | | function fm_code_edit(content, m) { |
| | | cm = CodeMirror.fromTextArea(document.getElementById("editspace"), { |
| | | lineNumbers: true, |
| | | mode: "xml", |
| | | mode: m, |
| | | viewportMargin : Infinity, |
| | | extraKeys: { |
| | | "F9": function(cm) { |