Changeset 3281245
- Timestamp:
- 04/24/2025 07:52:34 PM (8 months ago)
- Location:
- media-library-downloader
- Files:
-
- 9 added
- 4 edited
-
tags/1.3.3 (added)
-
tags/1.3.3/assets (added)
-
tags/1.3.3/assets/js (added)
-
tags/1.3.3/assets/js/admin.js (added)
-
tags/1.3.3/includes (added)
-
tags/1.3.3/includes/class-main.php (added)
-
tags/1.3.3/media-library-downloader.php (added)
-
tags/1.3.3/readme.txt (added)
-
tags/1.3.3/temp (added)
-
trunk/assets/js/admin.js (modified) (6 diffs)
-
trunk/includes/class-main.php (modified) (1 diff)
-
trunk/media-library-downloader.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-library-downloader/trunk/assets/js/admin.js
r2914430 r3281245 16 16 const option1 = document.createElement("option"); 17 17 option1.value = "mld-download-files" 18 option1.innerText = 'Télécharger les fichiers sélectionnés';18 option1.innerText = mld_i18n.download_files; 19 19 bulkActionTop.appendChild(option1); 20 20 … … 24 24 const option2 = document.createElement("option"); 25 25 option2.value = "mld-download-files" 26 option2.innerText = 'Télécharger les fichiers sélectionnés';26 option2.innerText = mld_i18n.download_files; 27 27 bulkActionBottom.appendChild(option2); 28 28 … … 30 30 let doAction = document.querySelector('#doaction'); 31 31 doAction.addEventListener('click', function (e) { 32 33 32 if ((bulkActionTop.value || bulkActionBottom.value) !== 'mld-download-files') { 34 33 return; … … 38 37 39 38 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); 42 41 return; 43 42 } … … 46 45 for (let index = 0; index < checkedFiles.length; index++) { 47 46 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; 49 55 } 50 56 … … 56 62 }, 57 63 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 } 60 69 }, 70 error: function() { 71 alert(mld_i18n.download_error); 72 } 61 73 }); 62 74 }) -
media-library-downloader/trunk/includes/class-main.php
r3281235 r3281245 37 37 wp_enqueue_script( 'mld-admin-script', MLD_ASSETS_JS . 'admin.js', array( 'jquery' ), 1.0, true ); 38 38 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 )); 39 44 } 40 45 -
media-library-downloader/trunk/media-library-downloader.php
r3281235 r3281245 4 4 * Plugin URI: https://wordpress.org/plugins/media-library-downloader/ 5 5 * Description: Download multiple media library files in one click ! 6 * Version: 1.3. 26 * Version: 1.3.3 7 7 * Tags: library, media, files, download, downloader, WordPress 8 8 * Requires at least: 5.0 or higher 9 9 * Requires PHP: 5.6 10 10 * Tested up to: 6.6.1 11 * Stable tag: 1.3. 211 * Stable tag: 1.3.3 12 12 * Author: M . Code 13 13 * License: GPL v2 or later -
media-library-downloader/trunk/readme.txt
r3281235 r3281245 6 6 Tested up to: 6.6.1 7 7 Requires PHP: 5.6 8 Stable tag: 1.3. 18 Stable tag: 1.3.3 9 9 License: GPL v2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 28 28 29 29 == Changelog == 30 31 = 1.3.3 = 32 * Fix bug where download button where disabled 30 33 31 34 = 1.3.2 =
Note: See TracChangeset
for help on using the changeset viewer.