From 5a3fc07ba42570432887f1ab66f1f12fdab4999e Mon Sep 17 00:00:00 2001 From: patdenice Date: Tue, 12 Apr 2011 11:41:57 +0000 Subject: 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 --- plugins/LocalFilesEditor/show_default.tpl | 33 ++++++------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) (limited to 'plugins/LocalFilesEditor/show_default.tpl') diff --git a/plugins/LocalFilesEditor/show_default.tpl b/plugins/LocalFilesEditor/show_default.tpl index bf35586d4..ef6970d41 100644 --- a/plugins/LocalFilesEditor/show_default.tpl +++ b/plugins/LocalFilesEditor/show_default.tpl @@ -19,28 +19,12 @@ {combine_css path="plugins/LocalFilesEditor/locfiledit.css"} {footer_script} -function loadCodemirror() {ldelim} - editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} - matchBrackets: true, - readOnly: true, - mode: "{$CODEMIRROR_MODE}", - tabMode: "shift" - }); - jQuery("#showedit").hide(); - jQuery("#hideedit").show(); - jQuery.post("update_config.php", {ldelim} editarea: "on"}); -} - -function unloadCodemirror() {ldelim} - editor.toTextArea(); - jQuery("#hideedit").hide(); - jQuery("#showedit").show(); - jQuery.post("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, + readOnly: true, + mode: "{$CODEMIRROR_MODE}", + tabMode: "shift" +}); {/footer_script}
@@ -48,9 +32,4 @@ if (document.getElementById("text") != null) loadCodemirror(); - -
-- cgit v1.2.3