Skip to content

Commit 6b10ac0

Browse files
committed
fix(*): more deprecated API usage fixes
1 parent a34152a commit 6b10ac0

17 files changed

+62
-64
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.removeAttr("disabled");
4980-
this._options.$hiddenInput.removeAttr("disabled");
4979+
this._options.$input.remoteProp("disabled");
4980+
this._options.$hiddenInput.removeProp("disabled");
49814981
}
49824982
},
49834983
changeLocale: function () {

src/js/modules/infragistics.ui.dialog.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@
11701170
this.element.stop(true, true);
11711171
this._doClose(null, true);
11721172
if (self._winResize) {
1173-
$(window).unbind("resize", self._winResize);
1173+
$(window).off("resize", self._winResize);
11741174
}
11751175
this.element.children(".ui-igdialog-header").remove();
11761176
this.element.children(".ui-igdialog-footer").remove();
@@ -1186,7 +1186,7 @@
11861186
if (this.options.resizable) {
11871187
this.element.resizable("destroy");
11881188
}
1189-
this.element.unbind();
1189+
this.element.off();
11901190

11911191
// if (next && next.parentNode === dad) {
11921192
// dad.insertBefore(elem0, next);
@@ -1951,7 +1951,7 @@
19511951
}
19521952
if (remove) {
19531953
if (self._focBind) {
1954-
self._focBind.unbind(focusEvt);
1954+
self._focBind.off(focusEvt);
19551955
delete self._focBind;
19561956
}
19571957
return;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@
572572
}
573573
}
574574
if (disabled) {
575-
element.removeAttr("disabled");
575+
element.removeProp("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.removeAttr("disabled");
2243+
target.removeProp("disabled");
22442244
target.prop("disabled", false);
22452245
this._attachButtonsEvents(type, target);
22462246
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@
23312331
```
23322332
*/
23332333
this._superApply(arguments);
2334-
$(this.workspace.contentWindow).undelegate();
2334+
$(this.workspace.contentWindow).off();
23352335
this._destroyPopovers();
23362336
this._viewSourceBtn.igButton("destroy");
23372337
this.element.removeClass(this.css.htmlEditor)

src/js/modules/infragistics.ui.popover.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -865,17 +865,17 @@
865865
(typeof t[ 0 ] === "object") && (t[ 0 ].nodeType === 1) &&
866866
( typeof t[ 0 ].style === "object" ) &&
867867
( typeof t[ 0 ].ownerDocument === "object" ) ) ) {
868-
$(t).unbind(showEvt).on(showEvt, targetShowEvt);
869-
$(t).unbind(hideEvt).on(hideEvt, targetHideEvt);
868+
$(t).off(showEvt).on(showEvt, targetShowEvt);
869+
$(t).off(hideEvt).on(hideEvt, targetHideEvt);
870870
} else if (this.options.selectors && showEvt) {
871871
this.element.find(this.options.selectors).addBack().each(function () {
872872
var target = $(this)[ 0 ];
873873
/* verify that no popover should be shown for the original div */
874874
if (target === self.element[ 0 ]) {
875875
return;
876876
}
877-
$(target).unbind(showEvt).on(showEvt, targetShowEvt);
878-
$(target).unbind(hideEvt).on(hideEvt, targetHideEvt);
877+
$(target).off(showEvt).on(showEvt, targetShowEvt);
878+
$(target).off(hideEvt).on(hideEvt, targetHideEvt);
879879
});
880880
}
881881
},
@@ -892,11 +892,11 @@
892892
(typeof t[ 0 ] === "object") && (t[ 0 ].nodeType === 1) &&
893893
( typeof t[ 0 ].style === "object" ) &&
894894
( typeof t[ 0 ].ownerDocument === "object" ) ) ) {
895-
$(t).unbind(".popover");
895+
$(t).off(".popover");
896896
} else if (this.options.selectors) {
897897
this.element.find(this.options.selectors).addBack().each(function () {
898898
var target = $(this);
899-
$(target).unbind(".popover");
899+
$(target).off(".popover");
900900
});
901901
}
902902
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@
11121112
}
11131113
this.validator(1);
11141114
if (this._foc) {
1115-
this._foc.unbind().remove();
1115+
this._foc.off().remove();
11161116
}
11171117
this._elem.remove();
11181118
if (o.theme) {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@
421421
" ui-igslider-vertical" +
422422
" ui-igslider-disabled")
423423
.removeData("slider")
424-
.unbind(".slider");
424+
.off(".slider");
425425

426426
this._mouseDestroy();
427427

@@ -531,7 +531,7 @@
531531

532532
// A.Y. June 6, 2011 Bug# 73864 - _mouseStart is fired so we can unbind our mauseUp handler
533533
// as we know now that _mouseStop will be fired
534-
$(document).unbind("mouseup." + this.widgetName, this._mouseUpHandler);
534+
$(document).off("mouseup." + this.widgetName, this._mouseUpHandler);
535535

536536
return this._start(event, this._handleIndex);
537537
},
@@ -720,7 +720,7 @@
720720
this.handles.attr("disabled", "disabled");
721721
this.element.addClass("ui-disabled");
722722
} else {
723-
this.handles.removeAttr("disabled");
723+
this.handles.removeProp("disabled");
724724
this.element.removeClass("ui-disabled");
725725
}
726726
break;
@@ -884,7 +884,7 @@
884884
" ui-widget-content" +
885885
" ui-corner-all")
886886
.removeData("igProgressBar")
887-
.unbind(".igProgressBar");
887+
.off(".igProgressBar");
888888
$("#" + this._id("_progress")).remove();
889889
return this;
890890
},
@@ -1192,7 +1192,7 @@
11921192
if (e.hasClass(o.css.buttonDisabledClass)) {
11931193
e.removeClass(o.css.buttonDisabledClass);
11941194
}
1195-
e.removeAttr("disabled");
1195+
e.removeProp("disabled");
11961196
if (e.is("a") === true) {
11971197
self._setLinkOptions(true);
11981198
}
@@ -1381,7 +1381,7 @@
13811381

13821382
_dettachEvents: function () {
13831383
this._attached = false;
1384-
this.element.unbind(this._events);
1384+
this.element.off(this._events);
13851385
},
13861386

13871387
/* Event Functions */

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -858,19 +858,19 @@
858858
// D.P. If _create threw this._splitter is not assigned
859859
return;
860860
}
861-
$(this._splitter.bar).unbind(this._getEvent("focus"),
861+
$(this._splitter.bar).off(this._getEvent("focus"),
862862
this._getEvent("blur"),
863863
this._getEvent("keydown"));
864-
$(this._splitter.bar.children()[ 0 ]).unbind(this._getEvent("mousedown"));
865-
$(this._splitter.bar.children()[ 1 ]).unbind(this._getEvent("mousedown"));
864+
$(this._splitter.bar.children()[ 0 ]).off(this._getEvent("mousedown"));
865+
$(this._splitter.bar.children()[ 1 ]).off(this._getEvent("mousedown"));
866866

867867
//T.P. Bug #155452 fix _removeEventHandlers so when under mobile devices mouseenter and mouseleave are not unbinded
868868
if (!this._isTouch()) {
869-
$(this._splitter.bar).unbind(this._getEvent("mouseenter"),
869+
$(this._splitter.bar).off(this._getEvent("mouseenter"),
870870
this._getEvent("mouseleave"));
871-
$(this._splitter.bar.children()[ 0 ]).unbind(this._getEvent("mouseenter"),
871+
$(this._splitter.bar.children()[ 0 ]).off(this._getEvent("mouseenter"),
872872
this._getEvent("mouseleave"));
873-
$(this._splitter.bar.children()[ 1 ]).unbind(this._getEvent("mouseenter"),
873+
$(this._splitter.bar.children()[ 1 ]).off(this._getEvent("mouseenter"),
874874
this._getEvent("mouseleave"));
875875
}
876876
},
@@ -2299,9 +2299,9 @@
22992299

23002300
// D.A. 24th October 2013 Remove the attached events to window and document
23012301
if (evtHandlers) {
2302-
$(document).unbind(this._getEvent("mouseup"), evtHandlers.documentMouseUp);
2303-
$(document).unbind(this._getEvent("mousemove"), evtHandlers.documentMouseMove);
2304-
$(window).unbind("resize", evtHandlers.windowResize);
2302+
$(document).off(this._getEvent("mouseup"), evtHandlers.documentMouseUp);
2303+
$(document).off(this._getEvent("mousemove"), evtHandlers.documentMouseMove);
2304+
$(window).off("resize", evtHandlers.windowResize);
23052305
}
23062306
this._superApply(arguments);
23072307
this._opt = null;

src/js/modules/infragistics.ui.toolbar.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,9 +1360,7 @@
13601360
*/
13611361

13621362
// D.U. #177516 12th of August [ igToolbar ] Method destroy remover the toolbar container
1363-
this.element
1364-
.undelegate()
1365-
.unbind();
1363+
this.element.off();
13661364

13671365
this.collapseBtn
13681366
.igToolbarButton("destroy")

src/js/modules/infragistics.ui.tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4851,7 +4851,7 @@
48514851
this._superApply(arguments);
48524852

48534853
// K.D. February 17th, 2014 Bug #164398 Attaching events only on create as delegate is used instead of bind now.
4854-
this.element.undelegate();
4854+
this.element.off();
48554855
this.element.removeClass(this.css.tree);
48564856
this.element.removeClass(this.css.treeCollection);
48574857
this.element.removeClass(this.css.treeRoot);

0 commit comments

Comments
 (0)