Skip to content

Commit 3fb4aed

Browse files
committed
Remove spaces and unneeded lines.
1 parent 4496926 commit 3fb4aed

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
* By: Trent Richardson [http://trentrichardson.com]
44
* Version 0.9.6
55
* Last Modified: 07/20/2011
6-
*
6+
*
77
* Copyright 2011 Trent Richardson
88
* Dual licensed under the MIT and GPL licenses.
99
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
1010
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
11-
*
11+
*
1212
* HERES THE CSS:
1313
* .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
1414
* .ui-timepicker-div dl{ text-align: left; }
@@ -121,7 +121,7 @@ $.extend(Timepicker.prototype, {
121121
_newInst: function($input, o) {
122122
var tp_inst = new Timepicker(),
123123
inlineSettings = {};
124-
124+
125125
for (var attrName in this._defaults) {
126126
var attrValue = $input.attr('time:' + attrName);
127127
if (attrValue) {
@@ -162,7 +162,7 @@ $.extend(Timepicker.prototype, {
162162
tp_inst.$altInput = $(o.altField)
163163
.css({ cursor: 'pointer' })
164164
.focus(function(){ $input.trigger("focus"); });
165-
165+
166166
// datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
167167
if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date)
168168
tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
@@ -172,7 +172,7 @@ $.extend(Timepicker.prototype, {
172172
tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
173173
if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date)
174174
tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
175-
175+
176176
return tp_inst;
177177
},
178178

@@ -181,7 +181,7 @@ $.extend(Timepicker.prototype, {
181181
//########################################################################
182182
_addTimePicker: function(dp_inst) {
183183
var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ?
184-
this.$input.val() + ' ' + this.$altInput.val() :
184+
this.$input.val() + ' ' + this.$altInput.val() :
185185
this.$input.val();
186186

187187
this.timeDefined = this._parseTime(currDT);
@@ -213,7 +213,7 @@ $.extend(Timepicker.prototype, {
213213
var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g");
214214
regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator.replace(specials, "\\$&") + regstr;
215215
}
216-
216+
217217
treg = timeString.match(new RegExp(regstr, 'i'));
218218

219219
if (treg) {
@@ -223,17 +223,17 @@ $.extend(Timepicker.prototype, {
223223
(treg[order.t].charAt(0).toUpperCase() == 'A') ? 'AM' : 'PM').toUpperCase();
224224

225225
if (order.h !== -1) {
226-
if (this.ampm == 'AM' && treg[order.h] == '12')
226+
if (this.ampm == 'AM' && treg[order.h] == '12')
227227
this.hour = 0; // 12am = 0 hour
228-
else if (this.ampm == 'PM' && treg[order.h] != '12')
228+
else if (this.ampm == 'PM' && treg[order.h] != '12')
229229
this.hour = (parseFloat(treg[order.h]) + 12).toFixed(0); // 12pm = 12 hour, any other pm = hour + 12
230230
else this.hour = Number(treg[order.h]);
231231
}
232232

233233
if (order.m !== -1) this.minute = Number(treg[order.m]);
234234
if (order.s !== -1) this.second = Number(treg[order.s]);
235235
if (order.z !== -1) this.timezone = treg[order.z];
236-
236+
237237
return true;
238238

239239
}
@@ -285,7 +285,7 @@ $.extend(Timepicker.prototype, {
285285
minuteGridSize = 0,
286286
secondGridSize = 0,
287287
size;
288-
288+
289289
if (o.showHour && o.hourGrid > 0) {
290290
html += '<dd class="ui_tpicker_hour">' +
291291
'<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
@@ -345,7 +345,7 @@ $.extend(Timepicker.prototype, {
345345
'</dd>';
346346
} else html += '<dd class="ui_tpicker_second" id="ui_tpicker_second_' + dp_id + '"' +
347347
((o.showSecond) ? '' : noDisplay) + '></dd>';
348-
348+
349349
html += '<dt class="ui_tpicker_timezone_label" id="ui_tpicker_timezone_label_' + dp_id + '"' +
350350
((o.showTimezone) ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
351351
html += '<dd class="ui_tpicker_timezone" id="ui_tpicker_timezone_' + dp_id + '"' +
@@ -401,8 +401,8 @@ $.extend(Timepicker.prototype, {
401401
tp_inst._onTimeChange();
402402
}
403403
});
404-
405-
404+
405+
406406
this.timezone_select = $tp.find('#ui_tpicker_timezone_'+ dp_id).append('<select></select>').find("select");
407407
$.fn.append.apply(this.timezone_select,
408408
$.map(o.timezoneList, function(val, idx) {
@@ -510,7 +510,7 @@ $.extend(Timepicker.prototype, {
510510
},
511511

512512
//########################################################################
513-
// This function tries to limit the ability to go outside the
513+
// This function tries to limit the ability to go outside the
514514
// min/max date range
515515
//########################################################################
516516
_limitMinMaxDateTime: function(dp_inst, adjustSliders){
@@ -555,7 +555,7 @@ $.extend(Timepicker.prototype, {
555555
if($.datepicker._get(dp_inst, 'maxDateTime') !== null && dp_date){
556556
var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
557557
maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
558-
558+
559559
if(this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null){
560560
this.hourMaxOriginal = o.hourMax;
561561
this.minuteMaxOriginal = o.minuteMax;
@@ -600,7 +600,7 @@ $.extend(Timepicker.prototype, {
600600

601601
},
602602

603-
603+
604604
//########################################################################
605605
// when a slider moves, set the internal time...
606606
// on time change is also called when the time is updated in the text field
@@ -625,28 +625,28 @@ $.extend(Timepicker.prototype, {
625625
// If the update was done in the input field, the input field should not be updated.
626626
// If the update was done using the sliders, update the input field.
627627
var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || (this.ampm.length > 0 && this.ampm != ampm) || timezone != this.timezone);
628-
628+
629629
if (hasChanged) {
630630

631631
if (hour !== false)this.hour = hour;
632632
if (minute !== false) this.minute = minute;
633633
if (second !== false) this.second = second;
634634
if (timezone !== false) this.timezone = timezone;
635-
635+
636636
if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]);
637-
637+
638638
this._limitMinMaxDateTime(this.inst, true);
639639
}
640640
if (this._defaults.ampm) this.ampm = ampm;
641-
641+
642642
this._formatTime();
643643
if (this.$timeObj) this.$timeObj.text(this.formattedTime + this._defaults.timeSuffix);
644644
this.timeDefined = true;
645645
if (hasChanged) this._updateDateTime();
646646
},
647-
647+
648648
//########################################################################
649-
// call custom onSelect.
649+
// call custom onSelect.
650650
// bind to sliders slidestop, and grid click.
651651
//########################################################################
652652
_onSelectHandler: function() {
@@ -731,7 +731,7 @@ $.extend(Timepicker.prototype, {
731731
} else {
732732
this.$input.val(formattedDateTime);
733733
}
734-
734+
735735
this.$input.trigger("change");
736736
}
737737

@@ -761,9 +761,9 @@ $.fn.extend({
761761
tmp_args = arguments;
762762

763763
if (typeof(o) == 'string'){
764-
if(o == 'getDate')
764+
if(o == 'getDate')
765765
return $.fn.datepicker.apply($(this[0]), tmp_args);
766-
else
766+
else
767767
return this.each(function() {
768768
var $t = $(this);
769769
$t.datepicker.apply($t, tmp_args);
@@ -815,9 +815,9 @@ $.datepicker._updateDatepicker = function(inst) {
815815
}
816816

817817
if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {
818-
818+
819819
this._base_updateDatepicker(inst);
820-
820+
821821
// Reload the time control when changing something in the input text field.
822822
var tp_inst = this._get(inst, 'timepicker');
823823
if(tp_inst) tp_inst._addTimePicker(inst);
@@ -853,7 +853,7 @@ $.datepicker._doKeyPress = function(event) {
853853
return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
854854
}
855855
}
856-
856+
857857
return $.datepicker._base_doKeyPress(event);
858858
};
859859

@@ -1027,7 +1027,7 @@ $.datepicker._optionDatepicker = function(target, name, value) {
10271027
if (tp_inst) {
10281028
//Set minimum and maximum date values if we have timepicker
10291029
if(name==='minDate') {
1030-
if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date)
1030+
if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date)
10311031
tp_inst._defaults.minDateTime = new Date(value);
10321032
if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date)
10331033
tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());

0 commit comments

Comments
 (0)