#37603 closed defect (bug) (fixed)
Missing visual feedback when deleting themes/plugins
Reported by: | ocean90 | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Plugins | Keywords: | has-patch commit |
Focuses: | ui, javascript, administration | Cc: |
Description
Only on wp-admin/themes.php the delete button changes to "Deleting…". Also, when I cancel the credential modal the button remains at "Deleting…".
- https://core.trac.wordpress.org/browser/trunk/src/wp-admin/js/updates.js?rev=38209&marks=716,726#L702 doesn't look right.
.update-message
has nothing to do with a delete link right? - For themes we have https://core.trac.wordpress.org/browser/trunk/src/wp-admin/js/updates.js?rev=38209&marks=1168,1179#L1155 which doesn't work for themes-network
Attachments (5)
Change History (16)
This ticket was mentioned in Slack in #feature-shinyupdates by ocean90. View the logs.
8 years ago
#3
@
8 years ago
- Keywords needs-patch added; has-patch removed
37603.diff is not what I wanted: 1) Instead of removing the code we should make it work. 2) 'themes' === pagenow
in the credential-modal-cancel
callback is also true for a canceled update job, we have to check if it's a delete job.
#4
@
8 years ago
Thanks for the clarification.
37603.3.diff actually changes the "Delete" link for plugins and properly distinguishes updates and deletions in the credential-modal-cancel
callback.
This ticket was mentioned in Slack in #core by ocean90. View the logs.
8 years ago
#8
@
8 years ago
- Keywords commit added
- Owner changed from ocean90 to jorbin
37603.4.diff renames $message
to $link
and changes
if ( 'update-theme' === job.action ) { $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.update-message' ); } else if ( 'delete-theme' === job.action ) { if ( 'themes-network' === pagenow ) { $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.row-actions a.delete' ); } else { $message = $( '.theme-actions .delete-theme' ); } }
to
if ( 'update-theme' === job.action ) { $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.update-message' ); } else if ( 'delete-theme' === job.action && 'themes-network' === pagenow ) { $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.row-actions a.delete' ); } else if ( 'delete-theme' === job.action && 'themes' === pagenow ) { $message = $( '.theme-actions .delete-theme' ); }
which makes it more readable IMO.
37603.diff removes the lines in questions from
wp.updates.deletePlugin
as they're indeed not needed and fixes the issue on themes.php