Changeset 10311


Ignore:
Timestamp:
04/12/11 13:41:57 (9 years ago)
Author:
patdenice
Message:

merge r10309 from trunk to branch 2.2
Always load codemirror

Location:
branches/2.2/plugins/LocalFilesEditor
Files:
1 deleted
31 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/plugins/LocalFilesEditor

  • branches/2.2/plugins/LocalFilesEditor/admin.php

    r10310 r10311  
    361361  'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin-LocalFilesEditor-'.$page['tab'], 
    362362  'LOCALEDIT_PATH' => LOCALEDIT_PATH, 
    363   'LOAD_CODEMIRROR' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'off', 
    364363  'CODEMIRROR_MODE' => @$codemirror_mode 
    365364  ) 
  • branches/2.2/plugins/LocalFilesEditor/admin.tpl

    r10310 r10311  
    1515 
    1616{footer_script} 
    17 function loadCodemirror() {ldelim} 
    18   editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 
    19     matchBrackets: true, 
    20     mode: "{$CODEMIRROR_MODE}", 
    21     tabMode: "shift" 
    22   }); 
    23   jQuery("#showedit, #hideedit").toggle(); 
    24   jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "on"}); 
    25 } 
    26  
    27 function unloadCodemirror() {ldelim}  
    28   editor.toTextArea(); 
    29   jQuery("#showedit, #hideedit").toggle(); 
    30   jQuery.post("plugins/LocalFilesEditor/update_config.php", {ldelim} editarea: "off"}); 
    31 } 
    32  
    33 {if $LOAD_CODEMIRROR == 'on'} 
    34 if (document.getElementById("text") != null) loadCodemirror(); 
    35 {/if} 
     17var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 
     18  matchBrackets: true, 
     19  mode: "{$CODEMIRROR_MODE}", 
     20  tabMode: "shift" 
     21}); 
    3622{/footer_script} 
    3723 
     
    9278 
    9379<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea> 
    94 <div id="editarea_buttons"> 
    95 <a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a> 
    96 <a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a> 
    97 </div> 
    9880 
    9981<br> 
  • branches/2.2/plugins/LocalFilesEditor/language/ar_SA/plugin.lang.php

    r10310 r10311  
    5151$lang['locfiledit_empty_filename'] = 'يجب كتابة أسم الملف'; 
    5252$lang['locfiledit_webmaster_only'] = 'فقط مدير الموقع يمكن استخدام محرر الملفات المحلي'; 
    53  
    54 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    55 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5653?> 
  • branches/2.2/plugins/LocalFilesEditor/language/cs_CZ/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Musíte vyplnit název souboru.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Pouze webmaster může vytvářet nebo měnit lokální soubory.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/de_DE/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Sie müssen einen Dateiname eingeben.'; 
    5353/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'You must fill file name.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.'; 
    54  
    55 $lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 $lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Por favor, indique un nombre de archivo.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Sólo los administradores pueden crear o modificar fichero locales.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Veuillez indiquer un nom de fichier.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Seuls les webmasters sont autorisés à créer ou modifier les fichiers locaux.'; 
    54  
    55 $lang['locfiledit_enable_codemirror'] = 'Activer Codemirror'; 
    56 $lang['locfiledit_disable_codemirror'] = 'Désactiver Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/he_IL/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_webmaster_only'] = 'רק מנהל האתר יכול ליצור או לשנות קבצים מקומיים.'; 
    5353$lang['locfiledit_filename_error'] = 'אסור להשתמש בתווים מסויימים בשם הקובץ.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/hr_HR/plugin.lang.php

    r10310 r10311  
    5050$lang['locfiledit_empty_filename'] = 'Morate popuniti naziv datoteke.'; 
    5151$lang['locfiledit_webmaster_only'] = 'Samo webmasteri mogu kreirati ili mijenjati lokalne datoteke.'; 
    52  
    53 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    54 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5552?> 
  • branches/2.2/plugins/LocalFilesEditor/language/hu_HU/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'A fájlnevet ki kell tölteni.'; 
    5353/* TODO */ $lang['locfiledit_webmaster_only'] = 'Csak a webmesterek hozhatnak létre, vagy módosíthatnak helyi fájlokat.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/it_IT/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Indicate un nome di file.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Solo i webmasters sono autorizzati a creare o modificare i file locali.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/ja_JP/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'ファイル名を記入する必要があります。'; 
    5353$lang['locfiledit_webmaster_only'] = 'ローカルファイルはウェブマスターのみ作成するか、変更できます。'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/ka_GE/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'თქვენ უნდა შეავსოთ ფაილის სახელი.'; 
    5353$lang['locfiledit_webmaster_only'] = 'მხოლოდ ვებოსტატებს შეუძლიათ შექმნან ან გადააკეთონ ლოკალური ფაილები.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/lv_LV/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Jums jaieraksta faila nosaukums.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Tikai webmasters var izveidot un modificet lokalos failus.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/nl_NL/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'U moet een bestandsnaam opgeven.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Alleen webbeheerders kunnen lokale bestanden aanmaken of wijzigen.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/no_NO/plugin.lang.php

    r10310 r10311  
    4949$lang['locfiledit_empty_filename'] = 'Du må fylle inn fil navnet.'; 
    5050$lang['locfiledit_webmaster_only'] = 'Kun webmaster kan lage eller endre lokale filer.'; 
    51  
    52 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    53 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5451?> 
  • branches/2.2/plugins/LocalFilesEditor/language/pl_PL/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Musisz wpisać nazwę pliku.'; 
    5353/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/pt_PT/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Tem que preencher o Nome do ficheiro.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Apenas webmasters podem criar ou modificar ficheiros locais.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/ru_RU/plugin.lang.php

    r10310 r10311  
    5151$lang['locfiledit_empty_filename'] = 'Заполните поле "Имя файла".'; 
    5252$lang['locfiledit_webmaster_only'] = 'Только вэбмастеры могут создавать или редактировать локальные файлы.'; 
    53  
    54 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    55 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5653?> 
  • branches/2.2/plugins/LocalFilesEditor/language/sk_SK/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Musíte zadať meno súboru.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Len webmasteri môžu vytvoriť alebo modifikovať lokálne súbory.'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/sr_RS/plugin.lang.php

    r10310 r10311  
    5151$lang['locfiledit_empty_filename']      = 'Морате уписати име датотеке.'; 
    5252$lang['locfiledit_webmaster_only']      = 'Само уредник интернет страница може да направи или уреди локалне датотеке.'; 
    53  
    54 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    55 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5653?> 
  • branches/2.2/plugins/LocalFilesEditor/language/sv_SE/plugin.lang.php

    r10310 r10311  
    5151$lang['locfiledit_empty_filename'] = 'Du måste välja ett filnamn.'; 
    5252$lang['locfiledit_webmaster_only'] = 'Endast webmasters kan skapa eller ändra lokala filer.'; 
    53  
    54 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    55 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5653?> 
  • branches/2.2/plugins/LocalFilesEditor/language/tr_TR/plugin.lang.php

    r10310 r10311  
    5252$lang['locfiledit_empty_filename'] = 'Adi doldurmak zorundasin.'; 
    5353$lang['locfiledit_webmaster_only'] = 'Sadece yöneticiler dosyalari degistirebilir .'; 
    54  
    55 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    56 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5754?> 
  • branches/2.2/plugins/LocalFilesEditor/language/vi_VN/plugin.lang.php

    r10310 r10311  
    5151$lang['locfiledit_empty_filename'] = 'Bạn phải điền đủ tên tệp tin.'; 
    5252$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.'; 
    53  
    54 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    55 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5653?> 
  • branches/2.2/plugins/LocalFilesEditor/language/zh_CN/plugin.lang.php

    r10310 r10311  
    5151$lang['locfiledit_empty_filename'] = '您必须填写文件名.'; 
    5252$lang['locfiledit_webmaster_only'] = '只有网站管理员才能创建或者修改本地文件.'; 
    53  
    54 /*TODO*/$lang['locfiledit_enable_codemirror'] = 'Enable Codemirror'; 
    55 /*TODO*/$lang['locfiledit_disable_codemirror'] = 'Disable Codemirror'; 
    5653?> 
  • branches/2.2/plugins/LocalFilesEditor/locfiledit.css

    r10310 r10311  
    2020} 
    2121 
    22 #LocalFilesEditor #editarea_buttons { 
    23   width: 100%; 
    24   float: left; 
    25   text-align: left; 
    26 } 
    27  
    28 #LocalFilesEditor #hideedit { 
    29   display: none; 
    30 } 
    31  
    3222#LocalFilesEditor TD { 
    3323  padding: 0.5em; 
     
    3525 
    3626.CodeMirror { 
    37   background-color: #DDDDDD; 
     27  background-color: #EEEEEE; 
    3828  font-size: 1.3em; 
    3929  border: 1px solid #999999; 
  • branches/2.2/plugins/LocalFilesEditor/maintain.inc.php

    r8728 r10311  
    2222// +-----------------------------------------------------------------------+ 
    2323 
    24 function plugin_install() 
    25 { 
    26   global $prefixeTable; 
    27  
    28   $query = ' 
    29 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 
    30 VALUES (\'LocalFilesEditor\' , \'off\' , \'LocalFiles Editor plugin parameters\');'; 
    31  
    32   pwg_query($query); 
    33 } 
    34  
    3524function plugin_uninstall() 
    3625{ 
  • branches/2.2/plugins/LocalFilesEditor/show_default.php

    r10310 r10311  
    4646    'DEFAULT_CONTENT' => $file, 
    4747    'LOCALEDIT_PATH' => LOCALEDIT_PATH, 
    48     'LOAD_CODEMIRROR' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'on', 
    4948    'CODEMIRROR_MODE' => 'application/x-httpd-php' 
    5049    ) 
  • branches/2.2/plugins/LocalFilesEditor/show_default.tpl

    r10310 r10311  
    2020 
    2121{footer_script} 
    22 function loadCodemirror() {ldelim} 
    23   editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 
    24     matchBrackets: true, 
    25     readOnly: true, 
    26     mode: "{$CODEMIRROR_MODE}", 
    27     tabMode: "shift" 
    28   }); 
    29   jQuery("#showedit").hide(); 
    30   jQuery("#hideedit").show(); 
    31   jQuery.post("update_config.php", {ldelim} editarea: "on"}); 
    32 } 
    33  
    34 function unloadCodemirror() {ldelim}  
    35   editor.toTextArea(); 
    36   jQuery("#hideedit").hide(); 
    37   jQuery("#showedit").show(); 
    38   jQuery.post("update_config.php", {ldelim} editarea: "off"}); 
    39 } 
    40  
    41 {if $LOAD_CODEMIRROR == 'on'} 
    42 if (document.getElementById("text") != null) loadCodemirror(); 
    43 {/if} 
     22var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim} 
     23  matchBrackets: true, 
     24  readOnly: true, 
     25  mode: "{$CODEMIRROR_MODE}", 
     26  tabMode: "shift" 
     27}); 
    4428{/footer_script} 
    4529 
     
    4933<textarea id="text" rows="30" cols="90">{$DEFAULT_CONTENT}</textarea> 
    5034 
    51 <div id="editarea_buttons"> 
    52 <a href="javascript:loadCodemirror();" id="showedit">[{'locfiledit_enable_codemirror'|@translate}]</a> 
    53 <a href="javascript:unloadCodemirror();" id="hideedit">[{'locfiledit_disable_codemirror'|@translate}]</a> 
    5435</div> 
    55  
    56 </div> 
Note: See TracChangeset for help on using the changeset viewer.