Skip to content

Commit ae43898

Browse files
committed
* Fixing Success/Error as towards done/fail in jQuery 3.x (cherry picked from commit 39d3b3a)
1 parent b25d28f commit ae43898

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
showLoader: true,
9090
context: $form
9191
})
92-
.success(function (data) {
92+
.done(function (data) {
9393
if (!data.error) {
9494
setAttributeSetId(data.id);
9595
closeDialogAndProcessForm($form);

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ define([
9595
type: 'GET',
9696
url: this._buildGridUrl(filterData),
9797
context: $('body')
98-
}).success(function (data) {
98+
}).done(function (data) {
9999
bootstrap(JSON.parse(data));
100100
});
101101
},

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ define([
492492
dataType: 'json',
493493
showLoader: true,
494494
context: this
495-
}).success(function (data) {
495+
}).done(function (data) {
496496
if (!data.error) {
497497
this.set(
498498
'skeletonAttributeSet',
@@ -507,7 +507,7 @@ define([
507507
}
508508

509509
return false;
510-
}).error(function (xhr) {
510+
}).fail(function (xhr) {
511511
if (xhr.statusText === 'abort') {
512512
return;
513513
}

lib/web/mage/collapsible.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,12 +531,12 @@ define([
531531
that.element.addClass(that.options.loadingClass);
532532
}
533533
that.content.attr('aria-busy', 'true');
534-
that.xhr.success(function (response) {
534+
that.xhr.done(function (response) {
535535
setTimeout(function () {
536536
that.content.html(response);
537537
}, 1);
538538
});
539-
that.xhr.complete(function (jqXHR, status) {
539+
that.xhr.always(function (jqXHR, status) {
540540
setTimeout(function () {
541541
if (status === 'abort') {
542542
that.content.stop(false, true);

0 commit comments

Comments
 (0)