jquery-datetimepicker-rails 2.0.5.0 → 2.0.6.0
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: f68a39a251d738cc4e9bf0767a210513ea1ea3d4
|
4
|
+
data.tar.gz: 5bdd35471f3b7f775e6b49b02eac39e0644f9d56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80e42a043e90b6bd6c1460542208caa093d69e08f28f964b92305f90923696943a54b4c8261448dd9a8c8105083ad0e39f6fcf86824f5914d4a6ac7e405c1fd1
|
7
|
+
data.tar.gz: 9e02166fffa4d10040ddae02524c2277f10d70e80d5bee2387ded0a5010c72eb2a7cab4ece932a258ffbd959ef4b0c99747f4fa3220a6ae4f92ba36d4118e450
|
@@ -1,9 +1,18 @@
|
|
1
1
|
/**
|
2
|
-
* @preserve jQuery DateTimePicker plugin v2.0.
|
2
|
+
* @preserve jQuery DateTimePicker plugin v2.0.6
|
3
3
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
4
4
|
* (c) 2013, Chupurnov Valeriy.
|
5
5
|
*/
|
6
6
|
(function( $ ){
|
7
|
+
// fix for ie8
|
8
|
+
if (!Array.prototype.indexOf) {
|
9
|
+
Array.prototype.indexOf = function(obj, start) {
|
10
|
+
for (var i = (start || 0), j = this.length; i < j; i++) {
|
11
|
+
if (this[i] === obj) { return i; }
|
12
|
+
}
|
13
|
+
return -1;
|
14
|
+
}
|
15
|
+
}
|
7
16
|
$.fn.xdsoftScroller = function( _percent ){
|
8
17
|
return this.each(function(){
|
9
18
|
var timeboxparent = $(this);
|
@@ -188,7 +197,7 @@
|
|
188
197
|
scrollMonth:true,
|
189
198
|
scrollTime:true,
|
190
199
|
scrollInput:true,
|
191
|
-
mask:
|
200
|
+
mask:false,
|
192
201
|
validateOnBlur:true,
|
193
202
|
yearStart:1950,
|
194
203
|
yearEnd:2050,
|
@@ -393,14 +402,9 @@
|
|
393
402
|
input.trigger('error_input.xdsoft');
|
394
403
|
}
|
395
404
|
break;
|
396
|
-
case (
|
397
|
-
case
|
398
|
-
|
399
|
-
case ~[ENTER].indexOf(key):
|
400
|
-
var elementSelector = "input:visible,textarea:visible";
|
401
|
-
$(elementSelector ).eq($(elementSelector ).index(this) + 1).focus();
|
402
|
-
return false;
|
403
|
-
case ~[TAB].indexOf(key):return true;
|
405
|
+
case ( !!~([AKEY,CKEY,VKEY,ZKEY,YKEY].indexOf(key))&&ctrlDown ):
|
406
|
+
case !!~([ESC,ARROWUP,ARROWDOWN,ARROWLEFT,ARROWRIGHT,F5,CTRLKEY].indexOf(key)):
|
407
|
+
return true;
|
404
408
|
}
|
405
409
|
event.preventDefault();
|
406
410
|
return false;
|
@@ -807,7 +811,7 @@
|
|
807
811
|
if( left+datetimepicker[0].offsetWidth>$('body').width() )
|
808
812
|
left = offset.left-datetimepicker[0].offsetWidth+datetimepicker.data('input')[0].offsetWidth;
|
809
813
|
datetimepicker.css({
|
810
|
-
left:
|
814
|
+
left:left,
|
811
815
|
top:top
|
812
816
|
});
|
813
817
|
};
|
@@ -867,12 +871,26 @@
|
|
867
871
|
datetimepicker.trigger('open.xdsoft');
|
868
872
|
},100);
|
869
873
|
})
|
870
|
-
.on('
|
874
|
+
.on('keydown.xdsoft',function( event ){
|
875
|
+
var val = this.value,
|
876
|
+
key = event.which;
|
877
|
+
switch(true){
|
878
|
+
case !!~([ENTER].indexOf(key)):
|
879
|
+
var elementSelector = $("input:visible,textarea:visible");
|
880
|
+
datetimepicker.trigger('close.xdsoft');
|
881
|
+
elementSelector.eq(elementSelector.index(this) + 1).focus();
|
882
|
+
return false;
|
883
|
+
case !!~[TAB].indexOf(key):
|
884
|
+
datetimepicker.trigger('close.xdsoft');
|
885
|
+
return true;
|
886
|
+
}
|
887
|
+
});
|
888
|
+
/*.on('focusout.xdsoft',function(event){
|
871
889
|
clearTimeout(timer1);
|
872
890
|
timer1 = setTimeout(function(){
|
873
|
-
datetimepicker.trigger('close.xdsoft');
|
891
|
+
//datetimepicker.trigger('close.xdsoft');
|
874
892
|
},100);
|
875
|
-
})
|
893
|
+
});*/
|
876
894
|
},
|
877
895
|
destroyDateTimePicker = function( input ){
|
878
896
|
var datetimepicker = input.data('xdsoft_datetimepicker');
|