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/show_default.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/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> |