Skip to content

Commit 3f08742

Browse files
authored
Merge pull request #2283 from IgniteUI/copilot/migrate-deprecated-jquery-methods
Migrate deprecated jQuery methods to modern equivalents
2 parents d7b5048 + 298967a commit 3f08742

8 files changed

+14
-13
lines changed

src/js/modules/infragistics.ui.combo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4976,8 +4976,8 @@
49764976
this._options.$input.attr("disabled", true);
49774977
this._options.$hiddenInput.attr("disabled", true);
49784978
} else {
4979-
this._options.$input[0].removeAttribute("disabled");
4980-
this._options.$hiddenInput[0].removeAttribute("disabled");
4979+
this._options.$input.removeAttr("disabled");
4980+
this._options.$hiddenInput.removeAttr("disabled");
49814981
}
49824982
},
49834983
changeLocale: function () {

src/js/modules/infragistics.ui.editors.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@
572572
}
573573
}
574574
if (disabled) {
575-
element[0].removeAttribute("disabled");
575+
element.removeAttr("disabled");
576576

577577
// If we have 'disabled' attribute, then it is applied only when 'disabled' options is not defined.
578578
if (this._definedOptions === undefined || this._definedOptions.disabled === undefined) {
@@ -2240,7 +2240,7 @@
22402240
_enableSpinButton: function (target, type) {
22412241
if (target && target.attr("disabled")) {
22422242
target.removeClass(this.css.disabled);
2243-
target[0].removeAttribute("disabled");
2243+
target.removeAttr("disabled");
22442244
target.prop("disabled", false);
22452245
this._attachButtonsEvents(type, target);
22462246
}
@@ -12844,3 +12844,4 @@
1284412844
$.extend($.ui.igTimePicker, { version: "<build_number>" });
1284512845
return $;// REMOVE_FROM_COMBINED_FILES
1284612846
}));// REMOVE_FROM_COMBINED_FILES
12847+

src/js/modules/infragistics.ui.htmleditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@
19341934
}
19351935
});
19361936

1937-
$(document).click(function (e) {
1937+
$(document).on('click', function (e) {
19381938
var $tarParents = $(e.target).parents();
19391939

19401940
// Hide all popovers except when clicking on one of them

src/js/modules/infragistics.ui.rating.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
border: "0px",
441441
outline: "none"
442442
};
443-
me._foc = $("<input type=\"button\"/>").css(v).appendTo(cont).focus(function (evt) {
443+
me._foc = $("<input type=\"button\"/>").css(v).appendTo(cont).on('focus', function (evt) {
444444
if (o.disabled || me._fcs) {
445445
return;
446446
}
@@ -456,7 +456,7 @@
456456
me._hov.css("visibility", "visible");
457457
}
458458
me._elem.addClass(css.active);
459-
}).blur(function (e) {
459+
}).on('blur', function (e) {
460460
if (o.disabled || !me._fcs) {
461461
return;
462462
}

src/js/modules/infragistics.ui.shared.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@
720720
this.handles.attr("disabled", "disabled");
721721
this.element.addClass("ui-disabled");
722722
} else {
723-
this.handles[0].removeAttribute("disabled");
723+
this.handles.removeAttr("disabled");
724724
this.element.removeClass("ui-disabled");
725725
}
726726
break;
@@ -1192,7 +1192,7 @@
11921192
if (e.hasClass(o.css.buttonDisabledClass)) {
11931193
e.removeClass(o.css.buttonDisabledClass);
11941194
}
1195-
e[0].removeAttribute("disabled");
1195+
e.removeAttr("disabled");
11961196
if (e.is("a") === true) {
11971197
self._setLinkOptions(true);
11981198
}

src/js/modules/infragistics.ui.splitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@
11851185
// Z.K. Bug #201281 Click event does not fire on the click of the splitter.
11861186
// This is happening because the bar element is cloned and the click event is not fired.
11871187
// In order to overcome this mouse up and down events are handled and on mouse up "click" is triggered
1188-
clonedBar.mouseup(function () {
1188+
clonedBar.on('mouseup', function () {
11891189

11901190
if (splitter.options.orientation === "vertical") {
11911191
if (opt.barMouseDown && Math.round(offset.left) ===

src/js/modules/infragistics.ui.toolbarbutton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
self = this;
267267

268268
// Toggle element state on click
269-
this.element.click(function (e) {
269+
this.element.on('click', function (e) {
270270
if (o.allowToggling) {
271271
if (o.isSelected) {
272272
noCancel = self._triggerDeactivating(e);

src/js/modules/infragistics.ui.zoombar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,8 @@
744744
},
745745
text: false
746746
})
747-
.click(this._leftRightButtonHandler)
748-
.keyup(this._leftRightButtonHandler)
747+
.on('click', this._leftRightButtonHandler)
748+
.on('keyup', this._leftRightButtonHandler)
749749
.removeClass("ui-corner-all")
750750
.appendTo(container);
751751
},

0 commit comments

Comments
 (0)