Merge pull request #318 from sarxos/dev

Remove unused variables, fix validation warnings
This commit is contained in:
Trent Richardson 2012-02-15 05:06:39 -08:00
commit 978cc0cb98

View file

@ -163,8 +163,8 @@ $.extend(Timepicker.prototype, {
},
timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
});
tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) { return val.toUpperCase() });
tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) { return val.toUpperCase() });
tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) { return val.toUpperCase(); });
tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) { return val.toUpperCase(); });
if (tp_inst._defaults.timezoneList === null) {
var timezoneList = [];
@ -314,7 +314,7 @@ $.extend(Timepicker.prototype, {
$.merge(markers, o.amNames);
if (o.pmNames)
$.merge(markers, o.pmNames);
markers = $.map(markers, function(val) { return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&') });
markers = $.map(markers, function(val) { return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&'); });
return '(' + markers.join('|') + ')?';
},
@ -364,7 +364,7 @@ $.extend(Timepicker.prototype, {
minuteGridSize = 0,
secondGridSize = 0,
millisecGridSize = 0,
size;
size = null;
// Hours
html += '<dd class="ui_tpicker_hour"><div id="ui_tpicker_hour_' + dp_id + '"' +
@ -909,7 +909,6 @@ $.fn.extend({
//########################################################################
datetimepicker: function(o) {
o = o || {};
var $input = this,
tmp_args = arguments;
if (typeof(o) == 'string'){
@ -975,7 +974,7 @@ $.datepicker.formatTime = function(format, time, options) {
tmptime = $.trim(tmptime);
return tmptime;
}
};
//########################################################################
// the bad hack :/ override datepicker so it doesnt close on select
@ -1248,10 +1247,7 @@ $.datepicker.parseDate = function(format, value, settings) {
$.datepicker._base_formatDate = $.datepicker._formatDate;
$.datepicker._formatDate = function(inst, day, month, year){
var tp_inst = this._get(inst, 'timepicker');
if(tp_inst)
{
if(day)
var b = this._base_formatDate(inst, day, month, year);
if(tp_inst) {
tp_inst._updateDateTime(inst);
return tp_inst.$input.val();
}
@ -1266,7 +1262,7 @@ $.datepicker._optionDatepicker = function(target, name, value) {
var inst = this._getInst(target),
tp_inst = this._get(inst, 'timepicker');
if (tp_inst) {
var min,max,onselect;
var min = null, max = null, onselect = null;
if (typeof name == 'string') { // if min/max was set with the string
if (name === 'minDate' || name === 'minDateTime' )
min = value;
@ -1299,8 +1295,7 @@ $.datepicker._optionDatepicker = function(target, name, value) {
max= new Date(max);
tp_inst._defaults.maxDate = max;
tp_inst._defaults.maxDateTime = max;
}
else if (onselect)
} else if (onselect)
tp_inst._defaults.onSelect = onselect;
}
if (value === undefined)
@ -1323,4 +1318,3 @@ $.timepicker = new Timepicker(); // singleton instance
$.timepicker.version = "1.0.0";
})(jQuery);