Datepicker: Remove unnecessary global variable now that we don't use inline event handlers anymore.

This commit is contained in:
Scott González 2013-04-03 16:12:50 -04:00
parent 504b100a1a
commit cb42ba6fd6

View File

@ -16,7 +16,6 @@
$.extend($.ui, { datepicker: { version: "@VERSION" } }); $.extend($.ui, { datepicker: { version: "@VERSION" } });
var PROP_NAME = "datepicker", var PROP_NAME = "datepicker",
dpuuid = new Date().getTime(),
instActive; instActive;
function getZindex( elem ) { function getZindex( elem ) {
@ -1580,27 +1579,27 @@ $.extend(Datepicker.prototype, {
inst.dpDiv.find("[data-handler]").map(function () { inst.dpDiv.find("[data-handler]").map(function () {
var handler = { var handler = {
prev: function () { prev: function () {
window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, -stepMonths, "M"); $.datepicker._adjustDate(id, -stepMonths, "M");
}, },
next: function () { next: function () {
window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, +stepMonths, "M"); $.datepicker._adjustDate(id, +stepMonths, "M");
}, },
hide: function () { hide: function () {
window["DP_jQuery_" + dpuuid].datepicker._hideDatepicker(); $.datepicker._hideDatepicker();
}, },
today: function () { today: function () {
window["DP_jQuery_" + dpuuid].datepicker._gotoToday(id); $.datepicker._gotoToday(id);
}, },
selectDay: function () { selectDay: function () {
window["DP_jQuery_" + dpuuid].datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
return false; return false;
}, },
selectMonth: function () { selectMonth: function () {
window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "M"); $.datepicker._selectMonthYear(id, this, "M");
return false; return false;
}, },
selectYear: function () { selectYear: function () {
window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "Y"); $.datepicker._selectMonthYear(id, this, "Y");
return false; return false;
} }
}; };
@ -2065,8 +2064,4 @@ $.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime(); $.datepicker.uuid = new Date().getTime();
$.datepicker.version = "@VERSION"; $.datepicker.version = "@VERSION";
// Workaround for #4055
// Add another global to avoid noConflict issues with inline event handlers
window["DP_jQuery_" + dpuuid] = $;
})(jQuery); })(jQuery);