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: 9ac41172dc640d4e97f52ddac82213eb57749b7d
4
- data.tar.gz: 1589b9309b615ff58d3837f53efd20712352f723
3
+ metadata.gz: f68a39a251d738cc4e9bf0767a210513ea1ea3d4
4
+ data.tar.gz: 5bdd35471f3b7f775e6b49b02eac39e0644f9d56
5
5
  SHA512:
6
- metadata.gz: 0ff426bc01263987470b36111c5e0b5361e8acd4d9c601988a82119dbe72281547a529859205358a54f8982218efd942ae96bf7845a16a3eaab2bad71504827a
7
- data.tar.gz: 1b810f89702077a66e1b157324483d644e146ef4440643a52b5d843da8210c0d960bb840d7402dce204c3cba7f807886c930635581635c33154cca6f5abf645b
6
+ metadata.gz: 80e42a043e90b6bd6c1460542208caa093d69e08f28f964b92305f90923696943a54b4c8261448dd9a8c8105083ad0e39f6fcf86824f5914d4a6ac7e405c1fd1
7
+ data.tar.gz: 9e02166fffa4d10040ddae02524c2277f10d70e80d5bee2387ded0a5010c72eb2a7cab4ece932a258ffbd959ef4b0c99747f4fa3220a6ae4f92ba36d4118e450
@@ -1,9 +1,18 @@
1
1
  /**
2
- * @preserve jQuery DateTimePicker plugin v2.0.5
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:true,
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 ( ~[AKEY,CKEY,VKEY,ZKEY,YKEY].indexOf(key)&&ctrlDown ):
397
- case ~[ESC,ARROWUP,ARROWDOWN,ARROWLEFT,ARROWRIGHT,F5,CTRLKEY].indexOf(key):
398
- return true;
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:offset.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('focusout.xdsoft',function(event){
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');
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Datetimepicker
3
3
  module Rails
4
- VERSION = '2.0.5.0'
4
+ VERSION = '2.0.6.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-datetimepicker-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5.0
4
+ version: 2.0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov