Datepicker: Use 'that' instead of 'self'. Partial fix for #5404 - remove uses of 'var self = this;'

This commit is contained in:
Scott González 2012-02-12 09:27:54 -05:00
parent 41a1472469
commit d2d301f074

View File

@ -711,8 +711,7 @@ $.extend(Datepicker.prototype, {
/* Generate the date picker content. */ /* Generate the date picker content. */
_updateDatepicker: function(inst) { _updateDatepicker: function(inst) {
var self = this; this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
self.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
var borders = $.datepicker._getBorders(inst.dpDiv); var borders = $.datepicker._getBorders(inst.dpDiv);
instActive = inst; // for delegate hover events instActive = inst; // for delegate hover events
inst.dpDiv.empty().append(this._generateHTML(inst)); inst.dpDiv.empty().append(this._generateHTML(inst));
@ -802,10 +801,10 @@ $.extend(Datepicker.prototype, {
if (this._datepickerShowing) { if (this._datepickerShowing) {
var showAnim = this._get(inst, 'showAnim'); var showAnim = this._get(inst, 'showAnim');
var duration = this._get(inst, 'duration'); var duration = this._get(inst, 'duration');
var self = this; var that = this;
var postProcess = function() { var postProcess = function() {
$.datepicker._tidyDialog(inst); $.datepicker._tidyDialog(inst);
self._curInst = null; that._curInst = null;
}; };
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed