mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
update timepicker to (unnamed) version from Nov. 2013
This commit is contained in:
parent
a659b49f51
commit
48679c3e6c
35
phpgwapi/js/jquery/jquery-ui-timepicker-addon.js
vendored
35
phpgwapi/js/jquery/jquery-ui-timepicker-addon.js
vendored
@ -1,6 +1,12 @@
|
||||
/*! jQuery Timepicker Addon - v1.4 - 2013-08-11
|
||||
* http://trentrichardson.com/examples/timepicker
|
||||
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
|
||||
/*
|
||||
* jQuery Timepicker Addon
|
||||
* By: Trent Richardson [http://trentrichardson.com]
|
||||
*
|
||||
* Copyright 2013 Trent Richardson
|
||||
* You may use this project under MIT license.
|
||||
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
|
||||
/*
|
||||
@ -16,7 +22,7 @@
|
||||
*/
|
||||
$.extend($.ui, {
|
||||
timepicker: {
|
||||
version: "1.4"
|
||||
version: "@@version"
|
||||
}
|
||||
});
|
||||
|
||||
@ -743,13 +749,23 @@
|
||||
if (microsec !== false) {
|
||||
microsec = parseInt(microsec, 10);
|
||||
}
|
||||
if (timezone !== false) {
|
||||
timezone = timezone.toString();
|
||||
}
|
||||
|
||||
var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
|
||||
|
||||
// If the update was done in the input field, the input field should not be updated.
|
||||
// If the update was done using the sliders, update the input field.
|
||||
var hasChanged = (hour !== this.hour || minute !== this.minute || second !== this.second || millisec !== this.millisec || microsec !== this.microsec ||
|
||||
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || (this.timezone !== null && timezone !== this.timezone));
|
||||
var hasChanged = (
|
||||
hour !== parseInt(this.hour,10) || // sliders should all be numeric
|
||||
minute !== parseInt(this.minute,10) ||
|
||||
second !== parseInt(this.second,10) ||
|
||||
millisec !== parseInt(this.millisec,10) ||
|
||||
microsec !== parseInt(this.microsec,10) ||
|
||||
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||
|
||||
(this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString()
|
||||
);
|
||||
|
||||
if (hasChanged) {
|
||||
|
||||
@ -796,6 +812,7 @@
|
||||
this.timeDefined = true;
|
||||
if (hasChanged) {
|
||||
this._updateDateTime();
|
||||
this.$input.focus();
|
||||
}
|
||||
},
|
||||
|
||||
@ -829,7 +846,7 @@
|
||||
var formattedDateTime = this.formattedDate;
|
||||
|
||||
// if a slider was changed but datepicker doesn't have a value yet, set it
|
||||
if (dp_inst.lastVa === "") {
|
||||
if (dp_inst.lastVal === "") {
|
||||
dp_inst.currentYear = dp_inst.selectedYear;
|
||||
dp_inst.currentMonth = dp_inst.selectedMonth;
|
||||
dp_inst.currentDay = dp_inst.selectedDay;
|
||||
@ -1594,7 +1611,7 @@
|
||||
// object will only return the timezone offset for the current locale, so we
|
||||
// adjust it accordingly. If not using timezone option this won't matter..
|
||||
// If a timezone is different in tp, keep the timezone as is
|
||||
if (tp_inst) {
|
||||
if (tp_inst && tp_date) {
|
||||
// look out for DST if tz wasn't specified
|
||||
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
|
||||
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
|
||||
@ -2129,6 +2146,6 @@
|
||||
/*
|
||||
* Keep up with the version
|
||||
*/
|
||||
$.timepicker.version = "1.4";
|
||||
$.timepicker.version = "@@version";
|
||||
|
||||
})(jQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user