From fae432b17d899fe67f101662478a1ddcb5c428bd Mon Sep 17 00:00:00 2001 From: Trent Richardson Date: Sun, 2 Oct 2011 09:52:31 -0400 Subject: [PATCH 1/4] Updated Last Mod Date --- jquery-ui-timepicker-addon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 28c73c8..ca506d5 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -2,7 +2,7 @@ * jQuery timepicker addon * By: Trent Richardson [http://trentrichardson.com] * Version 0.9.7 -* Last Modified: 07/23/2011 +* Last Modified: 10/02/2011 * * Copyright 2011 Trent Richardson * Dual licensed under the MIT and GPL licenses. From ff6596d67350e3e2c1a124efabb4808a98c3a6e5 Mon Sep 17 00:00:00 2001 From: Trent Date: Mon, 3 Oct 2011 16:50:41 -0400 Subject: [PATCH 2/4] Fix localization --- localization/jquery-ui-timepicker-pt-BR.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localization/jquery-ui-timepicker-pt-BR.js b/localization/jquery-ui-timepicker-pt-BR.js index 63143a1..b043ad8 100644 --- a/localization/jquery-ui-timepicker-pt-BR.js +++ b/localization/jquery-ui-timepicker-pt-BR.js @@ -8,7 +8,7 @@ minuteText: 'Minutos', secondText: 'Segundos', millisecText: 'Milissegundos', - timezoneText: 'Fuso horário', + timezoneText: 'Fuso horário', currentText: 'Agora', closeText: 'Fechar', timeFormat: 'hh:mm', From ac38588138c1c91b766a48a9c97f1f8dae0ca450 Mon Sep 17 00:00:00 2001 From: Trent Richardson Date: Sun, 4 Dec 2011 09:45:23 -0500 Subject: [PATCH 3/4] sliderAccess tweak --- jquery-ui-timepicker-addon.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 1a4877f..752e908 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -639,20 +639,22 @@ $.extend(Timepicker.prototype, { if (this._defaults.addSliderAccess){ var sliderAccessArgs = this._defaults.sliderAccessArgs; setTimeout(function(){ // fix for inline mode - $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs); + if($tp.find('.ui-slider-access').length == 0){ + $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs); - // fix any grids since sliders are shorter - var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true); - if(sliderAccessWidth){ - $tp.find('table:visible').each(function(){ - var $g = $(this), - oldWidth = $g.outerWidth(), - oldMarginLeft = $g.css('marginLeft').toString().replace('%',''), - newWidth = oldWidth - sliderAccessWidth, - newMarginLeft = ((oldMarginLeft * newWidth)/oldWidth) + '%'; + // fix any grids since sliders are shorter + var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true); + if(sliderAccessWidth){ + $tp.find('table:visible').each(function(){ + var $g = $(this), + oldWidth = $g.outerWidth(), + oldMarginLeft = $g.css('marginLeft').toString().replace('%',''), + newWidth = oldWidth - sliderAccessWidth, + newMarginLeft = ((oldMarginLeft * newWidth)/oldWidth) + '%'; - $g.css({ width: newWidth, marginLeft: newMarginLeft }); - }); + $g.css({ width: newWidth, marginLeft: newMarginLeft }); + }); + } } },0); } From 21bcc3c07b1926630f125ad715b75868695abdf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Windsor?= Date: Sun, 4 Dec 2011 16:02:41 +0100 Subject: [PATCH 4/4] Fixes option setter override so it doesn't break option getter. --- jquery-ui-timepicker-addon.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 752e908..ce9436c 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -1276,7 +1276,9 @@ $.datepicker._optionDatepicker = function(target, name, value) { else if (onselect) tp_inst._defaults.onSelect=onselect; } - this._base_optionDatepicker(target, name, value); + if (value === undefined) + return this._base_optionDatepicker(target, name); + return this._base_optionDatepicker(target, name, value); }; //#######################################################################################