Improve Choose Update Source feature based on feedback
Some checks failed
ci/woodpecker/push/woodpecker Pipeline is pending
ci/woodpecker/tag/woodpecker Pipeline is pending
Plugin Asset Update / Push assets to WordPress.org (push) Has been cancelled
Build Release / Build and Create Release (push) Has been cancelled
Build Release / Deploy to WordPress.org (push) Has been cancelled

This commit is contained in:
2025-04-13 14:27:26 +01:00
parent 5e8da5d87b
commit eac794c54a
8 changed files with 71 additions and 32 deletions

View File

@ -48,7 +48,14 @@ jQuery(document).ready(function($) {
});
// Close modal when clicking overlay or close button
$(document).on('click', '#fpden-modal-overlay, .fpden-close-modal', function() {
$(document).on('click', '#fpden-modal-overlay', function() {
$('#fpden-update-source-modal').hide();
$('#fpden-modal-overlay').remove();
});
// Separate handler for close button to ensure it works
$(document).on('click', '.fpden-close-modal', function(e) {
e.preventDefault();
$('#fpden-update-source-modal').hide();
$('#fpden-modal-overlay').remove();
});
@ -80,9 +87,7 @@ jQuery(document).ready(function($) {
if (response.success) {
// Update the badge
var badgeText = source.charAt(0).toUpperCase() + source.slice(1);
if (source === 'auto') {
badgeText = 'Auto';
} else if (source === 'wordpress.org') {
if (source === 'wordpress.org') {
badgeText = 'WP.org';
}