Skip to content

Commit d3e02bc

Browse files
Nicolas ConnaultNicolas Connault
authored andcommitted
Fixed the whitespace issue in my previous commit
1 parent e817eab commit d3e02bc

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
@@ -31,7 +31,7 @@
3131
}
3232
});
3333

34-
/*
34+
/*
3535
* Timepicker manager.
3636
* Use the singleton instance of this class, $.timepicker, to interact with the time picker.
3737
* Settings for (groups of) time pickers are maintained in an instance object,
@@ -139,7 +139,7 @@
139139
units: ['hour','minute','second','millisec'],
140140
control: null,
141141

142-
/*
142+
/*
143143
* Override the default settings for all instances of the time picker.
144144
* @param settings object - the new settings to use as defaults (anonymous object)
145145
* @return the manager object
@@ -216,13 +216,13 @@
216216
tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];
217217
}
218218
// controlType is an object and must implement create, options, value methods
219-
else{
219+
else{
220220
tp_inst.control = tp_inst._defaults.controlType;
221221
}
222222

223223
if (tp_inst._defaults.timezoneList === null) {
224-
var timezoneList = ['-1200', '-1100', '-1000', '-0930', '-0900', '-0800', '-0700', '-0600', '-0500', '-0430', '-0400', '-0330', '-0300', '-0200', '-0100', '+0000',
225-
'+0100', '+0200', '+0300', '+0330', '+0400', '+0430', '+0500', '+0530', '+0545', '+0600', '+0630', '+0700', '+0800', '+0845', '+0900', '+0930',
224+
var timezoneList = ['-1200', '-1100', '-1000', '-0930', '-0900', '-0800', '-0700', '-0600', '-0500', '-0430', '-0400', '-0330', '-0300', '-0200', '-0100', '+0000',
225+
'+0100', '+0200', '+0300', '+0330', '+0400', '+0430', '+0500', '+0530', '+0545', '+0600', '+0630', '+0700', '+0800', '+0845', '+0900', '+0930',
226226
'+1000', '+1030', '+1100', '+1130', '+1200', '+1245', '+1300', '+1400'];
227227

228228
if (tp_inst._defaults.timezoneIso8601) {
@@ -340,7 +340,7 @@
340340
// Prevent displaying twice
341341
if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
342342
var noDisplay = ' style="display:none;"',
343-
html = '<div class="ui-timepicker-div'+ (o.isRTL? ' ui-timepicker-rtl' : '') +'"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
343+
html = '<div class="ui-timepicker-div'+ (o.isRTL? ' ui-timepicker-rtl' : '') +'"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
344344
'<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>';
345345

346346
// Create the markup
@@ -353,7 +353,7 @@
353353
max[litem] = parseInt((o[litem+'Max'] - ((o[litem+'Max'] - o[litem+'Min']) % o['step'+uitem])), 10);
354354
gridSize[litem] = 0;
355355

356-
html += '<dt class="ui_tpicker_'+ litem +'_label"' + ((o['show'+uitem]) ? '' : noDisplay) + '>' + o[litem +'Text'] + '</dt>' +
356+
html += '<dt class="ui_tpicker_'+ litem +'_label"' + ((o['show'+uitem]) ? '' : noDisplay) + '>' + o[litem +'Text'] + '</dt>' +
357357
'<dd class="ui_tpicker_'+ litem +'"><div class="ui_tpicker_'+ litem +'_slider"' + ((o['show'+uitem]) ? '' : noDisplay) + '></div>';
358358

359359
if (o['show'+uitem] && o[litem+'Grid'] > 0) {
@@ -391,7 +391,7 @@
391391
}
392392
html += '</dd>';
393393
}
394-
394+
395395
// Timezone
396396
html += '<dt class="ui_tpicker_timezone_label"' + ((o.showTimezone) ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
397397
html += '<dd class="ui_tpicker_timezone" ' + ((o.showTimezone) ? '' : noDisplay) + '></dd>';
@@ -405,12 +405,12 @@
405405
$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>');
406406
$dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
407407
}
408-
408+
409409
// add sliders, adjust grids, add events
410410
for(var i=0,l=tp_inst.units.length; i<l; i++){
411411
litem = tp_inst.units[i];
412412
uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
413-
413+
414414
// add the slider
415415
tp_inst[litem+'_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_'+litem+'_slider'), litem, tp_inst[litem], o[litem+'Min'], max[litem], o['step'+uitem]);
416416

@@ -482,7 +482,7 @@
482482
tp_inst._onTimeChange();
483483
});
484484
// End timezone options
485-
485+
486486
// inject timepicker into datepicker
487487
var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
488488
if ($buttonPanel.length) {
@@ -504,7 +504,7 @@
504504
var sliderAccessArgs = this._defaults.sliderAccessArgs,
505505
rtl = this._defaults.isRTL;
506506
sliderAccessArgs.isRTL = rtl;
507-
507+
508508
setTimeout(function() { // fix for inline mode
509509
if ($tp.find('.ui-slider-access').length === 0) {
510510
$tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
@@ -700,8 +700,8 @@
700700

701701
// If the update was done in the input field, the input field should not be updated.
702702
// If the update was done using the sliders, update the input field.
703-
var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec
704-
|| (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))
703+
var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec
704+
|| (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))
705705
|| ((this.timezone === null && timezone != this.defaultTimezone) || (this.timezone !== null && timezone != this.timezone)));
706706

707707
if (hasChanged) {
@@ -845,7 +845,7 @@
845845
stop: function(event, ui) {
846846
tp_inst._onSelectHandler();
847847
}
848-
});
848+
});
849849
},
850850
options: function(tp_inst, obj, opts, val){
851851
if(tp_inst._defaults.isRTL){
@@ -857,7 +857,7 @@
857857
}
858858
return obj.slider(opts);
859859
}
860-
var min = opts.min,
860+
var min = opts.min,
861861
max = opts.max;
862862
opts.min = opts.max = null;
863863
if(min !== undefined)
@@ -888,7 +888,7 @@
888888
ul = tp_inst._defaults.timeFormat.indexOf('t') !== -1? 'toLowerCase':'toUpperCase',
889889
m = 0;
890890

891-
for(var i=min; i<=max; i+=step){
891+
for(var i=min; i<=max; i+=step){
892892
sel += '<option value="'+ i +'"'+ (i==val? ' selected':'') +'>';
893893
if(unit == 'hour' && tp_inst._defaults.ampm){
894894
m = i%12;
@@ -918,7 +918,7 @@
918918
if(typeof(opts) == 'string'){
919919
if(val === undefined)
920920
return $t.data(opts);
921-
o[opts] = val;
921+
o[opts] = val;
922922
}
923923
else o = opts;
924924
return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
@@ -995,7 +995,7 @@
995995
* Public utility to parse time
996996
*/
997997
$.datepicker.parseTime = function(timeFormat, timeString, options) {
998-
998+
999999
// pattern for standard and localized AM/PM markers
10001000
var getPatternAmpm = function(amNames, pmNames) {
10011001
var markers = [];
@@ -1269,11 +1269,11 @@
12691269
.replace(/tT/g, ampm ? 'AaPpMm' : '')
12701270
.replace(/T/g, ampm ? 'AP' : '')
12711271
.replace(/tt/g, ampm ? 'apm' : '')
1272-
.replace(/t/g, ampm ? 'ap' : '') +
1273-
" " + tp_inst._defaults.separator +
1274-
tp_inst._defaults.timeSuffix +
1275-
(tp_inst._defaults.showTimezone ? tp_inst._defaults.timezoneList.join('') : '') +
1276-
(tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
1272+
.replace(/t/g, ampm ? 'ap' : '') +
1273+
" " + tp_inst._defaults.separator +
1274+
tp_inst._defaults.timeSuffix +
1275+
(tp_inst._defaults.showTimezone ? tp_inst._defaults.timezoneList.join('') : '') +
1276+
(tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
12771277
dateChars,
12781278
chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
12791279
return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
@@ -1296,11 +1296,11 @@
12961296
var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,
12971297
date = this._getDate(inst),
12981298
formatCfg = $.datepicker._getFormatConfig(inst),
1299-
altFormattedDateTime = '',
1300-
altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
1299+
altFormattedDateTime = '',
1300+
altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
13011301
altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,
13021302
altTimeFormat = tp_inst._defaults.altTimeFormat !== undefined ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;
1303-
1303+
13041304
altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;
13051305
if(!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly){
13061306
if(tp_inst._defaults.altFormat)
@@ -1397,7 +1397,7 @@
13971397
tp_inst.second = date ? date.getSeconds() : defaults.second;
13981398
tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
13991399

1400-
//check if within min/max times..
1400+
//check if within min/max times..
14011401
tp_inst._limitMinMaxDateTime(inst, true);
14021402

14031403
tp_inst._onTimeChange();
@@ -1623,7 +1623,7 @@
16231623
}
16241624

16251625
/*
1626-
* Splits datetime string into date and time substrings.
1626+
* Splits datetime string into date ans time substrings.
16271627
* Throws exception when date can't be parsed
16281628
* Returns [dateString, timeString]
16291629
*/
@@ -1809,7 +1809,7 @@
18091809
selected(this, startTime, 'maxDate');
18101810
}
18111811
}, options, options.end));
1812-
// timepicker doesn't provide access to its 'timeFormat' option,
1812+
// timepicker doesn't provide access to its 'timeFormat' option,
18131813
// nor could I get datepicker.formatTime() to behave with times, so I
18141814
// have disabled reformatting for timepicker
18151815
if (method != 'timepicker' && options.reformat) {

0 commit comments

Comments
 (0)