jquery-datetimepicker-rails 2.3.7.0 → 2.3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b6e45c0b7083cfb0b2fec8c911e677e0109feaf
4
- data.tar.gz: 5841fba19a7c18d5f93eb513bd56c1681a75a6ae
3
+ metadata.gz: e32ec4bd8a85ed90950369ec535010bb39aa80e2
4
+ data.tar.gz: 5881fcdb8a3816f77dd4dd5d9ce04d776f84aa77
5
5
  SHA512:
6
- metadata.gz: 704310f198ebf37a890787e48a742b6b11185d03e22636d8a89252b1d8067c2d056247db1c282a41c4d88e258b111fcd56255a09e50198b5aae85d1b7e6322b0
7
- data.tar.gz: 099bdf00130693554619b305055102ab646125154bc2a80eea49e38de2869853907defcba56fd05404172e4f4e385069a7d278b815fd48135114b0131f59fa77
6
+ metadata.gz: 1a6d65bf4542fa190b4b0fb97f3eeeb7eb893c1e88110bde99b1d2e278c6d02fdc4dde88abf808eb983ab31c3a6c9efcb6589b45e8666fff8ec6ec29b2447a07
7
+ data.tar.gz: 52dc6ea276b05784a01cad64a216f7e9f62d7c215fa52bebd12b66deb633310c3d9803a8ff74c656817fdb0cc0c69c32a0be5795959bb1493f58db62ac1ef7ad
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @preserve jQuery DateTimePicker plugin v2.3.7
2
+ * @preserve jQuery DateTimePicker plugin v2.3.9
3
3
  * @homepage http://xdsoft.net/jqplugins/datetimepicker/
4
4
  * (c) 2014, Chupurnov Valeriy.
5
5
  */
6
-
6
+ /*global document,window,jQuery,setTimeout,clearTimeout*/
7
7
  (function ($) {
8
8
  'use strict';
9
9
  var default_options = {
@@ -235,29 +235,37 @@
235
235
  },
236
236
  value: '',
237
237
  lang: 'en',
238
+
238
239
  format: 'Y/m/d H:i',
239
240
  formatTime: 'H:i',
240
241
  formatDate: 'Y/m/d',
242
+
241
243
  startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
242
244
  step: 60,
243
245
  monthChangeSpinner: true,
246
+
244
247
  closeOnDateSelect: false,
245
248
  closeOnWithoutClick: true,
246
249
  closeOnInputClick: true,
250
+
247
251
  timepicker: true,
248
252
  datepicker: true,
249
253
  weeks: false,
254
+
250
255
  defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
251
256
  defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
257
+
252
258
  minDate: false,
253
259
  maxDate: false,
254
260
  minTime: false,
255
261
  maxTime: false,
262
+
256
263
  allowTimes: [],
257
264
  opened: false,
258
265
  initTime: true,
259
266
  inline: false,
260
267
  theme: '',
268
+
261
269
  onSelectDate: function () {},
262
270
  onSelectTime: function () {},
263
271
  onChangeMonth: function () {},
@@ -266,6 +274,7 @@
266
274
  onShow: function () {},
267
275
  onClose: function () {},
268
276
  onGenerate: function () {},
277
+
269
278
  withoutCopyright: true,
270
279
  inverseButton: false,
271
280
  hours12: false,
@@ -277,9 +286,11 @@
277
286
  timepickerScrollbar: true,
278
287
  todayButton: true,
279
288
  defaultSelect: true,
289
+
280
290
  scrollMonth: true,
281
291
  scrollTime: true,
282
292
  scrollInput: true,
293
+
283
294
  lazyInit: false,
284
295
  mask: false,
285
296
  validateOnBlur: true,
@@ -292,8 +303,11 @@
292
303
  roundTime: 'round', // ceil, floor
293
304
  className: '',
294
305
  weekends: [],
306
+ disabledDates : [],
295
307
  yearOffset: 0,
296
- beforeShowDay: null
308
+ beforeShowDay: null,
309
+
310
+ enterLikeTab: true
297
311
  };
298
312
  // fix for ie8
299
313
  if (!Array.prototype.indexOf) {
@@ -316,11 +330,11 @@
316
330
  touch;
317
331
  if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
318
332
  touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
319
- out.x = touch.pageX;
320
- out.y = touch.pageY;
333
+ out.x = touch.clientX;
334
+ out.y = touch.clientY;
321
335
  } 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.pageX;
323
- out.y = e.pageY;
336
+ out.x = e.clientX;
337
+ out.y = e.clientY;
324
338
  }
325
339
  return out;
326
340
  },
@@ -331,7 +345,17 @@
331
345
  scrollbar,
332
346
  scroller,
333
347
  maximumOffset = 100,
334
- start = false;
348
+ start = false,
349
+ startY = 0,
350
+ startTop = 0,
351
+ h1 = 0,
352
+ touchStart = false,
353
+ startTopScroll = 0,
354
+ calcOffset = function () {};
355
+ if (percent === 'hide') {
356
+ timeboxparent.find('.xdsoft_scrollbar').hide();
357
+ return;
358
+ }
335
359
  if (!$(this).hasClass('xdsoft_scroller_box')) {
336
360
  timebox = timeboxparent.children().eq(0);
337
361
  parentHeight = timeboxparent[0].clientHeight;
@@ -341,33 +365,53 @@
341
365
  scrollbar.append(scroller);
342
366
 
343
367
  timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
344
- scroller.on('mousedown.xdsoft_scroller', function (event) {
345
- if (!parentHeight) {
346
- timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
368
+ calcOffset = function calcOffset(event) {
369
+ var offset = pointerEventToXY(event).y - startY + startTopScroll;
370
+ if (offset < 0) {
371
+ offset = 0;
347
372
  }
348
- var pageY = event.pageY,
349
- top = parseInt(scroller.css('margin-top'), 10),
373
+ if (offset + scroller[0].offsetHeight > h1) {
374
+ offset = h1 - scroller[0].offsetHeight;
375
+ }
376
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
377
+ };
378
+
379
+ scroller
380
+ .on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
381
+ if (!parentHeight) {
382
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
383
+ }
384
+
385
+ startY = pointerEventToXY(event).y;
386
+ startTopScroll = parseInt(scroller.css('margin-top'), 10);
350
387
  h1 = scrollbar[0].offsetHeight;
351
388
 
352
- if (document) {
353
- $(document.body).addClass('xdsoft_noselect');
354
- }
355
- $([document.body, window]).on('mouseup.xdsoft_scroller', function arguments_callee() {
356
- $([document.body, window]).off('mouseup.xdsoft_scroller', arguments_callee)
357
- .off('mousemove.xdsoft_scroller', move)
358
- .removeClass('xdsoft_noselect');
359
- });
360
- $(document.body).on('mousemove.xdsoft_scroller', move = function (event) {
361
- var offset = event.pageY - pageY + top;
362
- if (offset < 0) {
363
- offset = 0;
389
+ if (event.type === 'mousedown') {
390
+ if (document) {
391
+ $(document.body).addClass('xdsoft_noselect');
392
+ }
393
+ $([document.body, window]).on('mouseup.xdsoft_scroller', function arguments_callee() {
394
+ $([document.body, window]).off('mouseup.xdsoft_scroller', arguments_callee)
395
+ .off('mousemove.xdsoft_scroller', calcOffset)
396
+ .removeClass('xdsoft_noselect');
397
+ });
398
+ $(document.body).on('mousemove.xdsoft_scroller', calcOffset);
399
+ } else {
400
+ touchStart = true;
401
+ event.stopPropagation();
402
+ event.preventDefault();
364
403
  }
365
- if (offset + scroller[0].offsetHeight > h1) {
366
- offset = h1 - scroller[0].offsetHeight;
404
+ })
405
+ .on('touchmove', function (event) {
406
+ if (touchStart) {
407
+ event.preventDefault();
408
+ calcOffset(event);
367
409
  }
368
- timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
410
+ })
411
+ .on('touchend touchcancel', function (event) {
412
+ touchStart = false;
413
+ startTopScroll = 0;
369
414
  });
370
- });
371
415
 
372
416
  timeboxparent
373
417
  .on('scroll_element.xdsoft_scroller', function (event, percentage) {
@@ -375,7 +419,9 @@
375
419
  timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
376
420
  }
377
421
  percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
422
+
378
423
  scroller.css('margin-top', maximumOffset * percentage);
424
+
379
425
  setTimeout(function () {
380
426
  timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10));
381
427
  }, 10);
@@ -397,28 +443,36 @@
397
443
  }
398
444
  }
399
445
  });
