Update jQuery UI Time Picker to 0.3.1
0
3rdparty/timepicker/css/include/images/ui-bg_diagonals-thick_18_b81900_40x40.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
0
3rdparty/timepicker/css/include/images/ui-bg_diagonals-thick_20_666666_40x40.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
0
3rdparty/timepicker/css/include/images/ui-bg_flat_10_000000_40x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
0
3rdparty/timepicker/css/include/images/ui-bg_glass_100_f6f6f6_1x400.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
0
3rdparty/timepicker/css/include/images/ui-bg_glass_100_fdf5ce_1x400.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
0
3rdparty/timepicker/css/include/images/ui-bg_glass_65_ffffff_1x400.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
0
3rdparty/timepicker/css/include/images/ui-bg_gloss-wave_35_f6a828_500x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
0
3rdparty/timepicker/css/include/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
0
3rdparty/timepicker/css/include/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
0
3rdparty/timepicker/css/include/images/ui-icons_222222_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/images/ui-icons_228ef1_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/images/ui-icons_ef8c08_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/images/ui-icons_ffd27a_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/images/ui-icons_ffffff_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/jquery-ui-1.8.14.custom.css
vendored
Normal file → Executable file
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-icons_222222_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-icons_228ef1_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-icons_ef8c08_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-icons_ffd27a_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
3rdparty/timepicker/css/include/ui-lightness/images/ui-icons_ffffff_256x240.png
vendored
Normal file → Executable file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
@ -10,7 +10,7 @@
|
|||
|
||||
.ui-timepicker-inline { display: inline; }
|
||||
|
||||
#ui-timepicker-div { padding: 0.2em }
|
||||
#ui-timepicker-div { padding: 0.2em; background-color: #fff; }
|
||||
.ui-timepicker-table { display: inline-table; width: 0; }
|
||||
.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Around the world, around the world -->
|
||||
<!-- Around the world, around the world -->
|
||||
<!-- Around the world, around the world -->
|
||||
<!-- Around the world, around the world -->
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>Internationalisation page for the jquery ui timepicker</title>
|
||||
|
||||
|
@ -14,10 +19,20 @@
|
|||
<style>
|
||||
#timepicker { font-size: 10px }
|
||||
</style>
|
||||
|
||||
<script src='jquery.ui.timepicker-cs.js'></script>
|
||||
<script src='jquery.ui.timepicker-de.js'></script>
|
||||
<script src='jquery.ui.timepicker-es.js'></script>
|
||||
|
||||
<script src='jquery.ui.timepicker-fr.js'></script>
|
||||
<script src='jquery.ui.timepicker-hr.js'></script>
|
||||
<script src='jquery.ui.timepicker-it.js'></script>
|
||||
<script src='jquery.ui.timepicker-ja.js'></script>
|
||||
<script src='jquery.ui.timepicker-nl.js'></script>
|
||||
<script src='jquery.ui.timepicker-pl.js'></script>
|
||||
<script src='jquery.ui.timepicker-pt-BR.js'></script>
|
||||
<script src='jquery.ui.timepicker-sl.js'></script>
|
||||
<script src='jquery.ui.timepicker-sv.js'></script>
|
||||
<script src='jquery.ui.timepicker-tr.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -32,18 +47,35 @@
|
|||
showDeselectButton: true
|
||||
});
|
||||
|
||||
$('#locale').change(function() {
|
||||
$('#locale').change(updateLocale).keyup(updateLocale);
|
||||
|
||||
});
|
||||
|
||||
function updateLocale()
|
||||
{
|
||||
$('#timepicker').timepicker( "option",
|
||||
$.timepicker.regional[ $( this ).val() ] );
|
||||
});
|
||||
});
|
||||
$.timepicker.regional[ $( '#locale' ).val() ] );
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Select a localisation :
|
||||
<select id='locale'>
|
||||
<option>Select a localisation</option>
|
||||
|
||||
<option value='hr'>Croatian/Bosnian</option>
|
||||
<option value='cs'>Czech</option>
|
||||
<option value='de'>German (Deutsch)</option>
|
||||
<option value='nl'>Dutch (Nederlands)</option>
|
||||
<option value='fr'>Français</option>
|
||||
<option value='de'>Deutsch</option>
|
||||
<option value='it'>Italian</option>
|
||||
<option value='ja'>Japanese</option>
|
||||
<option value='pl'>Polish</option>
|
||||
<option value="pt-BR">Portuguese/Brazilian</option>
|
||||
<option value='sl'>Slovenian</option>
|
||||
<option value='es'>Spanish</option>
|
||||
<option value='sv'>Swedish</option>
|
||||
<option value='tr'>Turkish</option>
|
||||
</select>
|
||||
|
||||
<br>
|
||||
|
@ -56,18 +88,60 @@
|
|||
|
||||
List of localisations :
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-de.js">Deutsch (jquery.ui.timepicker-de.js</a>
|
||||
<a href="jquery.ui.timepicker-hr.js">Croatian/Bosnian (jquery.ui.timepicker.hr.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-fr.js">Français (jquery.ui.timepicker-fr.js</a>
|
||||
<a href="jquery.ui.timepicker-cs.js">Czech (jquery.ui.timepicker-cs.js</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-ja.js">Japanese (jquery.ui.timepicker-ja.js</a>
|
||||
<a href="jquery.ui.timepicker-de.js">German (Deutsch) (jquery.ui.timepicker-de.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-nl.js">Dutch (Nederlands) (jquery.ui.timepicker-nl.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-fr.js">Français (jquery.ui.timepicker-fr.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-it.js">Italian (jquery.ui.timepicker-it.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-ja.js">Japanese (jquery.ui.timepicker-ja.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-pl.js">Polish (jquery.ui.timepicker-pl.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-pt-BR.js">Portuguese/Brazilian (jquery.ui.timepicker-pt-BR.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-sl.js">Slovenian (jquery.ui.timepicker-sl.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-sv.js">Swedish (jquery.ui.timepicker-sv.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-es.js">Spanish (jquery.ui.timepicker-es.js)</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="jquery.ui.timepicker-sv.js">Turkish (jquery.ui.timepicker-tr.js)</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
/* Czech initialisation for the timepicker plugin */
|
||||
/* Written by David Spohr (spohr.david at gmail). */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['cs'] = {
|
||||
hourText: 'Hodiny',
|
||||
minuteText: 'Minuty',
|
||||
amPmText: ['AM', 'PM'] ,
|
||||
closeButtonText: 'Zavřít',
|
||||
nowButtonText: 'Nyní',
|
||||
deselectButtonText: 'Odoznačit' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['cs']);
|
||||
});
|
|
@ -1,9 +1,12 @@
|
|||
/* Deutsch initialisation for the timepicker plugin */
|
||||
/* Written by Bernd Plagge (bplagge@choicenet.ne.jp). */
|
||||
/* German initialisation for the timepicker plugin */
|
||||
/* Written by Lowie Hulzinga. */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['de'] = {
|
||||
hourText: 'Stunde',
|
||||
minuteText: 'Minuten',
|
||||
amPmText: ['AM', 'PM'] }
|
||||
amPmText: ['AM', 'PM'] ,
|
||||
closeButtonText: 'Beenden',
|
||||
nowButtonText: 'Aktuelle Zeit',
|
||||
deselectButtonText: 'Wischen' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['de']);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
/* Spanish initialisation for the jQuery time picker plugin. */
|
||||
/* Writen by Jandro González (agonzalezalves@gmail.com) */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['es'] = {
|
||||
hourText: 'Hora',
|
||||
minuteText: 'Minuto',
|
||||
amPmText: ['AM', 'PM'],
|
||||
closeButtonText: 'Aceptar',
|
||||
nowButtonText: 'Ahora',
|
||||
deselectButtonText: 'Deseleccionar' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['es']);
|
||||
});
|
|
@ -0,0 +1,13 @@
|
|||
/* Croatian/Bosnian initialisation for the timepicker plugin */
|
||||
/* Written by Rene Brakus (rene.brakus@infobip.com). */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['hr'] = {
|
||||
hourText: 'Sat',
|
||||
minuteText: 'Minuta',
|
||||
amPmText: ['Prijepodne', 'Poslijepodne'],
|
||||
closeButtonText: 'Zatvoriti',
|
||||
nowButtonText: 'Sada',
|
||||
deselectButtonText: 'Poništite'}
|
||||
|
||||
$.timepicker.setDefaults($.timepicker.regional['hr']);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
/* Italian initialisation for the jQuery time picker plugin. */
|
||||
/* Written by Serge Margarita (serge.margarita@gmail.com) */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['it'] = {
|
||||
hourText: 'Ore',
|
||||
minuteText: 'Minuti',
|
||||
amPmText: ['AM', 'PM'],
|
||||
closeButtonText: 'Chiudi',
|
||||
nowButtonText: 'Adesso',
|
||||
deselectButtonText: 'Svuota' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['it']);
|
||||
});
|
|
@ -4,6 +4,9 @@ jQuery(function($){
|
|||
$.timepicker.regional['ja'] = {
|
||||
hourText: '時間',
|
||||
minuteText: '分',
|
||||
amPmText: ['午前', '午後'] }
|
||||
amPmText: ['午前', '午後'],
|
||||
closeButtonText: '閉じる',
|
||||
nowButtonText: '現時',
|
||||
deselectButtonText: '選択解除' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['ja']);
|
||||
});
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
/* Nederlands initialisation for the timepicker plugin */
|
||||
/* Written by Lowie Hulzinga. */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['nl'] = {
|
||||
hourText: 'Uren',
|
||||
minuteText: 'Minuten',
|
||||
amPmText: ['AM', 'PM'],
|
||||
closeButtonText: 'Sluiten',
|
||||
nowButtonText: 'Actuele tijd',
|
||||
deselectButtonText: 'Wissen' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['nl']);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
/* Polish initialisation for the timepicker plugin */
|
||||
/* Written by Mateusz Wadolkowski (mw@pcdoctor.pl). */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['pl'] = {
|
||||
hourText: 'Godziny',
|
||||
minuteText: 'Minuty',
|
||||
amPmText: ['', ''],
|
||||
closeButtonText: 'Zamknij',
|
||||
nowButtonText: 'Teraz',
|
||||
deselectButtonText: 'Odznacz'}
|
||||
$.timepicker.setDefaults($.timepicker.regional['pl']);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
/* Brazilan initialisation for the timepicker plugin */
|
||||
/* Written by Daniel Almeida (quantodaniel@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['pt-BR'] = {
|
||||
hourText: 'Hora',
|
||||
minuteText: 'Minuto',
|
||||
amPmText: ['AM', 'PM'],
|
||||
closeButtonText: 'Fechar',
|
||||
nowButtonText: 'Agora',
|
||||
deselectButtonText: 'Limpar' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['pt-BR']);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
/* Slovenian localization for the jQuery time picker plugin. */
|
||||
/* Written by Blaž Maležič (blaz@malezic.si) */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['sl'] = {
|
||||
hourText: 'Ure',
|
||||
minuteText: 'Minute',
|
||||
amPmText: ['AM', 'PM'],
|
||||
closeButtonText: 'Zapri',
|
||||
nowButtonText: 'Zdaj',
|
||||
deselectButtonText: 'Pobriši' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['sl']);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
/* Swedish initialisation for the timepicker plugin */
|
||||
/* Written by Björn Westlin (bjorn.westlin@su.se). */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['sv'] = {
|
||||
hourText: 'Timme',
|
||||
minuteText: 'Minut',
|
||||
amPmText: ['AM', 'PM'] ,
|
||||
closeButtonText: 'Stäng',
|
||||
nowButtonText: 'Nu',
|
||||
deselectButtonText: 'Rensa' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['sv']);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
/* Turkish initialisation for the jQuery time picker plugin. */
|
||||
/* Written by Mutlu Tevfik Koçak (mtkocak@gmail.com) */
|
||||
jQuery(function($){
|
||||
$.timepicker.regional['tr'] = {
|
||||
hourText: 'Saat',
|
||||
minuteText: 'Dakika',
|
||||
amPmText: ['AM', 'PM'],
|
||||
closeButtonText: 'Kapat',
|
||||
nowButtonText: 'Şu anda',
|
||||
deselectButtonText: 'Seçimi temizle' }
|
||||
$.timepicker.setDefaults($.timepicker.regional['tr']);
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* jQuery UI Timepicker 0.2.9
|
||||
* jQuery UI Timepicker 0.3.1
|
||||
*
|
||||
* Copyright 2010-2011, Francois Gelinas
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
@ -38,12 +38,12 @@
|
|||
->T-Rex<-
|
||||
*/
|
||||
|
||||
(function ($, undefined) {
|
||||
(function ($) {
|
||||
|
||||
$.extend($.ui, { timepicker: { version: "0.2.9"} });
|
||||
$.extend($.ui, { timepicker: { version: "0.3.1"} });
|
||||
|
||||
var PROP_NAME = 'timepicker';
|
||||
var tpuuid = new Date().getTime();
|
||||
var PROP_NAME = 'timepicker',
|
||||
tpuuid = new Date().getTime();
|
||||
|
||||
/* Time picker manager.
|
||||
Use the singleton instance of this class, $.timepicker, to interact with the time picker.
|
||||
|
@ -53,7 +53,6 @@
|
|||
function Timepicker() {
|
||||
this.debug = true; // Change this to true to start debugging
|
||||
this._curInst = null; // The current instance in use
|
||||
this._isInline = false; // true if the instance is displayed inline
|
||||
this._disabledInputs = []; // List of time picker inputs that have been disabled
|
||||
this._timepickerShowing = false; // True if the popup picker is showing , false if not
|
||||
this._inDialog = false; // True if showing within a "dialog", false if not
|
||||
|
@ -267,17 +266,23 @@
|
|||
input[isRTL ? 'before' : 'after'](inst.append);
|
||||
}
|
||||
input.unbind('focus.timepicker', this._showTimepicker);
|
||||
input.unbind('click.timepicker', this._adjustZIndex);
|
||||
|
||||
if (inst.trigger) { inst.trigger.remove(); }
|
||||
|
||||
var showOn = this._get(inst, 'showOn');
|
||||
if (showOn == 'focus' || showOn == 'both') { // pop-up time picker when in the marked field
|
||||
input.bind("focus.timepicker", this._showTimepicker);
|
||||
input.bind("click.timepicker", this._adjustZIndex);
|
||||
}
|
||||
if (showOn == 'button' || showOn == 'both') { // pop-up time picker when 'button' element is clicked
|
||||
var button = this._get(inst, 'button');
|
||||
$(button).bind("click.timepicker", function () {
|
||||
if ($.timepicker._timepickerShowing && $.timepicker._lastInput == input[0]) { $.timepicker._hideTimepicker(); }
|
||||
else { $.timepicker._showTimepicker(input[0]); }
|
||||
if ($.timepicker._timepickerShowing && $.timepicker._lastInput == input[0]) {
|
||||
$.timepicker._hideTimepicker();
|
||||
} else if (!inst.input.is(':disabled')) {
|
||||
$.timepicker._showTimepicker(input[0]);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -303,12 +308,19 @@
|
|||
inst.tpDiv.show();
|
||||
},
|
||||
|
||||
_adjustZIndex: function(input) {
|
||||
input = input.target || input;
|
||||
var inst = $.timepicker._getInst(input);
|
||||
inst.tpDiv.css('zIndex', $.timepicker._getZIndex(input) +1);
|
||||
},
|
||||
|
||||
/* Pop-up the time picker for a given input field.
|
||||
@param input element - the input field attached to the time picker or
|
||||
event - if triggered by focus */
|
||||
_showTimepicker: function (input) {
|
||||
input = input.target || input;
|
||||
if (input.nodeName.toLowerCase() != 'input') { input = $('input', input.parentNode)[0]; } // find from button/image trigger
|
||||
|
||||
if ($.timepicker._isDisabledTimepicker(input) || $.timepicker._lastInput == input) { return; } // already here
|
||||
|
||||
// fix v 0.0.8 - close current timepicker before showing another one
|
||||
|
@ -389,7 +401,8 @@
|
|||
};
|
||||
|
||||
// Fixed the zIndex problem for real (I hope) - FG - v 0.2.9
|
||||
inst.tpDiv.css('zIndex', $.timepicker._getZIndex(input) +1);
|
||||
$.timepicker._adjustZIndex(input);
|
||||
//inst.tpDiv.css('zIndex', $.timepicker._getZIndex(input) +1);
|
||||
|
||||
if ($.effects && $.effects[showAnim]) {
|
||||
inst.tpDiv.show(showAnim, $.timepicker._get(inst, 'showOptions'), duration, postProcess);
|
||||
|
@ -419,6 +432,16 @@
|
|||
}
|
||||
},
|
||||
|
||||
/* Refresh the time picker
|
||||
@param target element - The target input field or inline container element. */
|
||||
_refreshTimepicker: function(target) {
|
||||
var inst = this._getInst(target);
|
||||
if (inst) {
|
||||
this._updateTimepicker(inst);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/* Generate the time picker content. */
|
||||
_updateTimepicker: function (inst) {
|
||||
inst.tpDiv.empty().append(this._generateHTML(inst));
|
||||
|
@ -786,6 +809,26 @@
|
|||
},
|
||||
|
||||
|
||||
/* Detach a timepicker from its control.
|
||||
@param target element - the target input field or division or span */
|
||||
_destroyTimepicker: function(target) {
|
||||
var $target = $(target);
|
||||
var inst = $.data(target, PROP_NAME);
|
||||
if (!$target.hasClass(this.markerClassName)) {
|
||||
return;
|
||||
}
|
||||
var nodeName = target.nodeName.toLowerCase();
|
||||
$.removeData(target, PROP_NAME);
|
||||
if (nodeName == 'input') {
|
||||
inst.append.remove();
|
||||
inst.trigger.remove();
|
||||
$target.removeClass(this.markerClassName)
|
||||
.unbind('focus.timepicker', this._showTimepicker)
|
||||
.unbind('click.timepicker', this._adjustZIndex);
|
||||
} else if (nodeName == 'div' || nodeName == 'span')
|
||||
$target.removeClass(this.markerClassName).empty();
|
||||
},
|
||||
|
||||
/* Enable the date picker to a jQuery selection.
|
||||
@param target element - the target input field or division or span */
|
||||
_enableTimepicker: function(target) {
|
||||
|
@ -799,12 +842,17 @@
|
|||
var nodeName = target.nodeName.toLowerCase();
|
||||
if (nodeName == 'input') {
|
||||
target.disabled = false;
|
||||
var button = this._get(inst, 'button');
|
||||
$(button).removeClass('ui-state-disabled').disabled = false;
|
||||
inst.trigger.filter('button').
|
||||
each(function() { this.disabled = false; }).end();
|
||||
}
|
||||
else if (nodeName == 'div' || nodeName == 'span') {
|
||||
var inline = $target.children('.' + this._inlineClass);
|
||||
inline.children().removeClass('ui-state-disabled');
|
||||
inline.find('button').each(
|
||||
function() { this.disabled = false }
|
||||
)
|
||||
}
|
||||
this._disabledInputs = $.map(this._disabledInputs,
|
||||
function(value) { return (value == target_id ? null : value); }); // delete entry
|
||||
|
@ -820,6 +868,9 @@
|
|||
}
|
||||
var nodeName = target.nodeName.toLowerCase();
|
||||
if (nodeName == 'input') {
|
||||
var button = this._get(inst, 'button');
|
||||
|
||||
$(button).addClass('ui-state-disabled').disabled = true;
|
||||
target.disabled = true;
|
||||
|
||||
inst.trigger.filter('button').
|
||||
|
@ -829,6 +880,10 @@
|
|||
else if (nodeName == 'div' || nodeName == 'span') {
|
||||
var inline = $target.children('.' + this._inlineClass);
|
||||
inline.children().addClass('ui-state-disabled');
|
||||
inline.find('button').each(
|
||||
function() { this.disabled = true }
|
||||
)
|
||||
|
||||
}
|
||||
this._disabledInputs = $.map(this._disabledInputs,
|
||||
function(value) { return (value == target ? null : value); }); // delete entry
|
||||
|
@ -923,13 +978,9 @@
|
|||
(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
|
||||
}
|
||||
if (!showAnim) { postProcess(); }
|
||||
var onClose = this._get(inst, 'onClose');
|
||||
if (onClose) {
|
||||
onClose.apply(
|
||||
(inst.input ? inst.input[0] : null),
|
||||
[(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
|
||||
}
|
||||
|
||||
this._timepickerShowing = false;
|
||||
|
||||
this._lastInput = null;
|
||||
if (this._inDialog) {
|
||||
this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
|
||||
|
@ -939,6 +990,14 @@
|
|||
}
|
||||
}
|
||||
this._inDialog = false;
|
||||
|
||||
var onClose = this._get(inst, 'onClose');
|
||||
if (onClose) {
|
||||
onClose.apply(
|
||||
(inst.input ? inst.input[0] : null),
|
||||
[(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1106,12 +1165,10 @@
|
|||
return retVal;
|
||||
},
|
||||
|
||||
selectNow: function(e) {
|
||||
|
||||
var id = $(e.target).attr("data-timepicker-instance-id"),
|
||||
selectNow: function(event) {
|
||||
var id = $(event.target).attr("data-timepicker-instance-id"),
|
||||
$target = $(id),
|
||||
inst = this._getInst($target[0]);
|
||||
|
||||
//if (!inst || (input && inst != $.data(input, PROP_NAME))) { return; }
|
||||
var currentTime = new Date();
|
||||
inst.hours = currentTime.getHours();
|
||||
|
@ -1121,8 +1178,8 @@
|
|||
this._hideTimepicker();
|
||||
},
|
||||
|
||||
deselectTime: function(e) {
|
||||
var id = $(e.target).attr("data-timepicker-instance-id"),
|
||||
deselectTime: function(event) {
|
||||
var id = $(event.target).attr("data-timepicker-instance-id"),
|
||||
$target = $(id),
|
||||
inst = this._getInst($target[0]);
|
||||
inst.hours = -1;
|
||||
|
@ -1135,7 +1192,7 @@
|
|||
selectHours: function (event) {
|
||||
var $td = $(event.currentTarget),
|
||||
id = $td.attr("data-timepicker-instance-id"),
|
||||
newHours = $td.attr("data-hour"),
|
||||
newHours = parseInt($td.attr("data-hour")),
|
||||
fromDoubleClick = event.data.fromDoubleClick,
|
||||
$target = $(id),
|
||||
inst = this._getInst($target[0]),
|
||||
|
@ -1168,7 +1225,7 @@
|
|||
selectMinutes: function (event) {
|
||||
var $td = $(event.currentTarget),
|
||||
id = $td.attr("data-timepicker-instance-id"),
|
||||
newMinutes = $td.attr("data-minute"),
|
||||
newMinutes = parseInt($td.attr("data-minute")),
|
||||
fromDoubleClick = event.data.fromDoubleClick,
|
||||
$target = $(id),
|
||||
inst = this._getInst($target[0]),
|
||||
|
@ -1213,8 +1270,10 @@
|
|||
return '';
|
||||
}
|
||||
|
||||
if ((inst.hours < 0) || (inst.hours > 23)) { inst.hours = 12; }
|
||||
if ((inst.minutes < 0) || (inst.minutes > 59)) { inst.minutes = 0; }
|
||||
// default to 0 AM if hours is not valid
|
||||
if ((inst.hours < inst.hours.starts) || (inst.hours > inst.hours.ends )) { inst.hours = 0; }
|
||||
// default to 0 minutes if minute is not valid
|
||||
if ((inst.minutes < inst.minutes.starts) || (inst.minutes > inst.minutes.ends)) { inst.minutes = 0; }
|
||||
|
||||
var period = "",
|
||||
showPeriod = (this._get(inst, 'showPeriod') == true),
|
||||
|
@ -1309,6 +1368,8 @@
|
|||
$.timepicker.initialized = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
||||
if (typeof options == 'string' && (options == 'getTime' || options == 'getHour' || options == 'getMinute' ))
|
||||
return $.timepicker['_' + options + 'Timepicker'].
|
||||
|
@ -1336,7 +1397,7 @@
|
|||
$.timepicker = new Timepicker(); // singleton instance
|
||||
$.timepicker.initialized = false;
|
||||
$.timepicker.uuid = new Date().getTime();
|
||||
$.timepicker.version = "0.2.9";
|
||||
$.timepicker.version = "0.3.1";
|
||||
|
||||
// Workaround for #4055
|
||||
// Add another global to avoid noConflict issues with inline event handlers
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
Release 0.3.0 - 27 March 2012
|
||||
Fixed a zIndex problem in jQuery Dialog when the user clicked on the input while the timepicker was still visible.
|
||||
Added Czech translation, thanks David Spohr
|
||||
Added Swedish translation, thanks Björn Westlin
|
||||
Added Dutch translation, thanks Lowie Hulzinga
|
||||
Prevent showing the timepicker dialog with the button when disabled(Thanks ruhley. ref #38)
|
||||
Add ui-state-disabled class to button trigger when disabled.
|
||||
Fixed onClose function on first time passes the hours variable as string (Thanks Zanisimo, ref #39)
|
||||
Added "refresh" method $('selector').timepicker('refresh');
|
||||
|
||||
Release 0.2.9 - November 13, 2011
|
||||
Fixed the zIndex problem and removed the zIndex option (Thanks everyone who reported the problem)
|
||||
Fix a bug where repeatedly clicking on hour cells made the timepicker very slow.
|
||||
|
|