Changeset 10309 for trunk/plugins/LocalFilesEditor/show_default.tpl
- Timestamp:
- Apr 12, 2011, 1:37:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/LocalFilesEditor/show_default.tpl
r10307 r10309 20 20 21 21 {footer_script} 22 function loadCodemirror() {ldelim} 23 editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 24 matchBrackets: true, 25 readOnly: true, 26 mode: "{$CODEMIRROR_MODE}", 27 tabMode: "shift" 28 }); 29 jQuery("#showedit").hide(); 30 jQuery("#hideedit").show(); 31 jQuery.post("update_config.php", {ldelim} editarea: "on"}); 32 } 33 34 function unloadCodemirror() {ldelim} 35 editor.toTextArea(); 36 jQuery("#hideedit").hide(); 37 jQuery("#showedit").show(); 38 jQuery.post("update_config.php", {ldelim} editarea: "off"}); 39 } 40 41 {if $LOAD_CODEMIRROR == 'on'} 42 if (document.getElementById("text") != null) loadCodemirror(); 43 {/if} 22 var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 23 matchBrackets: true, 24 readOnly: true, 25 mode: "{$CODEMIRROR_MODE}", 26 tabMode: "shift" 27 }); 44 28 {/footer_script} 45 29 … … 49 33 <textarea id="text" rows="30" cols="90">{$DEFAULT_CONTENT}</textarea> 50 34 51 <div id="editarea_buttons">52 <a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a>53 <a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a>54 35 </div> 55 56 </div>
Note: See TracChangeset
for help on using the changeset viewer.