400
- if (timeboxparent.mousewheel) {
401
- timeboxparent.mousewheel(function (event, delta, deltaX, deltaY) {
402
- var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
403
- timeboxparent.trigger('scroll_element.xdsoft_scroller', [(top - delta * 20) / (height - parentHeight)]);
404
- event.stopPropagation();
405
- return false;
406
- });
407
- }
446
+
447
+ timeboxparent.on('mousewheel', function (event) {
448
+ var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
449
+
450
+ top = top - (event.deltaY * 20);
451
+ if (top < 0) {
452
+ top = 0;
453
+ }
454
+
455
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
456
+ event.stopPropagation();
457
+ return false;
458
+ });
459
+
408
460
  timeboxparent.on('touchstart', function (event) {
409
461
  start = pointerEventToXY(event);
462
+ startTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
410
463
  });
464
+
411
465
  timeboxparent.on('touchmove', function (event) {
412
466
  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
467
  event.preventDefault();
417
- start = pointerEventToXY(event);
468
+ var coord = pointerEventToXY(event);
469
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
418
470
  }
419
471
  });
472
+
420
473
  timeboxparent.on('touchend touchcancel', function (event) {
421
474
  start = false;
475
+ startTop = 0;
422
476
  });
423
477
  }
424
478
  timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
@@ -485,13 +539,13 @@
485
539
  timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
486
540
  timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
487
541
  timebox = $('<div class="xdsoft_time_variant"></div>'),
488
- scrollbar = $('<div class="xdsoft_scrollbar"></div>'),
489
- scroller = $('<div class="xdsoft_scroller"></div>'),
542
+ /*scrollbar = $('<div class="xdsoft_scrollbar"></div>'),
543
+ scroller = $('<div class="xdsoft_scroller"></div>'),*/
490
544
  monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
491
545
  yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
492
546
  triggerAfterOpen = false,
493
547
  XDSoft_datetime,
494
- scroll_element,
548
+ //scroll_element,
495
549
  xchangeTimer,
496
550
  timerclick,
497
551
  current_time_index,
@@ -573,6 +627,10 @@
573
627
  options.weekends = $.extend(true, [], _options.weekends);
574
628
  }
575
629
 
630
+ if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
631
+ options.disabledDates = $.extend(true, [], _options.disabledDates);
632
+ }
633
+
576
634
  if ((options.open || options.opened) && (!options.inline)) {
577
635
  input.trigger('open.xdsoft');
578
636
  }
@@ -614,7 +672,7 @@
614
672
  }
615
673
 
616
674
  if (!options.timepickerScrollbar) {
617
- scrollbar.hide();
675
+ timeboxparent.xdsoftScroller('hide');
618
676
  }
619
677
 
620
678
  if (options.minDate && /^-(.*)$/.test(options.minDate)) {
@@ -652,8 +710,8 @@
652
710
  if (node.createTextRange) {
653
711
  var textRange = node.createTextRange();
654
712
  textRange.collapse(true);
655
- textRange.moveEnd('character',pos);
656
- textRange.moveStart('character',pos);
713
+ textRange.moveEnd('character', pos);
714
+ textRange.moveStart('character', pos);
657
715
  textRange.select();
658
716
  return true;
659
717
  }
@@ -733,7 +791,7 @@
733
791
  input.trigger('error_input.xdsoft');
734
792
  }
735
793
  } else {
736
- if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key)!==-1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
794
+ if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
737
795
  return true;
738
796
  }
739
797
  }
@@ -776,12 +834,12 @@
776
834
  return false;
777
835
  });
778
836
 
779
- scroll_element = timepicker.find('.xdsoft_time_box');
780
- scroll_element.append(timebox);
781
- scroll_element.xdsoftScroller();
837
+ //scroll_element = timepicker.find('.xdsoft_time_box');
838
+ timeboxparent.append(timebox);
839
+ timeboxparent.xdsoftScroller();
782
840
 
783
841
  datetimepicker.on('afterOpen.xdsoft', function () {
784
- scroll_element.xdsoftScroller();
842
+ timeboxparent.xdsoftScroller();
785
843
  });
786
844
 
787
845
  datetimepicker
@@ -1096,6 +1154,8 @@
1096
1154
 
