pickadate-rails 1.5.0 → 3.5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/pickadate-rails/version.rb +1 -1
- data/vendor/assets/javascripts/pickadate/picker.date.js +4 -1
- data/vendor/assets/javascripts/pickadate/picker.js +15 -7
- data/vendor/assets/javascripts/pickadate/translations/ar.js +1 -1
- data/vendor/assets/javascripts/pickadate/translations/ne_NP.js +5 -5
- data/vendor/assets/javascripts/pickadate/translations/vi_VN.js +11 -0
- data/vendor/assets/stylesheets/pickadate/classic.date.css +11 -8
- data/vendor/assets/stylesheets/pickadate/classic.time.css +11 -8
- data/vendor/assets/stylesheets/pickadate/default.date.css +11 -8
- data/vendor/assets/stylesheets/pickadate/default.time.css +11 -8
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a03735dfd406419ae4a91ab88e22934a625308f
|
4
|
+
data.tar.gz: 8402a50c281a0fbe9f3ddbad500e9377516c5865
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a371a687dc857ab7a7f084b6e83c6bd1adc8c12effa633f0a8413a8cd7be0c340adf4c1e5584be6afa7b0e181d82ced60022ff44e71a465a64b54d6a08e81683
|
7
|
+
data.tar.gz: 0802c8d2fa01201a092527292b36439b6b0ff45222bd450d6b260ba91f12dbdd2fbcb79fb761db2656051d2941fc62c718fc8264779344f86bfdcb9dbca3daf9
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Pickadate-Rails [![Gem Version](https://badge.fury.io/rb/pickadate-rails.png)](http://badge.fury.io/rb/pickadate-rails)
|
2
2
|
|
3
|
-
## Pickadate Version: 3.5.0
|
3
|
+
## Pickadate Version: 3.5.2.0
|
4
4
|
|
5
5
|
Easily add [pickadate.js](https://github.com/amsul/pickadate.js) to your Rails 3.1+ application using the asset pipeline.
|
6
6
|
|
@@ -48,7 +48,7 @@ Translations are available by loading them in your javascript/coffeescript file.
|
|
48
48
|
|
49
49
|
## Versioning
|
50
50
|
|
51
|
-
|
51
|
+
Starting with version 3.5.2.0 of this gem, we have switched to matching the gem version with pickadate's current version number. We'll use the tiny version number for changes to the gem itself. Therefore, the gem version jumps from 1.5 (bundling pickadate 3.5) to 3.5.2.0 (bundling pickadate 3.5.2).
|
52
52
|
|
53
53
|
## Updating
|
54
54
|
|
@@ -760,13 +760,16 @@ DatePicker.prototype.isDateExact = function( one, two ) {
|
|
760
760
|
*/
|
761
761
|
DatePicker.prototype.isDateOverlap = function( one, two ) {
|
762
762
|
|
763
|
-
var calendar = this
|
763
|
+
var calendar = this,
|
764
|
+
firstDay = calendar.settings.firstDay ? 1 : 0
|
764
765
|
|
765
766
|
// When we’re working with a weekday index, compare the days.
|
766
767
|
if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) {
|
768
|
+
one = one % 7 + firstDay
|
767
769
|
return one === calendar.create( two ).day + 1
|
768
770
|
}
|
769
771
|
if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) {
|
772
|
+
two = two % 7 + firstDay
|
770
773
|
return two === calendar.create( one ).day + 1
|
771
774
|
}
|
772
775
|
|
@@ -16,7 +16,9 @@
|
|
16
16
|
|
17
17
|
}(function( $ ) {
|
18
18
|
|
19
|
+
var $window = $( window )
|
19
20
|
var $document = $( document )
|
21
|
+
var $html = $( document.documentElement )
|
20
22
|
|
21
23
|
|
22
24
|
/**
|
@@ -231,7 +233,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
231
233
|
|
232
234
|
// Prevent the page from scrolling.
|
233
235
|
if ( IS_DEFAULT_THEME ) {
|
234
|
-
$
|
236
|
+
$html.
|
235
237
|
css( 'overflow', 'hidden' ).
|
236
238
|
css( 'padding-right', '+=' + getScrollbarWidth() )
|
237
239
|
}
|
@@ -348,7 +350,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
348
350
|
|
349
351
|
// Allow the page to scroll.
|
350
352
|
if ( IS_DEFAULT_THEME ) {
|
351
|
-
$
|
353
|
+
$html.
|
352
354
|
css( 'overflow', '' ).
|
353
355
|
css( 'padding-right', '-=' + getScrollbarWidth() )
|
354
356
|
}
|
@@ -438,11 +440,13 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
438
440
|
// Check if a component item exists, return that.
|
439
441
|
if ( thing in P.component.item ) {
|
440
442
|
if ( typeof format == 'string' ) {
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
443
|
+
var thingValue = P.component.get( thing )
|
444
|
+
return thingValue ?
|
445
|
+
PickerConstructor._.trigger(
|
446
|
+
P.component.formats.toString,
|
447
|
+
P.component,
|
448
|
+
[ format, thingValue ]
|
449
|
+
) : ''
|
446
450
|
}
|
447
451
|
return P.component.get( thing )
|
448
452
|
}
|
@@ -830,6 +834,10 @@ function isUsingDefaultTheme( element ) {
|
|
830
834
|
*/
|
831
835
|
function getScrollbarWidth() {
|
832
836
|
|
837
|
+
if ( $html.height() <= $window.height() ) {
|
838
|
+
return 0
|
839
|
+
}
|
840
|
+
|
833
841
|
var $outer = $( '<div style="visibility:hidden;width:100px" />' ).
|
834
842
|
appendTo( 'body' )
|
835
843
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Arabic
|
2
2
|
|
3
|
-
|
3
|
+
jQuery.extend( jQuery.fn.pickadate.defaults, {
|
4
4
|
monthsFull: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ],
|
5
5
|
monthsShort: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ],
|
6
6
|
weekdaysFull: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ],
|
@@ -1,13 +1,13 @@
|
|
1
1
|
// Nepali
|
2
2
|
|
3
3
|
jQuery.extend( jQuery.fn.pickadate.defaults, {
|
4
|
-
monthsFull: [ '
|
5
|
-
monthsShort: [ 'जन', '
|
6
|
-
weekdaysFull: [ '
|
7
|
-
weekdaysShort: [ '
|
4
|
+
monthsFull: [ 'जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्त', 'सेप्टेम्बर', 'अक्टोबर', 'नोवेम्बर', 'डिसेम्बर' ],
|
5
|
+
monthsShort: [ 'जन', 'फेब्रु', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुल', 'अग', 'सेप्टे', 'अक्टो', 'नोभे', 'डिसे' ],
|
6
|
+
weekdaysFull: [ 'सोमबार', 'मङ्लबार', 'बुधबार', 'बिहीबार', 'शुक्रबार', 'शनिबार', 'आईतबार' ],
|
7
|
+
weekdaysShort: [ 'सोम', 'मंगल्', 'बुध', 'बिही', 'शुक्र', 'शनि', 'आईत' ],
|
8
8
|
numbers: [ '०', '१', '२', '३', '४', '५', '६', '७', '८', '९' ],
|
9
9
|
today: 'आज',
|
10
10
|
clear: 'मेटाउनुहोस्',
|
11
11
|
format: 'dddd, dd mmmm, yyyy',
|
12
12
|
formatSubmit: 'yyyy/mm/dd'
|
13
|
-
});
|
13
|
+
});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Vietnamese
|
2
|
+
|
3
|
+
jQuery.extend( jQuery.fn.pickadate.defaults, {
|
4
|
+
monthsFull: [ 'Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai' ],
|
5
|
+
monthsShort: [ 'Một', 'Hai', 'Ba', 'Tư', 'Năm', 'Sáu', 'Bảy', 'Tám', 'Chín', 'Mưới', 'Mười Một', 'Mười Hai' ],
|
6
|
+
weekdaysFull: [ 'Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy' ],
|
7
|
+
weekdaysShort: [ 'C.Nhật', 'T.Hai', 'T.Ba', 'T.Tư', 'T.Năm', 'T.Sáu', 'T.Bảy' ],
|
8
|
+
today: 'Hôm Nay',
|
9
|
+
clear: 'Xoá',
|
10
|
+
firstDay: 1
|
11
|
+
});
|
@@ -66,6 +66,7 @@
|
|
66
66
|
padding: .5em 1.25em;
|
67
67
|
width: 1em;
|
68
68
|
height: 1em;
|
69
|
+
box-sizing: content-box;
|
69
70
|
top: -0.25em;
|
70
71
|
}
|
71
72
|
@media (min-width: 24.5em) {
|
@@ -169,7 +170,6 @@
|
|
169
170
|
border: 1px solid transparent;
|
170
171
|
}
|
171
172
|
.picker__day--today {
|
172
|
-
color: #0089ec;
|
173
173
|
position: relative;
|
174
174
|
}
|
175
175
|
.picker__day--today:before {
|
@@ -182,13 +182,6 @@
|
|
182
182
|
border-top: 0.5em solid #0059bc;
|
183
183
|
border-left: .5em solid transparent;
|
184
184
|
}
|
185
|
-
.picker__day--selected,
|
186
|
-
.picker__day--selected:hover {
|
187
|
-
border-color: #0089ec;
|
188
|
-
}
|
189
|
-
.picker__day--highlighted {
|
190
|
-
background: #b1dcfb;
|
191
|
-
}
|
192
185
|
.picker__day--disabled:before {
|
193
186
|
border-top-color: #aaaaaa;
|
194
187
|
}
|
@@ -201,8 +194,18 @@
|
|
201
194
|
color: #000000;
|
202
195
|
background: #b1dcfb;
|
203
196
|
}
|
197
|
+
.picker__day--highlighted {
|
198
|
+
border-color: #0089ec;
|
199
|
+
}
|
204
200
|
.picker__day--highlighted:hover,
|
205
201
|
.picker--focused .picker__day--highlighted {
|
202
|
+
cursor: pointer;
|
203
|
+
color: #000000;
|
204
|
+
background: #b1dcfb;
|
205
|
+
}
|
206
|
+
.picker__day--selected,
|
207
|
+
.picker__day--selected:hover,
|
208
|
+
.picker--focused .picker__day--selected {
|
206
209
|
background: #0089ec;
|
207
210
|
color: #ffffff;
|
208
211
|
}
|
@@ -33,21 +33,24 @@
|
|
33
33
|
border-color: #0089ec;
|
34
34
|
z-index: 10;
|
35
35
|
}
|
36
|
-
/*
|
37
|
-
.picker__list-item--
|
38
|
-
.picker__list-item--selected:hover {
|
36
|
+
/* Highlighted and hovered/focused time */
|
37
|
+
.picker__list-item--highlighted {
|
39
38
|
border-color: #0089ec;
|
40
39
|
z-index: 10;
|
41
40
|
}
|
42
|
-
/* Highlighted time */
|
43
|
-
.picker__list-item--highlighted {
|
44
|
-
background: #b1dcfb;
|
45
|
-
}
|
46
|
-
/* Highlighted and hovered/focused time */
|
47
41
|
.picker__list-item--highlighted:hover,
|
48
42
|
.picker--focused .picker__list-item--highlighted {
|
43
|
+
cursor: pointer;
|
44
|
+
color: #000000;
|
45
|
+
background: #b1dcfb;
|
46
|
+
}
|
47
|
+
/* Selected and hovered/focused time */
|
48
|
+
.picker__list-item--selected,
|
49
|
+
.picker__list-item--selected:hover,
|
50
|
+
.picker--focused .picker__list-item--selected {
|
49
51
|
background: #0089ec;
|
50
52
|
color: #ffffff;
|
53
|
+
z-index: 10;
|
51
54
|
}
|
52
55
|
/* Disabled time */
|
53
56
|
.picker__list-item--disabled,
|
@@ -66,6 +66,7 @@
|
|
66
66
|
padding: .5em 1.25em;
|
67
67
|
width: 1em;
|
68
68
|
height: 1em;
|
69
|
+
box-sizing: content-box;
|
69
70
|
top: -0.25em;
|
70
71
|
}
|
71
72
|
@media (min-width: 24.5em) {
|
@@ -169,7 +170,6 @@
|
|
169
170
|
border: 1px solid transparent;
|
170
171
|
}
|
171
172
|
.picker__day--today {
|
172
|
-
color: #0089ec;
|
173
173
|
position: relative;
|
174
174
|
}
|
175
175
|
.picker__day--today:before {
|
@@ -182,13 +182,6 @@
|
|
182
182
|
border-top: 0.5em solid #0059bc;
|
183
183
|
border-left: .5em solid transparent;
|
184
184
|
}
|
185
|
-
.picker__day--selected,
|
186
|
-
.picker__day--selected:hover {
|
187
|
-
border-color: #0089ec;
|
188
|
-
}
|
189
|
-
.picker__day--highlighted {
|
190
|
-
background: #b1dcfb;
|
191
|
-
}
|
192
185
|
.picker__day--disabled:before {
|
193
186
|
border-top-color: #aaaaaa;
|
194
187
|
}
|
@@ -201,8 +194,18 @@
|
|
201
194
|
color: #000000;
|
202
195
|
background: #b1dcfb;
|
203
196
|
}
|
197
|
+
.picker__day--highlighted {
|
198
|
+
border-color: #0089ec;
|
199
|
+
}
|
204
200
|
.picker__day--highlighted:hover,
|
205
201
|
.picker--focused .picker__day--highlighted {
|
202
|
+
cursor: pointer;
|
203
|
+
color: #000000;
|
204
|
+
background: #b1dcfb;
|
205
|
+
}
|
206
|
+
.picker__day--selected,
|
207
|
+
.picker__day--selected:hover,
|
208
|
+
.picker--focused .picker__day--selected {
|
206
209
|
background: #0089ec;
|
207
210
|
color: #ffffff;
|
208
211
|
}
|
@@ -33,21 +33,24 @@
|
|
33
33
|
border-color: #0089ec;
|
34
34
|
z-index: 10;
|
35
35
|
}
|
36
|
-
/*
|
37
|
-
.picker__list-item--
|
38
|
-
.picker__list-item--selected:hover {
|
36
|
+
/* Highlighted and hovered/focused time */
|
37
|
+
.picker__list-item--highlighted {
|
39
38
|
border-color: #0089ec;
|
40
39
|
z-index: 10;
|
41
40
|
}
|
42
|
-
/* Highlighted time */
|
43
|
-
.picker__list-item--highlighted {
|
44
|
-
background: #b1dcfb;
|
45
|
-
}
|
46
|
-
/* Highlighted and hovered/focused time */
|
47
41
|
.picker__list-item--highlighted:hover,
|
48
42
|
.picker--focused .picker__list-item--highlighted {
|
43
|
+
cursor: pointer;
|
44
|
+
color: #000000;
|
45
|
+
background: #b1dcfb;
|
46
|
+
}
|
47
|
+
/* Selected and hovered/focused time */
|
48
|
+
.picker__list-item--selected,
|
49
|
+
.picker__list-item--selected:hover,
|
50
|
+
.picker--focused .picker__list-item--selected {
|
49
51
|
background: #0089ec;
|
50
52
|
color: #ffffff;
|
53
|
+
z-index: 10;
|
51
54
|
}
|
52
55
|
/* Disabled time */
|
53
56
|
.picker__list-item--disabled,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pickadate-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Fraser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- vendor/assets/javascripts/pickadate/translations/th_TH.js
|
109
109
|
- vendor/assets/javascripts/pickadate/translations/tr_TR.js
|
110
110
|
- vendor/assets/javascripts/pickadate/translations/uk_UA.js
|
111
|
+
- vendor/assets/javascripts/pickadate/translations/vi_VN.js
|
111
112
|
- vendor/assets/javascripts/pickadate/translations/zh_CN.js
|
112
113
|
- vendor/assets/javascripts/pickadate/translations/zh_TW.js
|
113
114
|
- vendor/assets/stylesheets/pickadate/classic.css
|