Changeset 19835


Ignore:
Timestamp:
Jan 5, 2013, 2:21:21 PM (8 years ago)
Author:
julien1311
Message:

[file_uploader] add Javascript to config tab / change in language string

Location:
extensions/File_Uploader
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/File_Uploader/admin/admin_configuration.tpl

    r19821 r19835  
    1919  jQuery("a.preview-box").colorbox();
    2020});
     21{literal}
     22$(document).ready(function(){
     23        if ($("#file_uploader_pdf2tab_checkbox").is(":checked")) {
     24                        $("#file_uploader_pdf2tab_supported_extensions").css("display","block");
     25                        $("#file_uploader_pdf2tab_supported_extensions_description").css("display","block");
     26                } else {
     27                        $("#file_uploader_pdf2tab_supported_extensions").css("display","none");
     28                        $("#file_uploader_pdf2tab_supported_extensions_description").css("display","none");
     29                }
     30
     31        $("#file_uploader_pdf2tab_checkbox").click(function(){
     32                if ($("#file_uploader_pdf2tab_checkbox").is(":checked")) {
     33                        $("#file_uploader_pdf2tab_supported_extensions").show("fast");
     34                        $("#file_uploader_pdf2tab_supported_extensions_description").show("fast");
     35                } else {
     36                        $("#file_uploader_pdf2tab_supported_extensions").hide("fast");
     37                        $("#file_uploader_pdf2tab_supported_extensions_description").hide("fast");
     38                }
     39        });
     40});
     41{/literal}
    2142{/footer_script}
    2243
     
    2950                <legend>{'Configuration'|@translate}</legend>
    3051                <p>
    31                         <label><input type="checkbox" name="file_uploader_checkbox[new_tab]" value="1" {$file_uploader_checked.new_tab}> {'Open files in a new tab'|@translate}</label>
     52                        <label><input type="checkbox" id="file_uploader_pdf2tab_checkbox" name="file_uploader_checkbox[new_tab]" value="1" {$file_uploader_checked.new_tab}> {'Open files in a new tab'|@translate}</label>
    3253                </p>
    33                 <p id="file_uploader_pdf2tab_supported_extensions">
     54                <p id="file_uploader_pdf2tab_supported_extensions_description">
    3455                        {'file_uploader_pdf2tab_supported_extensions_description'|@translate}
    3556                </p>
  • extensions/File_Uploader/admin/admin_upload.php

    r19775 r19835  
    105105                        $return['overwrite'] = true;
    106106                else
    107                         $file_uploader_errors['already_exist'] = l10n('File with this name already exists. You should rename this file.');
     107                        $file_uploader_errors['already_exist'] = l10n('file_uploader_error_already_exist');
    108108        } else if (!move_uploaded_file($file_uploader_file_tmp, $file_uploader_file_destination)) {
    109109                $file_uploader_errors['move_uploaded_file'] = l10n('Can\'t upload file to galleries directory');
  • extensions/File_Uploader/language/en_UK/plugin.lang.php

    r19822 r19835  
    1919$lang['Upload error'] = 'Upload error';
    2020$lang['Type of file not supported'] = 'Type of file not supported';
    21 $lang['File with this name already exists. You should rename this file.'] = 'File with this name already exists. You should rename this file.';
     21$lang['file_uploader_error_already_exist'] = 'File with this name already exists. You should rename this file. If you want to overwrite the file, modify the configuration in the configuration tab.';
    2222$lang['Invalid file name'] = 'Invalid file name';
    2323$lang['Can\'t copy file to galleries directory'] = 'Can\'t copy file to galleries directory';
  • extensions/File_Uploader/language/fr_FR/plugin.lang.php

    r19822 r19835  
    1919$lang['Upload error'] = 'Erreur lors du transfert';
    2020$lang['Type of file not supported'] = 'Type de fichier non supporté';
    21 $lang['File with this name already exists. You should rename this file.'] = 'Un fichier avec le même nom existe déjà. Vous devriez renommer ce fichier.';
     21$lang['file_uploader_error_already_exist'] = 'Un fichier avec le même nom existe déjà. Vous devriez renommer ce fichier. Si vous voulez remplacer le fichier, modifiez la configuration dans l\'onglet configuration';
    2222$lang['Invalid file name'] = 'Nom de fichier non valide';
    2323$lang['Can\'t copy file to galleries directory'] = 'Copie ver le répertoire galleries impossible';
Note: See TracChangeset for help on using the changeset viewer.