jquery-datetimepicker-rails 2.1.0.0 → 2.1.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df14cc30fe9e9300fb34998784457c4e25ca921d
|
4
|
+
data.tar.gz: 5b500a5ec949f122ff362415adfc55941a985701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aefa3f7f2e0c0a1dfc175909427174a2c2764438e607ec0fb3d5f6d9a150de386b942ef6328284f595e2a48c691a044e33213b16e7887e0be0edd805271d4318
|
7
|
+
data.tar.gz: 641864b968d2b2facadc5cfec52ef0745a0372bfa805a9b76c0b86b2114999735e73c30e67199cab720485d5e369bc0292bfbee31d22d8dc6e168e3eb98489be
|
@@ -1,9 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* @preserve jQuery DateTimePicker plugin v2.1.
|
2
|
+
* @preserve jQuery DateTimePicker plugin v2.1.1
|
3
3
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
4
4
|
* (c) 2013, Chupurnov Valeriy.
|
5
5
|
*/
|
6
6
|
(function( $ ) {
|
7
|
+
'use strict'
|
7
8
|
var default_options = {
|
8
9
|
i18n:{
|
9
10
|
ru:{
|
@@ -124,13 +125,13 @@
|
|
124
125
|
scrollbar.append(scroller);
|
125
126
|
|
126
127
|
timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
|
127
|
-
scroller.on('mousedown.xdsoft_scroller',function( event ) {
|
128
|
+
scroller.on('mousedown.xdsoft_scroller',function ( event ) {
|
128
129
|
var pageY = event.pageY,
|
129
130
|
top = parseInt(scroller.css('margin-top')),
|
130
131
|
h1 = scrollbar[0].offsetHeight;
|
131
132
|
$(document.body).addClass('xdsoft_noselect');
|
132
|
-
$([document.body,window]).on('mouseup.xdsoft_scroller',function() {
|
133
|
-
$([document.body,window]).off('mouseup.xdsoft_scroller',
|
133
|
+
$([document.body,window]).on('mouseup.xdsoft_scroller',function arguments_callee() {
|
134
|
+
$([document.body,window]).off('mouseup.xdsoft_scroller',arguments_callee)
|
134
135
|
.off('mousemove.xdsoft_scroller',move)
|
135
136
|
.removeClass('xdsoft_noselect');
|
136
137
|
});
|
@@ -548,6 +549,9 @@
|
|
548
549
|
datetimepicker.data('changed',true);
|
549
550
|
_xdsoft_datetime.setCurrentTime(new Date);
|
550
551
|
datetimepicker.trigger('afterOpen.xdsoft');
|
552
|
+
}).on('dblclick.xdsoft',function(){
|
553
|
+
input.val( _xdsoft_datetime.str() );
|
554
|
+
datetimepicker.trigger('close.xdsoft');
|
551
555
|
});
|
552
556
|
mounth_picker
|
553
557
|
.find('.xdsoft_prev,.xdsoft_next')
|
@@ -556,20 +560,20 @@
|
|
556
560
|
timer = 0,
|
557
561
|
stop = false;
|
558
562
|
|
559
|
-
(function(v) {
|
563
|
+
(function arguments_callee1(v) {
|
560
564
|
var month = _xdsoft_datetime.currentTime.getMonth();
|
561
565
|
if( $this.hasClass( options.next ) ) {
|
562
566
|
_xdsoft_datetime.nextMonth();
|
563
567
|
}else if( $this.hasClass( options.prev ) ) {
|
564
568
|
_xdsoft_datetime.prevMonth();
|
565
569
|
}
|
566
|
-
!stop&&(timer = setTimeout(
|
570
|
+
!stop&&(timer = setTimeout(arguments_callee1,v?v:100));
|
567
571
|
})(500);
|
568
572
|
|
569
|
-
$([document.body,window]).on('mouseup.xdsoft',function() {
|
573
|
+
$([document.body,window]).on('mouseup.xdsoft',function arguments_callee2() {
|
570
574
|
clearTimeout(timer);
|
571
575
|
stop = true;
|
572
|
-
$([document.body,window]).off('mouseup.xdsoft',
|
576
|
+
$([document.body,window]).off('mouseup.xdsoft',arguments_callee2);
|
573
577
|
});
|
574
578
|
});
|
575
579
|
|
@@ -580,7 +584,7 @@
|
|
580
584
|
timer = 0,
|
581
585
|
stop = false,
|
582
586
|
period = 110;
|
583
|
-
(function(v) {
|
587
|
+
(function arguments_callee4(v) {
|
584
588
|
var pheight = timeboxparent[0].offsetHeight-2,
|
585
589
|
height = timebox[0].offsetHeight,
|
586
590
|
top = Math.abs(parseInt(timebox.css('marginTop')));
|
@@ -591,13 +595,13 @@
|
|
591
595
|
}
|
592
596
|
timeboxparent.trigger('scroll_element.xdsoft_scroller',[Math.abs(parseInt(timebox.css('marginTop'))/(height-pheight))]);
|
593
597
|
period= ( period>10 )?10:period-10;
|
594
|
-
!stop&&(timer = setTimeout(
|
598
|
+
!stop&&(timer = setTimeout(arguments_callee4,v?v:period));
|
595
599
|
})(500);
|
596
|
-
$([document.body,window]).on('mouseup.xdsoft',function() {
|
600
|
+
$([document.body,window]).on('mouseup.xdsoft',function arguments_callee5() {
|
597
601
|
clearTimeout(timer);
|
598
602
|
stop = true;
|
599
603
|
$([document.body,window])
|
600
|
-
.off('mouseup.xdsoft',
|
604
|
+
.off('mouseup.xdsoft',arguments_callee5);
|
601
605
|
});
|
602
606
|
});
|
603
607
|
|
@@ -875,9 +879,9 @@
|
|
875
879
|
.on('resize.xdsoft',setPos);
|
876
880
|
|
877
881
|
if( options.closeOnWithoutClick ) {
|
878
|
-
$([document.body,window]).on('mousedown.xdsoft',function() {
|
882
|
+
$([document.body,window]).on('mousedown.xdsoft',function arguments_callee6() {
|
879
883
|
datetimepicker.trigger('close.xdsoft');
|
880
|
-
$([document.body,window]).off('mousedown.xdsoft',
|
884
|
+
$([document.body,window]).off('mousedown.xdsoft',arguments_callee6);
|
881
885
|
});
|
882
886
|
}
|
883
887
|
}
|
@@ -947,17 +951,14 @@
|
|
947
951
|
destroyDateTimePicker = function( input ) {
|
948
952
|
var datetimepicker = input.data('xdsoft_datetimepicker');
|
949
953
|
if( datetimepicker ) {
|
950
|
-
|
951
|
-
delete _xdsoft_datetime;
|
954
|
+
datetimepicker.data('xdsoft_datetime',null);
|
952
955
|
datetimepicker.remove();
|
953
|
-
delete datetimepicker;
|
954
956
|
input
|
955
957
|
.data( 'xdsoft_datetimepicker',null )
|
956
958
|
.off( 'open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft' );
|
957
959
|
$(window).off('resize.xdsoft');
|
958
960
|
$([window,document.body]).off('mousedown.xdsoft');
|
959
961
|
input.unmousewheel&&input.unmousewheel();
|
960
|
-
delete options;
|
961
962
|
}
|
962
963
|
};
|
963
964
|
$(document)
|