mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 11:21:23 +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
|
* jQuery Timepicker Addon
|
||||||
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
|
* 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 ($) {
|
(function ($) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -16,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
$.extend($.ui, {
|
$.extend($.ui, {
|
||||||
timepicker: {
|
timepicker: {
|
||||||
version: "1.4"
|
version: "@@version"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -743,13 +749,23 @@
|
|||||||
if (microsec !== false) {
|
if (microsec !== false) {
|
||||||
microsec = parseInt(microsec, 10);
|
microsec = parseInt(microsec, 10);
|
||||||
}
|
}
|
||||||
|
if (timezone !== false) {
|
||||||
|
timezone = timezone.toString();
|
||||||
|
}
|
||||||
|
|
||||||
var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
|
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 in the input field, the input field should not be updated.
|
||||||
// If the update was done using the sliders, update the input field.
|
// 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 ||
|
var hasChanged = (
|
||||||
(this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || (this.timezone !== null && timezone !== this.timezone));
|
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) {
|
if (hasChanged) {
|
||||||
|
|
||||||
@ -796,6 +812,7 @@
|
|||||||
this.timeDefined = true;
|
this.timeDefined = true;
|
||||||
if (hasChanged) {
|
if (hasChanged) {
|
||||||
this._updateDateTime();
|
this._updateDateTime();
|
||||||
|
this.$input.focus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -829,7 +846,7 @@
|
|||||||
var formattedDateTime = this.formattedDate;
|
var formattedDateTime = this.formattedDate;
|
||||||
|
|
||||||
// if a slider was changed but datepicker doesn't have a value yet, set it
|
// 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.currentYear = dp_inst.selectedYear;
|
||||||
dp_inst.currentMonth = dp_inst.selectedMonth;
|
dp_inst.currentMonth = dp_inst.selectedMonth;
|
||||||
dp_inst.currentDay = dp_inst.selectedDay;
|
dp_inst.currentDay = dp_inst.selectedDay;
|
||||||
@ -1594,7 +1611,7 @@
|
|||||||
// object will only return the timezone offset for the current locale, so we
|
// 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..
|
// 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 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
|
// look out for DST if tz wasn't specified
|
||||||
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
|
if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) {
|
||||||
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
|
tp_inst.timezone = tp_date.getTimezoneOffset() * -1;
|
||||||
@ -2129,6 +2146,6 @@
|
|||||||
/*
|
/*
|
||||||
* Keep up with the version
|
* Keep up with the version
|
||||||
*/
|
*/
|
||||||
$.timepicker.version = "1.4";
|
$.timepicker.version = "@@version";
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
Loading…
Reference in New Issue
Block a user