From d6e4e569c00b503174799e168122e133077ef7c5 Mon Sep 17 00:00:00 2001 From: patdenice Date: Tue, 12 Apr 2011 11:44:49 +0000 Subject: Bug corrected if no textarea displayed. git-svn-id: http://piwigo.org/svn/trunk@10312 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/LocalFilesEditor/admin.tpl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/LocalFilesEditor/admin.tpl b/plugins/LocalFilesEditor/admin.tpl index 252885656..d59df2f27 100644 --- a/plugins/LocalFilesEditor/admin.tpl +++ b/plugins/LocalFilesEditor/admin.tpl @@ -14,11 +14,12 @@ {combine_css path="plugins/LocalFilesEditor/locfiledit.css"} {footer_script} -var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} - matchBrackets: true, - mode: "{$CODEMIRROR_MODE}", - tabMode: "shift" -}); +if (document.getElementById("text") != null) + var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} + matchBrackets: true, + mode: "{$CODEMIRROR_MODE}", + tabMode: "shift" + }); {/footer_script}
-- cgit v1.2.3