Image Edit: Replace deprecated $.load() and $.error() methods to prevent warnings by jQuery Migrate, fixes #25371.
Built from https://develop.svn.wordpress.org/trunk@25547 git-svn-id: http://core.svn.wordpress.org/trunk@25467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c2739d12cc
commit
390d4e2272
|
@ -158,8 +158,8 @@ imageEdit = {
|
|||
'rand': t.intval(Math.random() * 1000000)
|
||||
};
|
||||
|
||||
img = $('<img id="image-preview-' + postid + '" />');
|
||||
img.load( function() {
|
||||
img = $('<img id="image-preview-' + postid + '" />')
|
||||
.on('load', function() {
|
||||
var max1, max2, parent = $('#imgedit-crop-' + postid), t = imageEdit;
|
||||
|
||||
parent.empty().append(img);
|
||||
|
@ -181,10 +181,12 @@ imageEdit = {
|
|||
$('input.imgedit-submit-btn', '#imgedit-panel-' + postid).prop('disabled', true);
|
||||
|
||||
t.toggleEditor(postid, 0);
|
||||
}).error(function(){
|
||||
})
|
||||
.on('error', function() {
|
||||
$('#imgedit-crop-' + postid).empty().append('<div class="error"><p>' + imageEditL10n.error + '</p></div>');
|
||||
t.toggleEditor(postid, 0);
|
||||
}).attr('src', ajaxurl + '?' + $.param(data));
|
||||
})
|
||||
.attr('src', ajaxurl + '?' + $.param(data));
|
||||
},
|
||||
|
||||
action : function(postid, nonce, action) {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue