xdan-datetimepicker-rails 2.3.7 → 2.3.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8a80eb7e9c9161576c935bf7b68e299001a6c33
|
4
|
+
data.tar.gz: 43defa28368ecc6121b3b1de362107e62256ff04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79585f3e7af6460ecb1de3a5ffb089a1c34d828fb3c14af8466840263a978279b692a34dcb4bb67671657a79e000a05cd3ad2e23b41280d15f4cb552573a3bb4
|
7
|
+
data.tar.gz: 6bed9ce9051ce2a47322d6919b1b0418adeebef427705d03648c43d9c30e615ee46a2f88202a1bfee0143dbb69fa4dd915737c5d54fef2c61794525e61fdeef3
|
@@ -1,9 +1,8 @@
|
|
1
1
|
/**
|
2
|
-
* @preserve jQuery DateTimePicker plugin v2.3.
|
2
|
+
* @preserve jQuery DateTimePicker plugin v2.3.8
|
3
3
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
4
4
|
* (c) 2014, Chupurnov Valeriy.
|
5
5
|
*/
|
6
|
-
|
7
6
|
(function ($) {
|
8
7
|
'use strict';
|
9
8
|
var default_options = {
|
@@ -235,29 +234,37 @@
|
|
235
234
|
},
|
236
235
|
value: '',
|
237
236
|
lang: 'en',
|
237
|
+
|
238
238
|
format: 'Y/m/d H:i',
|
239
239
|
formatTime: 'H:i',
|
240
240
|
formatDate: 'Y/m/d',
|
241
|
+
|
241
242
|
startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
|
242
243
|
step: 60,
|
243
244
|
monthChangeSpinner: true,
|
245
|
+
|
244
246
|
closeOnDateSelect: false,
|
245
247
|
closeOnWithoutClick: true,
|
246
248
|
closeOnInputClick: true,
|
249
|
+
|
247
250
|
timepicker: true,
|
248
251
|
datepicker: true,
|
249
252
|
weeks: false,
|
253
|
+
|
250
254
|
defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
|
251
255
|
defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
|
256
|
+
|
252
257
|
minDate: false,
|
253
258
|
maxDate: false,
|
254
259
|
minTime: false,
|
255
260
|
maxTime: false,
|
261
|
+
|
256
262
|
allowTimes: [],
|
257
263
|
opened: false,
|
258
264
|
initTime: true,
|
259
265
|
inline: false,
|
260
266
|
theme: '',
|
267
|
+
|
261
268
|
onSelectDate: function () {},
|
262
269
|
onSelectTime: function () {},
|
263
270
|
onChangeMonth: function () {},
|
@@ -266,6 +273,7 @@
|
|
266
273
|
onShow: function () {},
|
267
274
|
onClose: function () {},
|
268
275
|
onGenerate: function () {},
|
276
|
+
|
269
277
|
withoutCopyright: true,
|
270
278
|
inverseButton: false,
|
271
279
|
hours12: false,
|
@@ -277,9 +285,11 @@
|
|
277
285
|
timepickerScrollbar: true,
|
278
286
|
todayButton: true,
|
279
287
|
defaultSelect: true,
|
288
|
+
|
280
289
|
scrollMonth: true,
|
281
290
|
scrollTime: true,
|
282
291
|
scrollInput: true,
|
292
|
+
|
283
293
|
lazyInit: false,
|
284
294
|
mask: false,
|
285
295
|
validateOnBlur: true,
|
@@ -316,11 +326,11 @@
|
|
316
326
|
touch;
|
317
327
|
if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
|
318
328
|
touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
|
319
|
-
out.x = touch.
|
320
|
-
out.y = touch.
|
329
|
+
out.x = touch.clientX;
|
330
|
+
out.y = touch.clientY;
|
321
331
|
} else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
|
322
|
-
out.x = e.
|
323
|
-
out.y = e.
|
332
|
+
out.x = e.clientX;
|
333
|
+
out.y = e.clientY;
|
324
334
|
}
|
325
335
|
return out;
|
326
336
|
},
|
@@ -331,7 +341,14 @@
|
|
331
341
|
scrollbar,
|
332
342
|
scroller,
|
333
343
|
maximumOffset = 100,
|
334
|
-
start = false
|
344
|
+
start = false,
|
345
|
+
startY = 0,
|
346
|
+
startTop = 0,
|
347
|
+
h1 = 0,
|
348
|
+
touchStart = false,
|
349
|
+
startTopScroll = 0,
|
350
|
+
calcOffset = function () {};
|
351
|
+
|
335
352
|
if (!$(this).hasClass('xdsoft_scroller_box')) {
|
336
353
|
timebox = timeboxparent.children().eq(0);
|
337
354
|
parentHeight = timeboxparent[0].clientHeight;
|
@@ -341,33 +358,53 @@
|
|
341
358
|
scrollbar.append(scroller);
|
342
359
|
|
343
360
|
timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
|
344
|
-
|
345
|
-
|
346
|
-
|
361
|
+
calcOffset = function calcOffset(event) {
|
362
|
+
var offset = pointerEventToXY(event).y - startY + startTopScroll;
|
363
|
+
if (offset < 0) {
|
364
|
+
offset = 0;
|
365
|
+
}
|
366
|
+
if (offset + scroller[0].offsetHeight > h1) {
|
367
|
+
offset = h1 - scroller[0].offsetHeight;
|
347
368
|
}
|
348
|
-
|
349
|
-
|
369
|
+
timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
|
370
|
+
};
|
371
|
+
|
372
|
+
scroller
|
373
|
+
.on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
|
374
|
+
if (!parentHeight) {
|
375
|
+
timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
|
376
|
+
}
|
377
|
+
|
378
|
+
startY = pointerEventToXY(event).y;
|
379
|
+
startTopScroll = parseInt(scroller.css('margin-top'), 10);
|
350
380
|
h1 = scrollbar[0].offsetHeight;
|
351
381
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
382
|
+
if (event.type === 'mousedown') {
|
383
|
+
if (document) {
|
384
|
+
$(document.body).addClass('xdsoft_noselect');
|
385
|
+
}
|
386
|
+
$([document.body, window]).on('mouseup.xdsoft_scroller', function arguments_callee() {
|
387
|
+
$([document.body, window]).off('mouseup.xdsoft_scroller', arguments_callee)
|
388
|
+
.off('mousemove.xdsoft_scroller', calcOffset)
|
389
|
+
.removeClass('xdsoft_noselect');
|
390
|
+
});
|
391
|
+
$(document.body).on('mousemove.xdsoft_scroller', calcOffset);
|
392
|
+
} else {
|
393
|
+
touchStart = true;
|
394
|
+
event.stopPropagation();
|
395
|
+
event.preventDefault();
|
364
396
|
}
|
365
|
-
|
366
|
-
|
397
|
+
})
|
398
|
+
.on('touchmove', function (event) {
|
399
|
+
if (touchStart) {
|
400
|
+
event.preventDefault();
|
401
|
+
calcOffset(event);
|
367
402
|
}
|
368
|
-
|
403
|
+
})
|
404
|
+
.on('touchend touchcancel', function (event) {
|
405
|
+
touchStart = false;
|
406
|
+
startTopScroll = 0;
|
369
407
|
});
|
370
|
-
});
|
371
408
|
|
372
409
|
timeboxparent
|
373
410
|
.on('scroll_element.xdsoft_scroller', function (event, percentage) {
|
@@ -375,7 +412,9 @@
|
|
375
412
|
timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
|
376
413
|
}
|
377
414
|
percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
|
415
|
+
|
378
416
|
scroller.css('margin-top', maximumOffset * percentage);
|
417
|
+
|
379
418
|
setTimeout(function () {
|
380
419
|
timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10));
|
381
420
|
}, 10);
|
@@ -397,28 +436,36 @@
|
|
397
436
|
}
|
398
437
|
}
|
399
438
|
});
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
439
|
+
|
440
|
+
timeboxparent.on('mousewheel', function (event) {
|
441
|
+
var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
|
442
|
+
|
443
|
+
top = top - (event.deltaY * 20);
|
444
|
+
if (top < 0) {
|
445
|
+
top = 0;
|
446
|
+
}
|
447
|
+
|
448
|
+
timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
|
449
|
+
event.stopPropagation();
|
450
|
+
return false;
|
451
|
+
});
|
452
|
+
|
408
453
|
timeboxparent.on('touchstart', function (event) {
|
409
454
|
start = pointerEventToXY(event);
|
455
|
+
startTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
|
410
456
|
});
|
457
|
+
|
411
458
|
timeboxparent.on('touchmove', function (event) {
|
412
459
|
if (start) {
|
413
|
-
var coord = pointerEventToXY(event), top = Math.abs(parseInt(timebox.css('marginTop'), 10));
|
414
|
-
timeboxparent.trigger('scroll_element.xdsoft_scroller', [(top - (coord.y - start.y)) / (height - parentHeight)]);
|
415
|
-
event.stopPropagation();
|
416
460
|
event.preventDefault();
|
417
|
-
|
461
|
+
var coord = pointerEventToXY(event);
|
462
|
+
timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
|
418
463
|
}
|
419
464
|
});
|
465
|
+
|
420
466
|
timeboxparent.on('touchend touchcancel', function (event) {
|
421
467
|
start = false;
|
468
|
+
startTop = 0;
|
422
469
|
});
|
423
470
|
}
|
424
471
|
timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
|
@@ -491,7 +538,7 @@
|
|
491
538
|
yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
|
492
539
|
triggerAfterOpen = false,
|
493
540
|
XDSoft_datetime,
|
494
|
-
scroll_element,
|
541
|
+
//scroll_element,
|
495
542
|
xchangeTimer,
|
496
543
|
timerclick,
|
497
544
|
current_time_index,
|
@@ -652,8 +699,8 @@
|
|
652
699
|
if (node.createTextRange) {
|
653
700
|
var textRange = node.createTextRange();
|
654
701
|
textRange.collapse(true);
|
655
|
-
textRange.moveEnd('character',pos);
|
656
|
-
textRange.moveStart('character',pos);
|
702
|
+
textRange.moveEnd('character', pos);
|
703
|
+
textRange.moveStart('character', pos);
|
657
704
|
textRange.select();
|
658
705
|
return true;
|
659
706
|
}
|
@@ -733,7 +780,7 @@
|
|
733
780
|
input.trigger('error_input.xdsoft');
|
734
781
|
}
|
735
782
|
} else {
|
736
|
-
if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key)
|
783
|
+
if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
|
737
784
|
return true;
|
738
785
|
}
|
739
786
|
}
|
@@ -776,12 +823,12 @@
|
|
776
823
|
return false;
|
777
824
|
});
|
778
825
|
|
779
|
-
scroll_element = timepicker.find('.xdsoft_time_box');
|
780
|
-
|
781
|
-
|
826
|
+
//scroll_element = timepicker.find('.xdsoft_time_box');
|
827
|
+
timeboxparent.append(timebox);
|
828
|
+
timeboxparent.xdsoftScroller();
|
782
829
|
|
783
830
|
datetimepicker.on('afterOpen.xdsoft', function () {
|
784
|
-
|
831
|
+
timeboxparent.xdsoftScroller();
|
785
832
|
});
|
786
833
|
|
787
834
|
datetimepicker
|
@@ -1264,7 +1311,7 @@
|
|
1264
1311
|
}
|
1265
1312
|
|
1266
1313
|
if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
|
1267
|
-
options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
1314
|
+
options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
|
1268
1315
|
}
|
1269
1316
|
|
1270
1317
|
datetimepicker.data('changed', true);
|
@@ -1299,19 +1346,20 @@
|
|
1299
1346
|
}
|
1300
1347
|
|
1301
1348
|
if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
|
1302
|
-
options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
1349
|
+
options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
|
1303
1350
|
}
|
1304
1351
|
datetimepicker.data('changed', true);
|
1305
1352
|
datetimepicker.trigger('xchange.xdsoft');
|
1306
1353
|
datetimepicker.trigger('changedatetime.xdsoft');
|
1307
1354
|
});
|
1308
1355
|
|
1309
|
-
|
1310
|
-
|
1356
|
+
|
1357
|
+
datepicker
|
1358
|
+
.on('mousewheel.xdsoft', function (event) {
|
1311
1359
|
if (!options.scrollMonth) {
|
1312
1360
|
return true;
|
1313
1361
|
}
|
1314
|
-
if (
|
1362
|
+
if (event.deltaY < 0) {
|
1315
1363
|
_xdsoft_datetime.nextMonth();
|
1316
1364
|
} else {
|
1317
1365
|
_xdsoft_datetime.prevMonth();
|
@@ -1319,34 +1367,15 @@
|
|
1319
1367
|
return false;
|
1320
1368
|
});
|
1321
1369
|
|
1322
|
-
|
1323
|
-
|
1324
|
-
return true;
|
1325
|
-
}
|
1326
|
-
var pheight = timeboxparent[0].clientHeight,
|
1327
|
-
height = timebox[0].offsetHeight,
|
1328
|
-
top = Math.abs(parseInt(timebox.css('marginTop'), 10)),
|
1329
|
-
fl = true;
|
1330
|
-
if (delta < 0 && (height - pheight) - options.timeHeightInTimePicker >= top) {
|
1331
|
-
timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
|
1332
|
-
fl = false;
|
1333
|
-
} else if (delta > 0 && top - options.timeHeightInTimePicker >= 0) {
|
1334
|
-
timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
|
1335
|
-
fl = false;
|
1336
|
-
}
|
1337
|
-
timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox.css('marginTop'), 10) / (height - pheight))]);
|
1338
|
-
event.stopPropagation();
|
1339
|
-
return fl;
|
1340
|
-
});
|
1341
|
-
|
1342
|
-
input.mousewheel(function (event, delta, deltaX, deltaY) {
|
1370
|
+
input
|
1371
|
+
.on('mousewheel.xdsoft', function (event) {
|
1343
1372
|
if (!options.scrollInput) {
|
1344
1373
|
return true;
|
1345
1374
|
}
|
1346
1375
|
if (!options.datepicker && options.timepicker) {
|
1347
1376
|
current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
|
1348
|
-
if (current_time_index +
|
1349
|
-
current_time_index +=
|
1377
|
+
if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
|
1378
|
+
current_time_index += event.deltaY;
|
1350
1379
|
}
|
1351
1380
|
if (timebox.children().eq(current_time_index).length) {
|
1352
1381
|
timebox.children().eq(current_time_index).trigger('mousedown');
|
@@ -1354,7 +1383,7 @@
|
|
1354
1383
|
return false;
|
1355
1384
|
}
|
1356
1385
|
if (options.datepicker && !options.timepicker) {
|
1357
|
-
datepicker.trigger(event, [
|
1386
|
+
datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
|
1358
1387
|
if (input.val) {
|
1359
1388
|
input.val(_xdsoft_datetime.str());
|
1360
1389
|
}
|
@@ -1362,13 +1391,12 @@
|
|
1362
1391
|
return false;
|
1363
1392
|
}
|
1364
1393
|
});
|
1365
|
-
}
|
1366
1394
|
|
1367
1395
|
datetimepicker
|
1368
|
-
.on('changedatetime.xdsoft', function () {
|
1396
|
+
.on('changedatetime.xdsoft', function (event) {
|
1369
1397
|
if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
|
1370
1398
|
var $input = datetimepicker.data('input');
|
1371
|
-
options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input);
|
1399
|
+
options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
|
1372
1400
|
delete options.value;
|
1373
1401
|
$input.trigger('change');
|
1374
1402
|
}
|
@@ -1412,10 +1440,10 @@
|
|
1412
1440
|
});
|
1413
1441
|
};
|
1414
1442
|
datetimepicker
|
1415
|
-
.on('open.xdsoft', function () {
|
1443
|
+
.on('open.xdsoft', function (event) {
|
1416
1444
|
var onShow = true;
|
1417
1445
|
if (options.onShow && $.isFunction(options.onShow)) {
|
1418
|
-
onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
1446
|
+
onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
|
1419
1447
|
}
|
1420
1448
|
if (onShow !== false) {
|
1421
1449
|
datetimepicker.show();
|
@@ -1439,7 +1467,7 @@
|
|
1439
1467
|
.find('.xdsoft_select')
|
1440
1468
|
.hide();
|
1441
1469
|
if (options.onClose && $.isFunction(options.onClose)) {
|
1442
|
-
onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
|
1470
|
+
onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
|
1443
1471
|
}
|
1444
1472
|
if (onClose !== false && !options.opened && !options.inline) {
|
1445
1473
|
datetimepicker.hide();
|
@@ -1586,22 +1614,15 @@
|
|
1586
1614
|
$.fn.datetimepicker.defaults = default_options;
|
1587
1615
|
}(jQuery));
|
1588
1616
|
(function () {
|
1589
|
-
|
1590
|
-
|
1591
|
-
* Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net)
|
1592
|
-
*
|
1617
|
+
|
1618
|
+
/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
|
1593
1619
|
* Licensed under the MIT License (LICENSE.txt).
|
1594
1620
|
*
|
1595
|
-
*
|
1596
|
-
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
1597
|
-
* Thanks to: Seamus Leahy for adding deltaX and deltaY
|
1598
|
-
*
|
1599
|
-
* Version: 3.1.3
|
1621
|
+
* Version: 3.1.12
|
1600
1622
|
*
|
1601
|
-
* Requires: 1.2.2+
|
1623
|
+
* Requires: jQuery 1.2.2+
|
1602
1624
|
*/
|
1603
|
-
|
1604
|
-
|
1625
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
|
1605
1626
|
|
1606
1627
|
// Parse and Format Library
|
1607
1628
|
//http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/
|
@@ -1618,5 +1639,4 @@
|
|
1618
1639
|
* details.
|
1619
1640
|
*/
|
1620
1641
|
Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(b){if(b=="unixtime"){return parseInt(this.getTime()/1000);}if(Date.formatFunctions[b]==null){Date.createNewFormat(b);}var a=Date.formatFunctions[b];return this[a]();};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function() {return ";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;code+="'"+String.escape(ch)+"' + ";}else{code+=Date.getFormatCode(ch);}}}eval(code.substring(0,code.length-3)+";}");};Date.getFormatCode=function(a){switch(a){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(a)+"' + ";}};Date.parseDate=function(a,c){if(c=="unixtime"){return new Date(!isNaN(parseInt(a))?parseInt(a)*1000:0);}if(Date.parseFunctions[c]==null){Date.createParser(c);}var b=Date.parseFunctions[c];return Date[b](a);};Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++;var regexNum=Date.parseRegexes.length;var currentGroup=1;Date.parseFunctions[format]=funcName;var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {";var regex="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;regex+=String.escape(ch);}else{obj=Date.formatCodeToRegex(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){code+=obj.c;}}}}code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}";code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code);};Date.formatCodeToRegex=function(b,a){switch(b){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+a+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+a+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+a+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+a+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+a+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+a+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(b)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0");};Date.prototype.getDayOfYear=function(){var a=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var b=0;b<this.getMonth();++b){a+=Date.daysInMonth[b];}return a+this.getDate();};Date.prototype.getWeekOfYear=function(){var b=this.getDayOfYear()+(4-this.getDay());var a=new Date(this.getFullYear(),0,1);var c=(7-a.getDay()+4);return String.leftPad(Math.ceil((b-c)/7)+1,2,"0");};Date.prototype.isLeapYear=function(){var a=this.getFullYear();return((a&3)==0&&(a%100||(a%400==0&&a)));};Date.prototype.getFirstDayOfMonth=function(){var a=(this.getDay()-(this.getDate()-1))%7;return(a<0)?(a+7):a;};Date.prototype.getLastDayOfMonth=function(){var a=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(a<0)?(a+7):a;};Date.prototype.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};String.escape=function(a){return a.replace(/('|\\)/g,"\\$1");};String.leftPad=function(d,b,c){var a=new String(d);if(c==null){c=" ";}while(a.length<b){a=c+a;}return a;};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"};
|
1621
|
-
|
1622
|
-
}())
|
1642
|
+
}());
|
@@ -190,7 +190,7 @@
|
|
190
190
|
text-align:center;
|
191
191
|
cursor:pointer;
|
192
192
|
}
|
193
|
-
.xdsoft_datetimepicker .xdsoft_label:hover{
|
193
|
+
.xdsoft_datetimepicker .xdsoft_label:hover>span{
|
194
194
|
text-decoration:underline;
|
195
195
|
}
|
196
196
|
.xdsoft_datetimepicker .xdsoft_label:hover i{
|
@@ -214,7 +214,8 @@
|
|
214
214
|
background: #ff8000;
|
215
215
|
}
|
216
216
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{
|
217
|
-
padding:2px 10px 2px 5px;
|
217
|
+
padding:2px 10px 2px 5px;
|
218
|
+
text-decoration:none !important;
|
218
219
|
}
|
219
220
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
|
220
221
|
background: #33AAFF;
|