Skip to content

Commit

Permalink
Update jui
Browse files Browse the repository at this point in the history
  • Loading branch information
janisto committed Mar 14, 2014
1 parent ddc468c commit 16033f8
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 13 deletions.
33 changes: 33 additions & 0 deletions extensions/jui/.gitignore
@@ -0,0 +1,33 @@
# numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache

# OS or editor folders
.DS_Store
Thumbs.db
.cache
.project
.settings
.tmproj
*.esproj
nbproject
.idea
*.sublime-project
*.sublime-workspace
*.komodoproject
.komodotools

# folders to ignore
.hg
.svn
.CVS
intermediate
publish
Empty file modified extensions/jui/EJuiDateTimePicker.php 100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions extensions/jui/README.md 100644 → 100755
@@ -1,4 +1,4 @@
CJuiDateTimePicker
EJuiDateTimePicker
==================

CJuiDateTimePicker adds timing to the standard zii.widgets.jui.CJuiDatePicke
EJuiDateTimePicker adds timing to the standard zii.widgets.jui.CJuiDatePicker
25 changes: 18 additions & 7 deletions extensions/jui/assets/jquery-ui-timepicker-addon.js
@@ -1,4 +1,4 @@
/*! jQuery Timepicker Addon - v1.4 - 2013-08-11
/*! jQuery Timepicker Addon - v1.4.3 - 2013-11-30
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2013 Trent Richardson; Licensed MIT */
(function ($) {
Expand All @@ -16,7 +16,7 @@
*/
$.extend($.ui, {
timepicker: {
version: "1.4"
version: "1.4.3"
}
});

Expand Down Expand Up @@ -743,13 +743,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) {

Expand Down Expand Up @@ -796,6 +806,7 @@
this.timeDefined = true;
if (hasChanged) {
this._updateDateTime();
this.$input.focus();
}
},

Expand Down Expand Up @@ -829,7 +840,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;
Expand Down Expand Up @@ -1594,7 +1605,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;
Expand Down Expand Up @@ -2129,6 +2140,6 @@
/*
* Keep up with the version
*/
$.timepicker.version = "1.4";
$.timepicker.version = "1.4.3";

})(jQuery);
2 changes: 1 addition & 1 deletion extensions/jui/assets/jquery-ui-timepicker-addon.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions extensions/jui/assets/jquery-ui-timepicker-addon.min.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions extensions/jui/assets/lang/jquery-ui-timepicker-am.js
@@ -0,0 +1,21 @@
/* Armenian translation for the jQuery Timepicker Addon */
/* Written by Artavazd Avetisyan artavazda@hotmail.com */
(function($) {
$.timepicker.regional['am'] = {
timeOnlyTitle: 'Ընտրեք ժամանակը',
timeText: 'Ժամանակը',
hourText: 'Ժամ',
minuteText: 'Րոպե',
secondText: 'Վարկյան',
millisecText: 'Միլիվարկյան',
microsecText: 'Միկրովարկյան',
timezoneText: 'Ժամային գոտին',
currentText: 'Այժմ',
closeText: 'Փակել',
timeFormat: 'HH:mm',
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
isRTL: false
};
$.timepicker.setDefaults($.timepicker.regional['am']);
})(jQuery);
21 changes: 21 additions & 0 deletions extensions/jui/assets/lang/jquery-ui-timepicker-sr-RS.js
@@ -0,0 +1,21 @@
/* Serbian cyrilic translation for the jQuery Timepicker Addon */
/* Written by Vladimir Jelovac */
(function($) {
$.timepicker.regional['sr-RS'] = {
timeOnlyTitle: 'Одаберите време',
timeText: 'Време',
hourText: 'Сати',
minuteText: 'Минути',
secondText: 'Секунде',
millisecText: 'Милисекунде',
microsecText: 'Микросекунде',
timezoneText: 'Временска зона',
currentText: 'Сада',
closeText: 'Затвори',
timeFormat: 'HH:mm',
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
isRTL: false
};
$.timepicker.setDefaults($.timepicker.regional['sr-RS']);
})(jQuery);
21 changes: 21 additions & 0 deletions extensions/jui/assets/lang/jquery-ui-timepicker-sr-YU.js
@@ -0,0 +1,21 @@
/* Serbian latin translation for the jQuery Timepicker Addon */
/* Written by Vladimir Jelovac */
(function($) {
$.timepicker.regional['sr-YU'] = {
timeOnlyTitle: 'Odaberite vreme',
timeText: 'Vreme',
hourText: 'Sati',
minuteText: 'Minuti',
secondText: 'Sekunde',
millisecText: 'Milisekunde',
microsecText: 'Mikrosekunde',
timezoneText: 'Vremenska zona',
currentText: 'Sada',
closeText: 'Zatvori',
timeFormat: 'HH:mm',
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
isRTL: false
};
$.timepicker.setDefaults($.timepicker.regional['sr-YU']);
})(jQuery);

0 comments on commit 16033f8

Please sign in to comment.