jquery-datetimepicker-rails 2.1.5.0 → 2.1.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: ca85fef2592716923d0f555d68726afdafe456e7
4
- data.tar.gz: a0c04b13aa8bca9a6429f7fc6247940fdc26cd2c
3
+ metadata.gz: 9aed7d47647b968466ff209d6ebb8106324d1340
4
+ data.tar.gz: 9f49458d058775fdb209f6732964862736d868b5
5
5
  SHA512:
6
- metadata.gz: e811f06bda0a517e0546f0a7d38a5fa5810d9f0ca4af5987308fbddbd9767515ec693f9d90905c3ac8d22aae89035714ec06f01351747104da7815a416fdfbf5
7
- data.tar.gz: 3cd23429aed838e64a666fe0e4e1e1131c8abc9a40ad214e1897fea3bdd7ef088a2fbb02bd8a57e590fa81d85177f0344864fe9cd17f4a594cccdfa9ec1ca00e
6
+ metadata.gz: 98467c68704f8c1df1639784382ae657953313d992d673845e36919d84b5da6c468565420b36943e980dd1d3c1d675151456d3352139d4b9310438ab8108fdef
7
+ data.tar.gz: 40764ee5762370891e3f83dd4ed0c7a03cfad0c54b8332a3c85c7028570998a0f53876b979272bbf6a6092e14c83ec8485c8f78cfe0640010cd8015f0d34bf4b
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @preserve jQuery DateTimePicker plugin v2.1.5
2
+ * @preserve jQuery DateTimePicker plugin v2.1.6
3
3
  * @homepage http://xdsoft.net/jqplugins/datetimepicker/
4
4
  * (c) 2014, Chupurnov Valeriy.
5
5
  */
@@ -70,6 +70,14 @@
70
70
  dayOfWeek:[
71
71
  'อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'
72
72
  ]
73
+ },
74
+ pl:{ // Polish
75
+ months: [
76
+ "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
77
+ ],
78
+ dayOfWeek: [
79
+ "nd", "pn", "wt", "śr", "cz", "pt", "sb"
80
+ ]
73
81
  }
74
82
  },
75
83
  value:'',
@@ -148,7 +156,7 @@
148
156
  },
149
157
  move = 0,
150
158
  timebox = timeboxparent.children().eq(0),
151
- parentHeight = timeboxparent[0].offsetHeight-2,
159
+ parentHeight = timeboxparent[0].clientHeight,
152
160
  height = timebox[0].offsetHeight,
153
161
  scrollbar = $('<div class="xdsoft_scrollbar"></div>'),
154
162
  scroller = $('<div class="xdsoft_scroller"></div>'),
@@ -159,6 +167,8 @@
159
167
 
160
168
  timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
