diff options
author | patdenice <patdenice@piwigo.org> | 2011-04-12 11:37:26 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-04-12 11:37:26 +0000 |
commit | 95604ad8c13595e1625992d523c75c8a3c510635 (patch) | |
tree | d1fa0f981e612a7ef11da0b06b9d51563c60c0e8 /plugins/LocalFilesEditor/admin.tpl | |
parent | a740ef91e6689f86011b70c7bbe2589abf78ae6b (diff) |
Always load codemirror
git-svn-id: http://piwigo.org/svn/trunk@10309 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | plugins/LocalFilesEditor/admin.tpl | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/plugins/LocalFilesEditor/admin.tpl b/plugins/LocalFilesEditor/admin.tpl index bffd2ef44..252885656 100644 --- a/plugins/LocalFilesEditor/admin.tpl +++ b/plugins/LocalFilesEditor/admin.tpl @@ -14,25 +14,11 @@ {combine_css path="plugins/LocalFilesEditor/locfiledit.css"} {footer_script} -function loadCodemirror() {ldelim} - editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} - matchBrackets: true, - mode: "{$CODEMIRROR_MODE}", - tabMode: "shift" - }); - jQuery("#showedit, #hideedit").toggle(); - jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "on"}); -} - -function unloadCodemirror() {ldelim} - editor.toTextArea(); - jQuery("#showedit, #hideedit").toggle(); - jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "off"}); -} - -{if $LOAD_CODEMIRROR == 'on'} -if (document.getElementById("text") != null) loadCodemirror(); -{/if} +var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} + matchBrackets: true, + mode: "{$CODEMIRROR_MODE}", + tabMode: "shift" +}); {/footer_script} <div class="titrePage"> @@ -91,10 +77,6 @@ if (document.getElementById("text") != null) loadCodemirror(); </div> {* top bar buttons *} <textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea> -<div id="editarea_buttons"> -<a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a> -<a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a> -</div> <br> |