aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/LocalFilesEditor/admin.php1
-rw-r--r--plugins/LocalFilesEditor/admin.tpl28
-rw-r--r--plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/de_DE/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/en_UK/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/es_ES/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/he_IL/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/it_IT/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/no_NO/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php3
-rw-r--r--plugins/LocalFilesEditor/locfiledit.css12
-rw-r--r--plugins/LocalFilesEditor/maintain.inc.php11
-rw-r--r--plugins/LocalFilesEditor/show_default.php1
-rw-r--r--plugins/LocalFilesEditor/show_default.tpl33
-rw-r--r--plugins/LocalFilesEditor/update_config.php46
31 files changed, 12 insertions, 192 deletions
diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php
index a9205cfac..cd2c5b301 100644
--- a/plugins/LocalFilesEditor/admin.php
+++ b/plugins/LocalFilesEditor/admin.php
@@ -360,7 +360,6 @@ if (!empty($edited_file))
$template->assign(array(
'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin-LocalFilesEditor-'.$page['tab'],
'LOCALEDIT_PATH' => LOCALEDIT_PATH,
- 'LOAD_CODEMIRROR' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'off',
'CODEMIRROR_MODE' => @$codemirror_mode
)
);
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}
<div class="titrePage">
@@ -91,10 +77,6 @@ if (document.getElementById("text") != null) loadCodemirror();
</div> {* top bar buttons *}
<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</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>
<br>
diff --git a/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php b/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php
index 317432abc..0824659ed 100644
--- a/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php
@@ -50,7 +50,4 @@ $lang['locfiledit_file_already_exists'] = 'الملف الموجود';
$lang['locfiledit_model_error'] = 'يجب أختيار نموذج';
$lang['locfiledit_empty_filename'] = 'يجب كتابة أسم الملف';
$lang['locfiledit_webmaster_only'] = 'فقط مدير الموقع يمكن استخدام محرر الملفات المحلي';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php b/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php
index 907dad823..5d562649e 100644
--- a/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Soubor už existuje.';
$lang['locfiledit_model_error'] = 'Musíte zvolit model.';
$lang['locfiledit_empty_filename'] = 'Musíte vyplnit název souboru.';
$lang['locfiledit_webmaster_only'] = 'Pouze webmaster může vytvářet nebo měnit lokální soubory.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php b/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php
index 2d9becbaf..aa9d35e10 100644
--- a/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Datei ist bereits vorhanden.';
$lang['locfiledit_model_error'] = 'Sie müssen ein Modell wählen.';
$lang['locfiledit_empty_filename'] = 'Sie müssen einen Dateiname eingeben.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php b/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
index 668018962..b6cabb6bd 100644
--- a/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'File already exists.';
$lang['locfiledit_model_error'] = 'You must choose a model.';
$lang['locfiledit_empty_filename'] = 'You must fill file name.';
$lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
-
-$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php b/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
index e69262708..604cdc014 100644
--- a/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'El archivo ya existe.';
$lang['locfiledit_model_error'] = 'Por favor, seleccione un modelo.';
$lang['locfiledit_empty_filename'] = 'Por favor, indique un nombre de archivo.';
$lang['locfiledit_webmaster_only'] = 'Sólo los administradores pueden crear o modificar fichero locales.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php b/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
index 24cd9adea..1897ab748 100644
--- a/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Le fichier existe déjà.';
$lang['locfiledit_model_error'] = 'Veuillez sélectionner un modèle.';
$lang['locfiledit_empty_filename'] = 'Veuillez indiquer un nom de fichier.';
$lang['locfiledit_webmaster_only'] = 'Seuls les webmasters sont autorisés à créer ou modifier les fichiers locaux.';
-
-$lang['locfiledit_enable_codemirror'] = 'Activer Codemirror';
-$lang['locfiledit_disable_codemirror'] = 'Désactiver Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php b/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php
index e86ebf657..f6085a254 100644
--- a/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_model_error'] = 'אתה חייב לחבחור דגם.';
$lang['locfiledit_empty_filename'] = 'אתה חייב למלא את שם הקובץ.';
$lang['locfiledit_webmaster_only'] = 'רק מנהל האתר יכול ליצור או לשנות קבצים מקומיים.';
$lang['locfiledit_filename_error'] = 'אסור להשתמש בתווים מסויימים בשם הקובץ.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php b/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php
index ba3ccbdb0..c6e6aef00 100644
--- a/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php
@@ -49,7 +49,4 @@ $lang['locfiledit_file_already_exists'] = 'Datoteka vec postoji.';
$lang['locfiledit_model_error'] = 'Morate odabrati model.';
$lang['locfiledit_empty_filename'] = 'Morate popuniti naziv datoteke.';
$lang['locfiledit_webmaster_only'] = 'Samo webmasteri mogu kreirati ili mijenjati lokalne datoteke.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php b/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php
index 8c095501b..b3623af32 100644
--- a/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Ilyen fájl már létezik.';
$lang['locfiledit_model_error'] = 'A típust ki kell választani.';
$lang['locfiledit_empty_filename'] = 'A fájlnevet ki kell tölteni.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Csak a webmesterek hozhatnak létre, vagy módosíthatnak helyi fájlokat.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?>
diff --git a/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php b/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php
index fa9eeaa51..641a80f7e 100644
--- a/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Il file esiste già.';
$lang['locfiledit_model_error'] = 'Selezionare un modello.';
$lang['locfiledit_empty_filename'] = 'Indicate un nome di file.';
$lang['locfiledit_webmaster_only'] = 'Solo i webmasters sono autorizzati a creare o modificare i file locali.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php b/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php
index 004c0f5ae..d963ff61e 100644
--- a/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'ファイルは既に存在してい
$lang['locfiledit_model_error'] = 'モデルを選択する必要があります。';
$lang['locfiledit_empty_filename'] = 'ファイル名を記入する必要があります。';
$lang['locfiledit_webmaster_only'] = 'ローカルファイルはウェブマスターのみ作成するか、変更できます。';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php b/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php
index 4e4085f72..da0a8d82c 100644
--- a/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'ფაილი უკვე არ
$lang['locfiledit_model_error'] = 'თქვენ უნდა აირჩიოთ მოდელი.';
$lang['locfiledit_empty_filename'] = 'თქვენ უნდა შეავსოთ ფაილის სახელი.';
$lang['locfiledit_webmaster_only'] = 'მხოლოდ ვებოსტატებს შეუძლიათ შექმნან ან გადააკეთონ ლოკალური ფაილები.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php b/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php
index 561be9865..12b3ac246 100644
--- a/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Fails jau eksiste.';
$lang['locfiledit_model_error'] = 'Jums jaizvelas modelis.';
$lang['locfiledit_empty_filename'] = 'Jums jaieraksta faila nosaukums.';
$lang['locfiledit_webmaster_only'] = 'Tikai webmasters var izveidot un modificet lokalos failus.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php b/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php
index e0c226202..3eefba6c0 100644
--- a/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Bestand bestaat reeds.';
$lang['locfiledit_model_error'] = 'U moet een model kiezen.';
$lang['locfiledit_empty_filename'] = 'U moet een bestandsnaam opgeven.';
$lang['locfiledit_webmaster_only'] = 'Alleen webbeheerders kunnen lokale bestanden aanmaken of wijzigen.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php b/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php
index 0705b40ea..efa55959a 100644
--- a/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php
@@ -48,7 +48,4 @@ $lang['locfiledit_file_already_exists'] = 'Filen eksisterer allerede.';
$lang['locfiledit_model_error'] = 'Du må velge en modell.';
$lang['locfiledit_empty_filename'] = 'Du må fylle inn fil navnet.';
$lang['locfiledit_webmaster_only'] = 'Kun webmaster kan lage eller endre lokale filer.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php b/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php
index 0e861349a..d89734995 100644
--- a/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Plik już istnieje.';
$lang['locfiledit_model_error'] = 'Musisz wybrać model.';
$lang['locfiledit_empty_filename'] = 'Musisz wpisać nazwę pliku.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php b/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php
index c1a2e86b5..f096ccf1d 100644
--- a/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'O ficheiro já existe.';
$lang['locfiledit_model_error'] = 'Tem que escolher um Modelo.';
$lang['locfiledit_empty_filename'] = 'Tem que preencher o Nome do ficheiro.';
$lang['locfiledit_webmaster_only'] = 'Apenas webmasters podem criar ou modificar ficheiros locais.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php b/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php
index b18db5b2d..2dd5198ab 100644
--- a/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php
@@ -50,7 +50,4 @@ $lang['locfiledit_file_already_exists'] = 'Файл уже существует.
$lang['locfiledit_model_error'] = 'Выберите модель.';
$lang['locfiledit_empty_filename'] = 'Заполните поле "Имя файла".';
$lang['locfiledit_webmaster_only'] = 'Только вэбмастеры могут создавать или редактировать локальные файлы.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php b/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php
index 5a65b3289..34aeddfc3 100644
--- a/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Súbor už existuje.';
$lang['locfiledit_model_error'] = 'Musíte vybrať model.';
$lang['locfiledit_empty_filename'] = 'Musíte zadať meno súboru.';
$lang['locfiledit_webmaster_only'] = 'Len webmasteri môžu vytvoriť alebo modifikovať lokálne súbory.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php b/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php
index 7639b0ded..d544f4425 100644
--- a/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php
@@ -50,7 +50,4 @@ $lang['locfiledit_file_already_exists'] = 'Датотека већ постој
$lang['locfiledit_model_error'] = 'Морате изабрати модел.';
$lang['locfiledit_empty_filename'] = 'Морате уписати име датотеке.';
$lang['locfiledit_webmaster_only'] = 'Само уредник интернет страница може да направи или уреди локалне датотеке.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php b/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php
index f02934639..72c01a003 100644
--- a/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php
@@ -50,7 +50,4 @@ $lang['locfiledit_file_already_exists'] = 'Filen existerar redan.';
$lang['locfiledit_model_error'] = 'Du måste välja en modell.';
$lang['locfiledit_empty_filename'] = 'Du måste välja ett filnamn.';
$lang['locfiledit_webmaster_only'] = 'Endast webmasters kan skapa eller ändra lokala filer.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php b/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php
index 5b5345d4c..4b80efaa3 100644
--- a/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php
@@ -51,7 +51,4 @@ $lang['locfiledit_file_already_exists'] = 'Bu dosya zaten var.';
$lang['locfiledit_model_error'] = 'Model seçmek zorundasin.';
$lang['locfiledit_empty_filename'] = 'Adi doldurmak zorundasin.';
$lang['locfiledit_webmaster_only'] = 'Sadece yöneticiler dosyalari degistirebilir .';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php b/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php
index 391e42ec6..3131584a4 100644
--- a/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php
@@ -50,7 +50,4 @@ $lang['locfiledit_file_already_exists'] = 'Tệp tin đã có.';
$lang['locfiledit_model_error'] = 'Bạn phải chọn một mô hình.';
$lang['locfiledit_empty_filename'] = 'Bạn phải điền đủ tên tệp tin.';
$lang['locfiledit_webmaster_only'] = 'Chỉ có webmasters mới có thể tạo hoặc biên tập tệp tin trên máy.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php b/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php
index da4c54357..412a0afff 100644
--- a/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php
+++ b/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php
@@ -50,7 +50,4 @@ $lang['locfiledit_file_already_exists'] = '文件已存在.';
$lang['locfiledit_model_error'] = '您必须选择一个模块.';
$lang['locfiledit_empty_filename'] = '您必须填写文件名.';
$lang['locfiledit_webmaster_only'] = '只有网站管理员才能创建或者修改本地文件.';
-
-/*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror';
-/*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror';
?> \ No newline at end of file
diff --git a/plugins/LocalFilesEditor/locfiledit.css b/plugins/LocalFilesEditor/locfiledit.css
index f0981f524..bb59ec40c 100644
--- a/plugins/LocalFilesEditor/locfiledit.css
+++ b/plugins/LocalFilesEditor/locfiledit.css
@@ -19,22 +19,12 @@
float: left;
}
-#LocalFilesEditor #editarea_buttons {
- width: 100%;
- float: left;
- text-align: left;
-}
-
-#LocalFilesEditor #hideedit {
- display: none;
-}
-
#LocalFilesEditor TD {
padding: 0.5em;
}
.CodeMirror {
- background-color: #DDDDDD;
+ background-color: #EEEEEE;
font-size: 1.3em;
border: 1px solid #999999;
margin: 0.5em 0;
diff --git a/plugins/LocalFilesEditor/maintain.inc.php b/plugins/LocalFilesEditor/maintain.inc.php
index 81c5930dc..095ac7158 100644
--- a/plugins/LocalFilesEditor/maintain.inc.php
+++ b/plugins/LocalFilesEditor/maintain.inc.php
@@ -21,17 +21,6 @@
// | USA. |
// +-----------------------------------------------------------------------+
-function plugin_install()
-{
- global $prefixeTable;
-
- $query = '
-INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-VALUES (\'LocalFilesEditor\' , \'off\' , \'LocalFiles Editor plugin parameters\');';
-
- pwg_query($query);
-}
-
function plugin_uninstall()
{
global $prefixeTable;
diff --git a/plugins/LocalFilesEditor/show_default.php b/plugins/LocalFilesEditor/show_default.php
index 9dc325643..14e2ad70d 100644
--- a/plugins/LocalFilesEditor/show_default.php
+++ b/plugins/LocalFilesEditor/show_default.php
@@ -45,7 +45,6 @@ if (isset($_GET['file']))
'TITLE' => $title,
'DEFAULT_CONTENT' => $file,
'LOCALEDIT_PATH' => LOCALEDIT_PATH,
- 'LOAD_CODEMIRROR' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'on',
'CODEMIRROR_MODE' => 'application/x-httpd-php'
)
);
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>
diff --git a/plugins/LocalFilesEditor/update_config.php b/plugins/LocalFilesEditor/update_config.php
deleted file mode 100644
index f778d4fb1..000000000
--- a/plugins/LocalFilesEditor/update_config.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH', '../../');
-include_once(PHPWG_ROOT_PATH . 'include/common.inc.php');
-include_once(LOCALEDIT_PATH.'functions.inc.php');
-check_status(ACCESS_ADMINISTRATOR);
-
-$possible_values = array('on', 'off');
-
-if (isset($_POST['editarea']) and in_array($_POST['editarea'], $possible_values))
-{
- if (!isset($conf['LocalFilesEditor']))
- {
- include_once(LOCALEDIT_PATH.'maintain.inc.php');
- plugin_install();
- }
- $query = '
-UPDATE ' . CONFIG_TABLE . '
-SET value = \'' . $_POST['editarea'] . '\'
-WHERE param=\'LocalFilesEditor\'
-LIMIT 1';
- pwg_query($query);
-}
-
-?> \ No newline at end of file