⚡ NEW: Changeset/ - Full Archive

Changeset 3281245


Ignore:
Timestamp:
04/24/2025 07:52:34 PM (8 months ago)
Author:
devloper00
Message:

Update to 1.3.3

Location:
media-library-downloader
Files:
9 added
4 edited

Legend:

Unmodified
Added
Removed
  • media-library-downloader/trunk/assets/js/admin.js

    r2914430 r3281245  
    1616        const option1 = document.createElement("option");
    1717        option1.value = "mld-download-files"
    18         option1.innerText = 'Télécharger les fichiers sélectionnés';
     18        option1.innerText = mld_i18n.download_files;
    1919        bulkActionTop.appendChild(option1);
    2020
     
    2424        const option2 = document.createElement("option");
    2525        option2.value = "mld-download-files"
    26         option2.innerText = 'Télécharger les fichiers sélectionnés';
     26        option2.innerText = mld_i18n.download_files;
    2727        bulkActionBottom.appendChild(option2);
    2828
     
    3030        let doAction = document.querySelector('#doaction');
    3131        doAction.addEventListener('click', function (e) {
    32 
    3332            if ((bulkActionTop.value || bulkActionBottom.value) !== 'mld-download-files') {
    3433                return;
     
    3837
    3938            let checkedFiles = document.querySelectorAll('#the-list input:checked');
    40             if (checkedFiles.length === 0) {
    41                 alert('Aucun fichier sélectionné');
     39            if (!checkedFiles || checkedFiles.length === 0) {
     40                alert(mld_i18n.no_files_selected);
    4241                return;
    4342            }
     
    4645            for (let index = 0; index < checkedFiles.length; index++) {
    4746                const element = checkedFiles[index];
    48                 selection.push(element.value);
     47                if (element && element.value) {
     48                    selection.push(element.value);
     49                }
     50            }
     51
     52            if (selection.length === 0) {
     53                alert(mld_i18n.no_files_selected);
     54                return;
    4955            }
    5056
     
    5662                },
    5763                success: function (response) {
    58                     // console.log(response);
    59                     window.location = response.data;
     64                    if (response.success) {
     65                        window.location = response.data;
     66                    } else {
     67                        alert(response.data);
     68                    }
    6069                },
     70                error: function() {
     71                    alert(mld_i18n.download_error);
     72                }
    6173            });
    6274        })
  • media-library-downloader/trunk/includes/class-main.php

    r3281235 r3281245  
    3737            wp_enqueue_script( 'mld-admin-script', MLD_ASSETS_JS . 'admin.js', array( 'jquery' ), 1.0, true );
    3838            wp_localize_script( 'mld-admin-script', 'admin', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
     39            wp_localize_script( 'mld-admin-script', 'mld_i18n', array(
     40                'download_files' => __('Download selected files', 'media-library-downloader'),
     41                'no_files_selected' => __('No files selected', 'media-library-downloader'),
     42                'download_error' => __('An error occurred while downloading files', 'media-library-downloader')
     43            ));
    3944        }
    4045
  • media-library-downloader/trunk/media-library-downloader.php

    r3281235 r3281245  
    44 * Plugin URI:        https://wordpress.org/plugins/media-library-downloader/
    55 * Description:       Download multiple media library files in one click !
    6  * Version:           1.3.2
     6 * Version:           1.3.3
    77 * Tags:              library, media, files, download, downloader, WordPress
    88 * Requires at least: 5.0 or higher
    99 * Requires PHP:      5.6
    1010 * Tested up to:      6.6.1
    11  * Stable tag:        1.3.2
     11 * Stable tag:        1.3.3
    1212 * Author:            M . Code
    1313 * License:           GPL v2 or later
  • media-library-downloader/trunk/readme.txt

    r3281235 r3281245  
    66Tested up to: 6.6.1
    77Requires PHP: 5.6
    8 Stable tag: 1.3.1
     8Stable tag: 1.3.3
    99License: GPL v2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2828
    2929== Changelog ==
     30
     31= 1.3.3 =
     32* Fix bug where download button where disabled
    3033
    3134= 1.3.2 =
Note: See TracChangeset for help on using the changeset viewer.