From 3649e6a830dbb6b4ddab73966944cdfe679f3ad2 Mon Sep 17 00:00:00 2001 From: Trent Richardson Date: Thu, 12 May 2011 13:36:37 -0400 Subject: [PATCH 01/13] Create new dev version --- 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 c22a5ad..3e52042 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -1,7 +1,7 @@ /* * jQuery timepicker addon * By: Trent Richardson [http://trentrichardson.com] -* Version 0.9.4 +* Version 0.9.5-dev * Last Modified: 05/12/2011 * * Copyright 2011 Trent Richardson From 8cbc6dc869a8e7fbe6040ae0cd0bbd18a6888c83 Mon Sep 17 00:00:00 2001 From: Trent Date: Thu, 19 May 2011 19:44:39 -0400 Subject: [PATCH 02/13] Added ThomasLangston pull request from master for different case am/pm --- jquery-ui-timepicker-addon.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 3e52042..4efe487 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -660,6 +660,8 @@ $.extend(Timepicker.prototype, { .replace(/ss/g, ((time.second < 10) ? '0' : '') + time.second) .replace(/s/g, time.second) .replace(/TT/g, time.ampm.toUpperCase()) + .replace(/Tt/g, time.ampm.toUpperCase()) + .replace(/tT/g, time.ampm.toLowerCase()) .replace(/tt/g, time.ampm.toLowerCase()) .replace(/T/g, time.ampm.charAt(0).toUpperCase()) .replace(/t/g, time.ampm.charAt(0).toLowerCase()) @@ -810,6 +812,8 @@ $.datepicker._doKeyPress = function(event) { datetimeChars = tp_inst._defaults.timeFormat.toString() .replace(/[hms]/g, '') .replace(/TT/g, ampm ? 'APM' : '') + .replace(/Tt/g, ampm ? 'AaPpMm' : '') + .replace(/tT/g, ampm ? 'AaPpMm' : '') .replace(/T/g, ampm ? 'AP' : '') .replace(/tt/g, ampm ? 'apm' : '') .replace(/t/g, ampm ? 'ap' : '') + From c3e1143ce9312146b59c00dd0168297284d565a9 Mon Sep 17 00:00:00 2001 From: Trent Date: Thu, 19 May 2011 19:53:38 -0400 Subject: [PATCH 03/13] Added localizations for Dutch and Russian --- localization/jquery-ui-timepicker-nl.js | 11 +++++++++++ localization/jquery-ui-timepicker-ru.js | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 localization/jquery-ui-timepicker-nl.js create mode 100644 localization/jquery-ui-timepicker-ru.js diff --git a/localization/jquery-ui-timepicker-nl.js b/localization/jquery-ui-timepicker-nl.js new file mode 100644 index 0000000..2d5104d --- /dev/null +++ b/localization/jquery-ui-timepicker-nl.js @@ -0,0 +1,11 @@ +$.timepicker.regional.nl = { + timeOnlyTitle: 'Tijdstip', + timeText: 'Tijd', + hourText: 'Uur', + minuteText: 'Minuut', + secondText: 'Seconde', + currentText: 'Vandaag', + closeText: 'Sluiten', + ampm: false +}; +$.timepicker.setDefaults($.timepicker.regional.nl); diff --git a/localization/jquery-ui-timepicker-ru.js b/localization/jquery-ui-timepicker-ru.js new file mode 100644 index 0000000..a6253ff --- /dev/null +++ b/localization/jquery-ui-timepicker-ru.js @@ -0,0 +1,11 @@ +$.timepicker.regional.ru = { + timeOnlyTitle: 'Выберите время', + timeText: 'Время', + hourText: 'Часы', + minuteText: 'Минуты', + secondText: 'Секунды', + currentText: 'Теперь', + closeText: 'Закрыть', + ampm: false +}; +$.timepicker.setDefaults($.timepicker.regional.ru); From 8c6977388d9b7b234b7f91687323192809ccc094 Mon Sep 17 00:00:00 2001 From: Trent Date: Thu, 19 May 2011 19:56:13 -0400 Subject: [PATCH 04/13] updated css margin per vanderlee contribution --- jquery-ui-timepicker-addon.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery-ui-timepicker-addon.css b/jquery-ui-timepicker-addon.css index 19b889f..6995268 100644 --- a/jquery-ui-timepicker-addon.css +++ b/jquery-ui-timepicker-addon.css @@ -1,5 +1,5 @@ .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } .ui-timepicker-div dl { text-align: left; } .ui-timepicker-div dl dt { height: 25px; } -.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; } +.ui-timepicker-div dl dd { margin: -25px 10px 10px 65px; } .ui-timepicker-div td { font-size: 90%; } From 97fd6eb419ea49a0c82dfe3dfeb33c64bd4c2bf3 Mon Sep 17 00:00:00 2001 From: Trent Date: Thu, 19 May 2011 20:05:34 -0400 Subject: [PATCH 05/13] Fixed missing semicolons --- jquery-ui-timepicker-addon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 4efe487..01ffb64 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -501,7 +501,7 @@ $.extend(Timepicker.prototype, { //Emulate datepicker onSelect behavior. Call on slidestop. var onSelectDelegate = function() { tp_inst._onSelectHandler(); - } + }; this.hour_slider.bind('slidestop',onSelectDelegate); this.minute_slider.bind('slidestop',onSelectDelegate); this.second_slider.bind('slidestop',onSelectDelegate); @@ -601,7 +601,7 @@ $.extend(Timepicker.prototype, { var hour = (this.hour_slider) ? this.hour_slider.slider('value') : false, minute = (this.minute_slider) ? this.minute_slider.slider('value') : false, second = (this.second_slider) ? this.second_slider.slider('value') : false, - timezone = (this.timezone_select) ? this.timezone_select.val() : false + timezone = (this.timezone_select) ? this.timezone_select.val() : false; if (hour !== false) hour = parseInt(hour,10); if (minute !== false) minute = parseInt(minute,10); From a4e9d837993246b5c488a7447063d23c4ba256d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Vod=C3=A1=C4=8Dek?= Date: Fri, 20 May 2011 10:06:30 +0200 Subject: [PATCH 06/13] added Czech localization --- localization/jquery-ui-timepicker-cs.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 localization/jquery-ui-timepicker-cs.js diff --git a/localization/jquery-ui-timepicker-cs.js b/localization/jquery-ui-timepicker-cs.js new file mode 100644 index 0000000..22d21fc --- /dev/null +++ b/localization/jquery-ui-timepicker-cs.js @@ -0,0 +1,12 @@ +$.timepicker.regional.cs = { + timeOnlyTitle: 'Vyberte čas', + timeText: 'Čas', + hourText: 'Hodiny', + minuteText: 'Minuty', + secondText: 'Vteřiny', + currentText: 'Nyní', + closeText: 'Zavřít', + timeFormat: 'h:m', + ampm: false +}; +$.timepicker.setDefaults($.timepicker.regional.cs); From 643f20f065634b13b682dfda3111b50b57be6faf Mon Sep 17 00:00:00 2001 From: Trent Date: Sun, 22 May 2011 08:32:10 -0400 Subject: [PATCH 07/13] Updated comments --- README | 3 +++ localization/jquery-ui-timepicker-nl.js | 8 ++++++-- localization/jquery-ui-timepicker-ru.js | 8 ++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README b/README index c3cf645..cb026f5 100644 --- a/README +++ b/README @@ -1,5 +1,8 @@ jQuery Timepicker Addon +======================= +Use +--- -To use this plugin you must include jQuery and jQuery UI with datepicker and slider -Include timepicker-addon script -now use timepicker with $('#selector').datetimepicker() or $('#selector').timepicker() diff --git a/localization/jquery-ui-timepicker-nl.js b/localization/jquery-ui-timepicker-nl.js index 2d5104d..4a71d1c 100644 --- a/localization/jquery-ui-timepicker-nl.js +++ b/localization/jquery-ui-timepicker-nl.js @@ -1,11 +1,15 @@ -$.timepicker.regional.nl = { +/* Dutch translation for the jQuery Timepicker Addon */ +/* Written by Martijn van der Lee */ +$.timepicker.regional['nl'] = { timeOnlyTitle: 'Tijdstip', timeText: 'Tijd', hourText: 'Uur', minuteText: 'Minuut', secondText: 'Seconde', + timezoneText: 'Tijdzone', currentText: 'Vandaag', closeText: 'Sluiten', + timeFormat: 'hh:mm tt', ampm: false }; -$.timepicker.setDefaults($.timepicker.regional.nl); +$.timepicker.setDefaults($.timepicker.regional['nl']); diff --git a/localization/jquery-ui-timepicker-ru.js b/localization/jquery-ui-timepicker-ru.js index a6253ff..54e3e0e 100644 --- a/localization/jquery-ui-timepicker-ru.js +++ b/localization/jquery-ui-timepicker-ru.js @@ -1,11 +1,15 @@ -$.timepicker.regional.ru = { +/* Russian translation for the jQuery Timepicker Addon */ +/* Written by Trent Richardson */ +$.timepicker.regional['ru'] = { timeOnlyTitle: 'Выберите время', timeText: 'Время', hourText: 'Часы', minuteText: 'Минуты', secondText: 'Секунды', + timezoneText: 'Время зоны', currentText: 'Теперь', closeText: 'Закрыть', + timeFormat: 'hh:mm tt', ampm: false }; -$.timepicker.setDefaults($.timepicker.regional.ru); +$.timepicker.setDefaults($.timepicker.regional['ru']); From b11c5764593d228dccf9f726283241ce68ae5588 Mon Sep 17 00:00:00 2001 From: Trent Date: Sun, 22 May 2011 08:39:46 -0400 Subject: [PATCH 08/13] Added comments and timezone translation to Czech localization --- localization/jquery-ui-timepicker-cs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/localization/jquery-ui-timepicker-cs.js b/localization/jquery-ui-timepicker-cs.js index 22d21fc..71f0e04 100644 --- a/localization/jquery-ui-timepicker-cs.js +++ b/localization/jquery-ui-timepicker-cs.js @@ -1,9 +1,12 @@ +/* Czech translation for the jQuery Timepicker Addon */ +/* Written by Ondřej Vodáček */ $.timepicker.regional.cs = { timeOnlyTitle: 'Vyberte čas', timeText: 'Čas', hourText: 'Hodiny', minuteText: 'Minuty', secondText: 'Vteřiny', + timezoneText: 'Časové pásmo', currentText: 'Nyní', closeText: 'Zavřít', timeFormat: 'h:m', From ba1d07e1545053b162960aac2b99b61aebaaf3bf Mon Sep 17 00:00:00 2001 From: Trent Date: Sun, 22 May 2011 08:45:41 -0400 Subject: [PATCH 09/13] Added German translation by Marvin --- localization/jquery-ui-timepicker-de.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 localization/jquery-ui-timepicker-de.js diff --git a/localization/jquery-ui-timepicker-de.js b/localization/jquery-ui-timepicker-de.js new file mode 100644 index 0000000..6bf7dea --- /dev/null +++ b/localization/jquery-ui-timepicker-de.js @@ -0,0 +1,15 @@ +/* German translation for the jQuery Timepicker Addon */ +/* Written by Marvin */ +$.timepicker.regional['de'] = { + timeOnlyTitle: 'Zeit Wählen', + timeText: 'Zeit', + hourText: 'Stunde', + minuteText: 'Minute', + secondText: 'Sekunde', + timezoneText: 'Zeitzone', + currentText: 'Jetzt', + closeText: 'Fertig', + timeFormat: 'hh:mm tt', + ampm: false +}; +$.timepicker.setDefaults($.timepicker.regional['de']); From eff83d0ab8912ae8719df04cd9dc4c4518edef5e Mon Sep 17 00:00:00 2001 From: Trent Date: Tue, 24 May 2011 06:36:05 -0400 Subject: [PATCH 10/13] fix getDate bug and consistency in localizations --- jquery-ui-timepicker-addon.js | 2 +- localization/jquery-ui-timepicker-cs.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 01ffb64..0e3783f 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -962,7 +962,7 @@ $.datepicker._getDateDatepicker = function(target, noDefault) { if (tp_inst) { this._setDateFromField(inst, noDefault); var date = this._getDate(inst); - if (date && tp_inst._parseTime($(target).val(), true)) date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second); + if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second); return date; } return this._base_getDateDatepicker(target, noDefault); diff --git a/localization/jquery-ui-timepicker-cs.js b/localization/jquery-ui-timepicker-cs.js index 71f0e04..cc16586 100644 --- a/localization/jquery-ui-timepicker-cs.js +++ b/localization/jquery-ui-timepicker-cs.js @@ -1,6 +1,6 @@ /* Czech translation for the jQuery Timepicker Addon */ /* Written by Ondřej Vodáček */ -$.timepicker.regional.cs = { +$.timepicker.regional['cs'] = { timeOnlyTitle: 'Vyberte čas', timeText: 'Čas', hourText: 'Hodiny', @@ -12,4 +12,4 @@ $.timepicker.regional.cs = { timeFormat: 'h:m', ampm: false }; -$.timepicker.setDefaults($.timepicker.regional.cs); +$.timepicker.setDefaults($.timepicker.regional['cs']); From 3abfdc46a0443a906c2a0bcaf918f8ac57501b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vas=20G=C3=A1bor?= Date: Tue, 24 May 2011 16:52:45 +0200 Subject: [PATCH 11/13] Added Hungarian translation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vas Gábor --- localization/jquery-ui-timepicker-hu.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 localization/jquery-ui-timepicker-hu.js diff --git a/localization/jquery-ui-timepicker-hu.js b/localization/jquery-ui-timepicker-hu.js new file mode 100644 index 0000000..29e7a9f --- /dev/null +++ b/localization/jquery-ui-timepicker-hu.js @@ -0,0 +1,15 @@ +/* Hungarian translation for the jQuery Timepicker Addon */ +/* Written by Vas Gábor */ +$.timepicker.regional['hu'] = { + currentText: 'Most', + closeText: 'Kész', + ampm: false, + timeFormat: 'hh:mm tt', + timeOnlyTitle: 'Válasszon időpontot', + timeText: 'Idő', + hourText: 'Óra', + minuteText: 'Perc', + secondText: 'Másodperc', + timezoneText: 'Időzóna' +}; +$.timepicker.setDefaults($.timepicker.regional['hu']); From 9f038770cdc25b14936bd0f32a8bd49083de16c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=A9t=C3=A9?= Date: Tue, 24 May 2011 19:02:33 +0200 Subject: [PATCH 12/13] Added French translation --- localization/jquery-ui-timepicker-fr.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 localization/jquery-ui-timepicker-fr.js diff --git a/localization/jquery-ui-timepicker-fr.js b/localization/jquery-ui-timepicker-fr.js new file mode 100644 index 0000000..7fd23f0 --- /dev/null +++ b/localization/jquery-ui-timepicker-fr.js @@ -0,0 +1,15 @@ +/* Czech translation for the jQuery Timepicker Addon */ +/* Written by Ondřej Vodáček */ +$.timepicker.regional['fr'] = { + timeOnlyTitle: 'Choisir une heure', + timeText: 'Heure', + hourText: 'Heures', + minuteText: 'Minutes', + secondText: 'Secondes', + timezoneText: 'Fuseau horaire', + currentText: 'Maintenant', + closeText: 'Terminé' + timeFormat: 'h:m', + ampm: false +}; +$.timepicker.setDefaults($.timepicker.regional['fr']); From e3c179dca188f3f300d566a94cff1af886cc6ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=A9t=C3=A9?= Date: Tue, 24 May 2011 19:10:51 +0200 Subject: [PATCH 13/13] Updated the credits --- localization/jquery-ui-timepicker-fr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localization/jquery-ui-timepicker-fr.js b/localization/jquery-ui-timepicker-fr.js index 7fd23f0..83cc9b9 100644 --- a/localization/jquery-ui-timepicker-fr.js +++ b/localization/jquery-ui-timepicker-fr.js @@ -1,5 +1,5 @@ /* Czech translation for the jQuery Timepicker Addon */ -/* Written by Ondřej Vodáček */ +/* Written by Thomas Lété */ $.timepicker.regional['fr'] = { timeOnlyTitle: 'Choisir une heure', timeText: 'Heure',