Skip to content

Commit 884082c

Browse files
author
Duc Tri Le
committed
Merge pull request jquerytools#679 from duclet/613
Fix for jquerytools#613
2 parents 7eb3190 + 4154d99 commit 884082c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2053
-38804
lines changed

lib/jquery-1.3.2.js

Lines changed: 0 additions & 4376 deletions
This file was deleted.

lib/jquery-1.3.2.min.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

lib/jquery-1.4.2.js

Lines changed: 0 additions & 6241 deletions
This file was deleted.

lib/jquery-1.4.2.min.js

Lines changed: 0 additions & 154 deletions
This file was deleted.

lib/jquery-1.4.js

Lines changed: 0 additions & 151 deletions
This file was deleted.

lib/jquery-1.5.min.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

lib/jquery-1.6.2.min.js

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 1922 additions & 1637 deletions
Large diffs are not rendered by default.

lib/jquery-1.7.1.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dateinput/dateinput.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
ev.type = "onShow";
333333
fire.trigger(ev);
334334

335-
$(document).bind("keydown.d", function(e) {
335+
$(document).on("keydown.d", function(e) {
336336

337337
if (e.ctrlKey) { return true; }
338338
var key = e.keyCode;
@@ -399,7 +399,7 @@
399399

400400

401401
// click outside dateinput
402-
$(document).bind("click.d", function(e) {
402+
$(document).on("click.d", function(e) {
403403
var el = e.target;
404404

405405
if (!$(el).parents("#" + css.root).length && el != input[0] && (!trigger || el != trigger[0])) {
@@ -435,24 +435,24 @@
435435
opened = true;
436436

437437
// month selector
438-
monthSelector.unbind("change").change(function() {
438+
monthSelector.off("change").change(function() {
439439
self.setValue(integer(yearSelector.val()), integer($(this).val()));
440440
});
441441

442442
// year selector
443-
yearSelector.unbind("change").change(function() {
443+
yearSelector.off("change").change(function() {
444444
self.setValue(integer($(this).val()), integer(monthSelector.val()));
445445
});
446446

447447
// prev / next month
448-
pm = root.find("#" + css.prev).unbind("click").click(function(e) {
448+
pm = root.find("#" + css.prev).off("click").click(function(e) {
449449
if (!pm.hasClass(css.disabled)) {
450450
self.addMonth(-1);
451451
}
452452
return false;
453453
});
454454

455-
nm = root.find("#" + css.next).unbind("click").click(function(e) {
455+
nm = root.find("#" + css.next).off("click").click(function(e) {
456456
if (!nm.hasClass(css.disabled)) {
457457
self.addMonth();
458458
}
@@ -669,7 +669,7 @@
669669
},
670670

671671
destroy: function() {
672-
input.add(document).unbind("click.d").unbind("keydown.d");
672+
input.add(document).off("click.d keydown.d");
673673
root.add(trigger).remove();
674674
input.removeData("dateinput").removeClass(css.input);
675675
if (original) { input.replaceWith(original); }
@@ -687,7 +687,7 @@
687687
// cancelled ?
688688
if (e.isDefaultPrevented()) { return; }
689689

690-
$(document).unbind("click.d").unbind("keydown.d");
690+
$(document).off("click.d keydown.d");
691691

692692
// do the hide
693693
root.hide();
@@ -728,20 +728,20 @@
728728

729729
// configuration
730730
if ($.isFunction(conf[name])) {
731-
$(self).bind(name, conf[name]);
731+
$(self).on(name, conf[name]);
732732
}
733733

734734
// API methods
735735
self[name] = function(fn) {
736-
if (fn) { $(self).bind(name, fn); }
736+
if (fn) { $(self).on(name, fn); }
737737
return self;
738738
};
739739
});
740740

741741
if (!conf.editable) {
742742

743743
// show dateinput & assign keyboard shortcuts
744-
input.bind("focus.d click.d", self.show).keydown(function(e) {
744+
input.on("focus.d click.d", self.show).keydown(function(e) {
745745

746746
var key = e.keyCode;
747747

0 commit comments

Comments
 (0)