1097
1155
  if ((maxDate !== false && start > maxDate) || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) {
1098
1156
  classes.push('xdsoft_disabled');
1157
+ } else if (options.disabledDates.indexOf(start.dateFormat(options.formatDate)) !== -1) {
1158
+ classes.push('xdsoft_disabled');
1099
1159
  }
1100
1160
 
1101
1161
  if (customDateSettings && customDateSettings[1] !== "") {
@@ -1264,7 +1324,7 @@
1264
1324
  }
1265
1325
 
1266
1326
  if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
1267
- options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1327
+ options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
1268
1328
  }
1269
1329
 
1270
1330
  datetimepicker.data('changed', true);
@@ -1299,19 +1359,20 @@
1299
1359
  }
1300
1360
 
1301
1361
  if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
1302
- options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1362
+ options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
1303
1363
  }
1304
1364
  datetimepicker.data('changed', true);
1305
1365
  datetimepicker.trigger('xchange.xdsoft');
1306
1366
  datetimepicker.trigger('changedatetime.xdsoft');
1307
1367
  });
1308
1368
 
1309
- if (datetimepicker.mousewheel) {
1310
- datepicker.mousewheel(function (event, delta, deltaX, deltaY) {
1369
+
1370
+ datepicker
1371
+ .on('mousewheel.xdsoft', function (event) {
1311
1372
  if (!options.scrollMonth) {
1312
1373
  return true;
1313
1374
  }
1314
- if (delta < 0) {
1375
+ if (event.deltaY < 0) {
1315
1376
  _xdsoft_datetime.nextMonth();
1316
1377
  } else {
1317
1378
  _xdsoft_datetime.prevMonth();
@@ -1319,34 +1380,15 @@
1319
1380
  return false;
1320
1381
  });
1321
1382
 
1322
- timeboxparent.unmousewheel().mousewheel(function (event, delta, deltaX, deltaY) {
1323
- if (!options.scrollTime) {
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) {
1383
+ input
1384
+ .on('mousewheel.xdsoft', function (event) {
1343
1385
  if (!options.scrollInput) {
1344
1386
  return true;
1345
1387
  }
1346
1388
  if (!options.datepicker && options.timepicker) {
1347
1389
  current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
1348
- if (current_time_index + delta >= 0 && current_time_index + delta < timebox.children().length) {
1349
- current_time_index += delta;
1390
+ if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
1391
+ current_time_index += event.deltaY;
1350
1392
  }
1351
1393
  if (timebox.children().eq(current_time_index).length) {
1352
1394
  timebox.children().eq(current_time_index).trigger('mousedown');
@@ -1354,7 +1396,7 @@
1354
1396
  return false;
1355
1397
  }
1356
1398
  if (options.datepicker && !options.timepicker) {
1357
- datepicker.trigger(event, [delta, deltaX, deltaY]);
1399
+ datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
1358
1400
  if (input.val) {
1359
1401
  input.val(_xdsoft_datetime.str());
1360
1402
  }
@@ -1362,13 +1404,12 @@
1362
1404
  return false;
1363
1405
  }
1364
1406
  });
1365
- }
1366
1407
 
1367
1408
  datetimepicker
1368
- .on('changedatetime.xdsoft', function () {
1409
+ .on('changedatetime.xdsoft', function (event) {
1369
1410
  if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
1370
1411
  var $input = datetimepicker.data('input');
1371
- options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input);
1412
+ options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
1372
1413
  delete options.value;
1373
1414
  $input.trigger('change');
1374
1415
  }
@@ -1412,10 +1453,10 @@
1412
1453
  });
1413
1454
  };
1414
1455
  datetimepicker
1415
- .on('open.xdsoft', function () {
1456
+ .on('open.xdsoft', function (event) {
1416
1457
  var onShow = true;
1417
1458
  if (options.onShow && $.isFunction(options.onShow)) {
1418
- onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1459
+ onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
1419
1460
  }
1420
1461
  if (onShow !== false) {
1421
1462
  datetimepicker.show();
@@ -1439,7 +1480,7 @@
1439
1480
  .find('.xdsoft_select')
1440
1481
  .hide();
1441
1482
  if (options.onClose && $.isFunction(options.onClose)) {
1442
- onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1483
+ onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
1443
1484
  }
1444
1485
  if (onClose !== false && !options.opened && !options.inline) {
1445
1486
  datetimepicker.hide();
@@ -1506,7 +1547,7 @@
1506
1547
  .on('keydown.xdsoft', function (event) {
1507
1548
  var val = this.value, elementSelector,
1508
1549
  key = event.which;
1509
- if ([ENTER].indexOf(key) !== -1) {
1550
+ if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
1510
1551
  elementSelector = $("input:visible,textarea:visible");
1511
1552
  datetimepicker.trigger('close.xdsoft');
1512
1553
  elementSelector.eq(elementSelector.index(this) + 1).focus();
@@ -1586,22 +1627,15 @@
1586
1627
  $.fn.datetimepicker.defaults = default_options;
1587
1628
  }(jQuery));
1588
1629
  (function () {
1589
- /* jshint ignore:start */
1590
- /*
1591
- * Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net)
1592
- *
1630
+
1631
+ /*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
1593
1632
  * Licensed under the MIT License (LICENSE.txt).
1594
1633
  *
1595
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
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
1634
+ * Version: 3.1.12
1598
1635
  *
1599
- * Version: 3.1.3
1600
- *
1601
- * Requires: 1.2.2+
1636
+ * Requires: jQuery 1.2.2+
1602
1637
  */
1603
- (function (factory) {if (typeof define==='function'&&define.amd) {define(['jquery'],factory)}else if(typeof exports==='object') {module.exports=factory}else{factory(jQuery)}}(function($) {var toFix=['wheel','mousewheel','DOMMouseScroll','MozMousePixelScroll'];var toBind='onwheel'in document||document.documentMode>=9?['wheel']:['mousewheel','DomMouseScroll','MozMousePixelScroll'];var lowestDelta,lowestDeltaXY;if($.event.fixHooks) {for(var i=toFix.length;i;) {$.event.fixHooks[toFix[--i]]=$.event.mouseHooks}}$.event.special.mousewheel={setup:function() {if(this.addEventListener) {for(var i=toBind.length;i;) {this.addEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=handler}},teardown:function() {if(this.removeEventListener) {for(var i=toBind.length;i;) {this.removeEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=null}}};$.fn.extend({mousewheel:function(fn) {return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn) {return this.unbind("mousewheel",fn)}});function handler(event) {var orgEvent=event||window.event,args=[].slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0,absDeltaXY=0,fn;event=$.event.fix(orgEvent);event.type="mousewheel";if(orgEvent.wheelDelta) {delta=orgEvent.wheelDelta}if(orgEvent.detail) {delta=orgEvent.detail*-1}if(orgEvent.deltaY) {deltaY=orgEvent.deltaY*-1;delta=deltaY}if(orgEvent.deltaX) {deltaX=orgEvent.deltaX;delta=deltaX*-1}if(orgEvent.wheelDeltaY!==undefined) {deltaY=orgEvent.wheelDeltaY}if(orgEvent.wheelDeltaX!==undefined) {deltaX=orgEvent.wheelDeltaX*-1}absDelta=Math.abs(delta);if(!lowestDelta||absDelta<lowestDelta) {lowestDelta=absDelta}absDeltaXY=Math.max(Math.abs(deltaY),Math.abs(deltaX));if(!lowestDeltaXY||absDeltaXY<lowestDeltaXY) {lowestDeltaXY=absDeltaXY}fn=delta>0?'floor':'ceil';delta=Math[fn](delta/lowestDelta);deltaX=Math[fn](deltaX/lowestDeltaXY);deltaY=Math[fn](deltaY/lowestDeltaXY);args.unshift(event,delta,deltaX,deltaY);return($.event.dispatch||$.event.handle).apply(this,args)}}));
1604
-
1638
+ !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
1639
 
1606
1640
  // Parse and Format Library
1607
1641
  //http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/
@@ -1618,5 +1652,4 @@
1618
1652
  * details.
1619
1653
  */
1620
1654
  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
- /* jshint ignore:end */
1622
- }())
1655
+ }());
@@ -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;
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Datetimepicker
3
3
  module Rails
4
- VERSION = '2.3.7.0'
4
+ VERSION = '2.3.9.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-datetimepicker-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.7.0
4
+ version: 2.3.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-16 00:00:00.000000000 Z
11
+ date: 2014-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler