From d2d301f074f814871a68e4c386bf619908f188c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 12 Feb 2012 09:27:54 -0500 Subject: [PATCH] Datepicker: Use 'that' instead of 'self'. Partial fix for #5404 - remove uses of 'var self = this;' --- ui/jquery.ui.datepicker.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 034ad774e..07aeeadd0 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -711,8 +711,7 @@ $.extend(Datepicker.prototype, { /* Generate the date picker content. */ _updateDatepicker: function(inst) { - var self = this; - self.maxRows = 4; //Reset the max number of rows being displayed (see #7043) + this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) var borders = $.datepicker._getBorders(inst.dpDiv); instActive = inst; // for delegate hover events inst.dpDiv.empty().append(this._generateHTML(inst)); @@ -802,10 +801,10 @@ $.extend(Datepicker.prototype, { if (this._datepickerShowing) { var showAnim = this._get(inst, 'showAnim'); var duration = this._get(inst, 'duration'); - var self = this; + var that = this; var postProcess = function() { $.datepicker._tidyDialog(inst); - self._curInst = null; + that._curInst = null; }; // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed