jquery-datetimepicker-rails 2.2.6.0 → 2.2.7.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: cc5b35f98750af468c60c717d0e95926232031cc
4
- data.tar.gz: cddb5745d49e4879e9c8919b2f961af542b00d74
3
+ metadata.gz: 0bd592c9061f859b3d3748784a1a64b78d64a475
4
+ data.tar.gz: 989d72d872d9ed5bdc3c18336a69bf97a068cf97
5
5
  SHA512:
6
- metadata.gz: 2821ca19a7ffde0208044a7aca9a97142d6ac2dc1b80911c73f1f99f5f3a366e462e168eaf782542a29564d87b2a01dda4fae10dbe05cafbf80296cf72de8032
7
- data.tar.gz: 24985b79c66f5fc09049027424631ce4b92302dce4381b537e5d91ff6324bf7ab4f674cf99a5ea4b73e5d19bc829072bc4d04881cc9bddc015459aa7982ffad5
6
+ metadata.gz: c389862476b82e4162ba03d5b4cf641096a630965b7cfd1aebacde2c5bf15366b1a77541c642ed5df3ba0421dcac7bbc7b99d11477d355fbc57a94501cf4aac4
7
+ data.tar.gz: cd4225d8dea7b67cb2c6ad6b6c80095c5d1d65732fce4cd40ce4f47d63ad23cffaa2a51ac507d85f7c17e145ce71e61b53c0fd3b6a536220f9d7f28431075d98
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @preserve jQuery DateTimePicker plugin v2.2.6
2
+ * @preserve jQuery DateTimePicker plugin v2.2.7
3
3
  * @homepage http://xdsoft.net/jqplugins/datetimepicker/
4
4
  * (c) 2014, Chupurnov Valeriy.
5
5
  */
@@ -158,19 +158,17 @@
158
158
  dayOfWeek: [
159
159
  "CN", "T2", "T3", "T4", "T5", "T6", "T7"
160
160
  ]
161
- },
161
+ }
162
162
  },
163
163
  value:'',
164
- lang: 'en',
164
+ lang:'en',
165
165
 
166
- format: 'Y/m/d H:i',
166
+ format: 'Y/m/d H:i',
167
167
  formatTime: 'H:i',
168
168
  formatDate: 'Y/m/d',
169
169
 
170
170
  startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
171
171
 
172
- //fromUnixtime: false,
173
-
174
172
  step:60,
175
173
  monthChangeSpinner:true,
176
174
  closeOnDateSelect:false,
@@ -474,9 +472,9 @@
474
472
  }
475
473
 
476
474
  if( options.inline ) {
475
+ triggerAfterOpen = true;
477
476
  datetimepicker.addClass('xdsoft_inline');
478
477
  input.after(datetimepicker).hide();
479
- datetimepicker.trigger('afterOpen.xdsoft');
480
478
  }
481
479
 
482
480
  if( options.inverseButton ) {
@@ -643,8 +641,10 @@
643
641
  });
644
642
  }
645
643
  options.dayOfWeekStartPrev = (options.dayOfWeekStart==0)?6:options.dayOfWeekStart-1;
644
+
646
645
  datetimepicker
647
- .trigger('xchange.xdsoft');
646
+ .trigger('xchange.xdsoft')
647
+ .trigger('afterOpen.xdsoft')
648
648
  };
649
649
 
650
650
  datetimepicker
@@ -660,6 +660,7 @@
660
660
  var scroll_element = timepicker.find('.xdsoft_time_box');
661
661
  scroll_element.append(timebox);
662
662
  scroll_element.xdsoftScroller();
663
+
663
664
  datetimepicker.on('afterOpen.xdsoft',function() {
664
665
  scroll_element.xdsoftScroller();
665
666
  });
@@ -985,7 +986,8 @@
985
986
  opt+='<div class="xdsoft_option '+(_xdsoft_datetime.currentTime.getMonth()==i?'xdsoft_current':'')+'" data-value="'+i+'">'+options.i18n[options.lang].months[i]+'</div>';
986
987
  }
987
988
  monthselect.children().eq(0).html(opt);
988
- $(datetimepicker).trigger('generate.xdsoft');
989
+ $(datetimepicker)
990
+ .trigger('generate.xdsoft');
989
991
  },10);
990
992
  event.stopPropagation();
991
993
  })
@@ -1004,8 +1006,9 @@
1004
1006
  top = timebox.find(classType).index()*options.timeHeightInTimePicker+1;
1005
1007
  if( (height-pheight)<top )
1006
1008
  top = height-pheight;
1007
- timebox.css('marginTop','-'+parseInt(top)+'px');
1008
1009
  timeboxparent.trigger('scroll_element.xdsoft_scroller',[parseInt(top)/(height-pheight)]);
1010
+ }else{
1011
+ timeboxparent.trigger('scroll_element.xdsoft_scroller',[0]);
1009
1012
  }
1010
1013
  }
1011
1014
  });
@@ -1021,9 +1024,10 @@
1021
1024
  if( $this.hasClass('xdsoft_disabled') )
1022
1025
  return false;
1023
1026
 
1024
- currentTime.setDate( $this.data('date') );
1025
- currentTime.setMonth( $this.data('month') );
1027
+ currentTime.setDate( 1 );
1026
1028
  currentTime.setFullYear( $this.data('year') );
1029
+ currentTime.setMonth( $this.data('month') );
1030
+ currentTime.setDate( $this.data('date') );
1027
1031
 
1028
1032
  datetimepicker.trigger('select.xdsoft',[currentTime]);
1029
1033
 
@@ -1095,7 +1099,8 @@
1095
1099
  event.stopPropagation();
1096
1100
  return fl;
1097
1101
  });
1098
-
1102
+
1103
+ var triggerAfterOpen = false;
1099
1104
  datetimepicker
1100
1105
  .on('changedatetime.xdsoft',function() {
1101
1106
  if( options.onChangeDateTime&&options.onChangeDateTime.call ) {
@@ -1107,6 +1112,10 @@
1107
1112
  .on('generate.xdsoft',function() {
1108
1113
  if( options.onGenerate&&options.onGenerate.call )
1109
1114
  options.onGenerate.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'));
1115
+ if( triggerAfterOpen ){
1116
+ datetimepicker.trigger('afterOpen.xdsoft');
1117
+ triggerAfterOpen = false;
1118
+ }
1110
1119
  })
1111
1120
  .on( 'click.xdsoft', function( xdevent )
1112
1121
  {
@@ -1151,7 +1160,6 @@
1151
1160
  }
1152
1161
  if( onShow!==false ) {
1153
1162
  datetimepicker.show();
1154
- datetimepicker.trigger('afterOpen.xdsoft');
1155
1163
  setPos();
1156
1164
  $(window)
1157
1165
  .off('resize.xdsoft',setPos)
@@ -1200,8 +1208,6 @@
1200
1208
 
1201
1209
  _xdsoft_datetime.setCurrentTime( getCurrentValue() );
1202
1210
 
1203
- datetimepicker.trigger('afterOpen.xdsoft');
1204
-
1205
1211
  input
1206
1212
  .data( 'xdsoft_datetimepicker',datetimepicker )
1207
1213
  .on('open.xdsoft focusin.xdsoft mousedown.xdsoft',function(event) {
@@ -1211,6 +1217,8 @@
1211
1217
  timer = setTimeout(function() {
1212
1218
  if( input.is(':disabled')||input.is(':hidden')||!input.is(':visible') )
1213
1219
  return;
1220
+
1221
+ triggerAfterOpen = true;
1214
1222
  _xdsoft_datetime.setCurrentTime(getCurrentValue());
1215
1223
 
1216
1224
  datetimepicker.trigger('open.xdsoft');
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Datetimepicker
3
3
  module Rails
4
- VERSION = '2.2.6.0'
4
+ VERSION = '2.2.7.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.2.6.0
4
+ version: 2.2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov