diff options
author | patdenice <patdenice@piwigo.org> | 2011-04-12 11:41:57 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-04-12 11:41:57 +0000 |
commit | 5a3fc07ba42570432887f1ab66f1f12fdab4999e (patch) | |
tree | 151c72156249f93e583aef3eb7fda256d1ac3dab /plugins/LocalFilesEditor/admin.tpl | |
parent | cf4e2c81f948a1a9e54258d3ced978d1ad2ef234 (diff) |
merge r10309 from trunk to branch 2.2
Always load codemirror
git-svn-id: http://piwigo.org/svn/branches/2.2@10311 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/LocalFilesEditor/admin.tpl')
-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> |