| 
10 | 10 |  * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt  | 
11 | 11 |  */  | 
12 | 12 | 
 
  | 
13 |  | -/*jslint evil: true, white: false, undef: false */  | 
14 |  | - | 
15 | 13 | (function ($) {  | 
16 | 14 | 
 
  | 
17 | 15 | 	/*  | 
 | 
756 | 754 | 
 
  | 
757 | 755 | 			// If the update was done in the input field, the input field should not be updated.  | 
758 | 756 | 			// If the update was done using the sliders, update the input field.  | 
759 |  | -			var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec || microsec != this.microsec  | 
760 |  | -								|| (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))   | 
761 |  | -								|| (this.timezone !== null && timezone != this.timezone));  | 
 | 757 | +			var hasChanged = (hour !== this.hour || minute !== this.minute || second !== this.second || millisec !== this.millisec || microsec !== this.microsec ||   | 
 | 758 | +					(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || (this.timezone !== null && timezone !== this.timezone));  | 
762 | 759 | 
 
  | 
763 | 760 | 			if (hasChanged) {  | 
764 | 761 | 
 
  | 
 | 
1358 | 1355 | 
 
  | 
1359 | 1356 | 		// don't popup the datepicker if there is another instance already opened  | 
1360 | 1357 | 		var input = inst.input[0];  | 
1361 |  | -		if ($.datepicker._curInst && $.datepicker._curInst != inst && $.datepicker._datepickerShowing && $.datepicker._lastInput != input) {  | 
 | 1358 | +		if ($.datepicker._curInst && $.datepicker._curInst !== inst && $.datepicker._datepickerShowing && $.datepicker._lastInput !== input) {  | 
1362 | 1359 | 			return;  | 
1363 | 1360 | 		}  | 
1364 | 1361 | 
 
  | 
 | 
1410 | 1407 | 
 
  | 
1411 | 1408 | 	/*  | 
1412 | 1409 | 	* Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField  | 
 | 1410 | +	* Update any alternate field to synchronise with the main field.  | 
1413 | 1411 | 	*/  | 
1414 | 1412 | 	$.datepicker._base_updateAlternate = $.datepicker._updateAlternate;  | 
1415 |  | -	/* Update any alternate field to synchronise with the main field. */  | 
1416 | 1413 | 	$.datepicker._updateAlternate = function (inst) {  | 
1417 | 1414 | 		var tp_inst = this._get(inst, 'timepicker');  | 
1418 | 1415 | 		if (tp_inst) {  | 
 | 
1452 | 1449 | 			tp_inst = $.datepicker._get(inst, 'timepicker');  | 
1453 | 1450 | 
 
  | 
1454 | 1451 | 		if (tp_inst) {  | 
1455 |  | -			if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {  | 
 | 1452 | +			if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) {  | 
1456 | 1453 | 				try {  | 
1457 | 1454 | 					$.datepicker._updateDatepicker(inst);  | 
1458 | 1455 | 				} catch (err) {  | 
 | 
1803 | 1800 | 	var detectSupport = function (timeFormat) {  | 
1804 | 1801 | 		var tf = timeFormat.replace(/'.*?'/g, '').toLowerCase(), // removes literals  | 
1805 | 1802 | 			isIn = function (f, t) { // does the format contain the token?  | 
1806 |  | -					return !!(f.indexOf(t) !== -1);  | 
 | 1803 | +					return f.indexOf(t) !== -1 ? true : false;  | 
1807 | 1804 | 				};  | 
1808 | 1805 | 		return {  | 
1809 | 1806 | 				hour: isIn(tf, 'h'),  | 
 | 
2098 | 2095 | 	 */  | 
2099 | 2096 | 	$.timepicker.log = function (err) {  | 
2100 | 2097 | 		if (window.console) {  | 
2101 |  | -			console.log(err);  | 
 | 2098 | +			window.console.log(err);  | 
2102 | 2099 | 		}  | 
2103 | 2100 | 	};  | 
2104 | 2101 | 
 
  | 
 | 
0 commit comments