161
169
  scroller.on('mousedown.xdsoft_scroller',function ( event ) {
170
+ if( !parentHeight )
171
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller',[_percent]);
162
172
  var pageY = event.pageY,
163
173
  top = parseInt(scroller.css('margin-top')),
164
174
  h1 = scrollbar[0].offsetHeight;
@@ -180,12 +190,14 @@
180
190
 
181
191
  timeboxparent
182
192
  .on('scroll_element.xdsoft_scroller',function( event,percent ) {
193
+ if( !parentHeight )
194
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller',[percent,true]);
183
195
  percent = percent>1?1:(percent<0||isNaN(percent))?0:percent;
184
196
  scroller.css('margin-top',maximumOffset*percent);
185
197
  timebox.css('marginTop',-parseInt((height-parentHeight)*percent))
186
198
  })
187
- .on('resize_scroll.xdsoft_scroller',function( event,_percent ) {
188
- parentHeight = timeboxparent[0].offsetHeight-2;
199
+ .on('resize_scroll.xdsoft_scroller',function( event,_percent,noTriggerScroll ) {
200
+ parentHeight = timeboxparent[0].clientHeight;
189
201
  height = timebox[0].offsetHeight;
190
202
  var percent = parentHeight/height,
191
203
  sh = percent*scrollbar[0].offsetHeight;
@@ -195,7 +207,8 @@
195
207
  scroller.show();
196
208
  scroller.css('height',parseInt(sh>10?sh:10));
197
209
  maximumOffset = scrollbar[0].offsetHeight-scroller[0].offsetHeight;
198
- timeboxparent.trigger('scroll_element.xdsoft_scroller',[_percent?_percent:Math.abs(parseInt(timebox.css('marginTop')))/(height-parentHeight)]);
210
+ if( noTriggerScroll!==true )
211
+ timeboxparent.trigger('scroll_element.xdsoft_scroller',[_percent?_percent:Math.abs(parseInt(timebox.css('marginTop')))/(height-parentHeight)]);
199
212
  }
200
213
  });
201
214
  timeboxparent.mousewheel&&timeboxparent.mousewheel(function(event, delta, deltaX, deltaY) {
@@ -287,7 +300,7 @@
287
300
  }else top+=items[0].offsetHeight;
288
301
  }
289
302
 
290
- select.xdsoftScroller(top/(select.children()[0].offsetHeight-(select[0].offsetHeight-2)));
303
+ select.xdsoftScroller(top/(select.children()[0].offsetHeight-(select[0].clientHeight)));
291
304
  event.stopPropagation();
292
305
  return false;
293
306
  });
@@ -632,7 +645,7 @@
632
645
  stop = false,
633
646
  period = 110;
634
647
  (function arguments_callee4(v) {
635
- var pheight = timeboxparent[0].offsetHeight-2,
648
+ var pheight = timeboxparent[0].clientHeight,
636
649
  height = timebox[0].offsetHeight,
637
650
  top = Math.abs(parseInt(timebox.css('marginTop')));
638
651
  if( $this.hasClass(options.next) && (height-pheight)- options.timeHeightInTimePicker>=top ) {
@@ -782,7 +795,7 @@
782
795
  })
783
796
  .on('afterOpen.xdsoft',function() {
784
797
  if( options.timepicker && timebox.find('.xdsoft_current').length ) {
785
- var pheight = timeboxparent[0].offsetHeight-2,
798
+ var pheight = timeboxparent[0].clientHeight,
786
799
  height = timebox[0].offsetHeight,
787
800
  top = timebox.find('.xdsoft_current').index()*options.timeHeightInTimePicker+1;
788
801
  if( (height-pheight)<top )
@@ -857,7 +870,7 @@
857
870
  datetimepicker.mousewheel&&timeboxparent.unmousewheel().mousewheel(function(event, delta, deltaX, deltaY) {
858
871
  if( !options.scrollTime )
859
872
  return true;
860
- var pheight = timeboxparent[0].offsetHeight-2,
873
+ var pheight = timeboxparent[0].clientHeight,
861
874
  height = timebox[0].offsetHeight,
862
875
  top = Math.abs(parseInt(timebox.css('marginTop'))),
863
876
  fl = true;
@@ -902,9 +915,9 @@
902
915
  });
903
916
  var setPos = function() {
904
917
  var offset = datetimepicker.data('input').offset(), top = offset.top+datetimepicker.data('input')[0].offsetHeight-1, left = offset.left;
905
- if( top+datetimepicker[0].offsetHeight>$('body').height() )
918
+ if( top+datetimepicker[0].offsetHeight>$(window).height() )
906
919
  top = offset.top-datetimepicker[0].offsetHeight+1;
907
- if( left+datetimepicker[0].offsetWidth>$('body').width() )
920
+ if( left+datetimepicker[0].offsetWidth>$(window).width() )
908
921
  left = offset.left-datetimepicker[0].offsetWidth+datetimepicker.data('input')[0].offsetWidth;
909
922
  datetimepicker.css({
910
923
  left:left,
@@ -988,12 +1001,6 @@
988
1001
  return true;
989
1002
  }
990
1003
  });
991
- /*.on('focusout.xdsoft',function(event) {
992
- clearTimeout(timer1);
993
- timer1 = setTimeout(function() {
994
- //datetimepicker.trigger('close.xdsoft');
995
- },100);
996
- });*/
997
1004
  },
998
1005
  destroyDateTimePicker = function( input ) {
999
1006
  var datetimepicker = input.data('xdsoft_datetimepicker');
@@ -241,6 +241,9 @@
241
241
  .xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{
242
242
  opacity:0.5;
243
243
  }
244
+ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{
245
+ opacity:0.2;
246
+ }
244
247
  .xdsoft_datetimepicker .xdsoft_calendar td:hover,
245
248
  .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
246
249
  color: #fff !important;
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Datetimepicker
3
3
  module Rails
4
- VERSION = '2.1.5.0'
4
+ VERSION = '2.1.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.1.5.0
4
+ version: 2.1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov