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/show_default.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/show_default.tpl')
-rw-r--r-- | plugins/LocalFilesEditor/show_default.tpl | 33 |
1 files changed, 6 insertions, 27 deletions
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} <div id="LocalFilesEditor"> @@ -48,9 +32,4 @@ if (document.getElementById("text") != null) loadCodemirror(); <textarea id="text" rows="30" cols="90">{$DEFAULT_CONTENT}</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> - </div> |