From 95604ad8c13595e1625992d523c75c8a3c510635 Mon Sep 17 00:00:00 2001 From: patdenice Date: Tue, 12 Apr 2011 11:37:26 +0000 Subject: Always load codemirror git-svn-id: http://piwigo.org/svn/trunk@10309 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/LocalFilesEditor/admin.tpl | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'plugins/LocalFilesEditor/admin.tpl') 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}
@@ -91,10 +77,6 @@ if (document.getElementById("text") != null) loadCodemirror();
{* top bar buttons *} -
-[{'locfiledit_enable_codemirror'|@translate}] -[{'locfiledit_disable_codemirror'|@translate}] -

-- cgit v1.2.3