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. git-svn-id: https://develop.svn.wordpress.org/trunk@40902 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e67238f480
commit
b13ab6b4a3
@ -5116,6 +5116,7 @@ ImageDetails = Select.extend({
|
||||
style: 'primary',
|
||||
text: l10n.replace,
|
||||
priority: 80,
|
||||
requires: { selection: true },
|
||||
|
||||
click: function() {
|
||||
var controller = this.controller,
|
||||
|
@ -146,6 +146,7 @@ ImageDetails = Select.extend({
|
||||
style: 'primary',
|
||||
text: l10n.replace,
|
||||
priority: 80,
|
||||
requires: { selection: true },
|
||||
|
||||
click: function() {
|
||||
var controller = this.controller,
|
||||
|
Loading…
Reference in New Issue
Block a user