Media: Disable the edit image->replace button when no item selected.
On the edit media screen, ensure that the 'replace' button is disabled until a media item is selected. Fix an issue where clicking the button with no item selected threw a JavaScript error and failed to work. Props timmydcrawford, subrataemfluence, psiico. Fixes #40589. Built from https://develop.svn.wordpress.org/trunk@40902 git-svn-id: http://core.svn.wordpress.org/trunk@40752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b0fed2af63
commit
7846cdc632
|
@ -5116,6 +5116,7 @@ ImageDetails = Select.extend({
|
|||
style: 'primary',
|
||||
text: l10n.replace,
|
||||
priority: 80,
|
||||
requires: { selection: true },
|
||||
|
||||
click: function() {
|
||||
var controller = this.controller,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-40901';
|
||||
$wp_version = '4.9-alpha-40902';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue