pickadate-rails 1.3.1 → 1.3.2

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: ee040041eef6c517e68b6879b8a780c6bdedd8ac
4
- data.tar.gz: fbc696df4935a0b63e33134e53735b186a9ff8f1
3
+ metadata.gz: 7ecab16b12a07768c82fb511574de65471ee0f84
4
+ data.tar.gz: b58d663694fe7f0dbe57f0029e63d2f5502d1024
5
5
  SHA512:
6
- metadata.gz: 83d3eee2474fdb0ec31f6c9f9b14b41d258dcd00235131c5569b26a1b2a6ba4dd18eaed2c7a9ee6a1f12308958e55d02e522f2b6bd75accedda2cd98e4cad9ee
7
- data.tar.gz: 1666b78ee8359dcf46538f6ef0a475436dc62b166469157a8ecbd5125cd6e853b35845f2d449495c4ee671145a5fb7db48f597a07c634cb7494f7ad04acd888d
6
+ metadata.gz: 1cf838b0a21a732e6e812b91f9dd24cbb2027564ff33166e80f75f4b52628e7bbeaab7c7ae6e3b34fd5a999a5d63944711aca9b46f2bc0f75a52aa47bdb7571a
7
+ data.tar.gz: 837f6c6e499d31bf216dc337b03b7f41ccb36c503e048a0d476939639fc18d48104226ad1668521f56bda52a6bf4a749fb414fcb1d87e86bd610a5d9767f28f7
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.3.1
3
+ ## Pickadate Version: 3.3.2
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
 
@@ -1,3 +1,3 @@
1
1
  module PickadateRails
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*!
3
- * Date picker for pickadate.js v3.3.1
3
+ * Date picker for pickadate.js v3.3.2
4
4
  * http://amsul.github.io/pickadate.js/date.htm
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*!
3
- * pickadate.js v3.3.1, 2013/12/04
3
+ * pickadate.js v3.3.2, 2013/12/28
4
4
  * By Amsul, http://amsul.ca
5
5
  * Hosted on http://amsul.github.io/pickadate.js
6
6
  * Licensed under MIT
@@ -124,7 +124,8 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
124
124
  // * For mousedown events, cancel the default action in order to
125
125
  // prevent cases where focus is shifted onto external elements
126
126
  // when using things like jQuery mobile or MagnificPopup (ref: #249 & #120).
127
- if ( event.type == 'mousedown' && !$( target ).is( ':input' ) ) {
127
+ // Also, for Firefox, don’t prevent action on the `option` element.
128
+ if ( event.type == 'mousedown' && !$( target ).is( ':input' ) && target.nodeName != 'OPTION' ) {
128
129
 
129
130
  event.preventDefault()
130
131
 
@@ -183,8 +184,8 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
183
184
  ( typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit' ) +
184
185
  '"' +
185
186
 
186
- // If the element has a `data-value`, set the element `value` as well.
187
- ( $ELEMENT.data( 'value' ) ?
187
+ // If the element has a value, set the hidden value as well.
188
+ ( $ELEMENT.data( 'value' ) || ELEMENT.value ?
188
189
  ' value="' + PickerConstructor._.trigger( P.component.formats.toString, P.component, [ SETTINGS.formatSubmit, P.component.item.select ] ) + '"' :
189
190
  ''
190
191
  ) +
@@ -317,8 +318,12 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
317
318
  // Remove the root.
318
319
  P.$root.remove()
319
320
 
320
- // Remove the input class, unbind the events, and remove the stored data.
321
- $ELEMENT.removeClass( CLASSES.input ).off( '.P' + STATE.id ).removeData( NAME )
321
+ // Remove the input class, remove the stored data, and unbind
322
+ // the events (after a tick for IE - see `P.close`).
323
+ $ELEMENT.removeClass( CLASSES.input ).removeData( NAME )
324
+ setTimeout( function() {
325
+ $ELEMENT.off( '.P' + STATE.id )
326
+ }, 0)
322
327
 
323
328
  // Restore the element state
324
329
  ELEMENT.type = STATE.type
@@ -447,15 +452,14 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
447
452
  // Remove the “opened” and “focused” class from the picker root.
448
453
  P.$root.removeClass( CLASSES.opened + ' ' + CLASSES.focused )
449
454
 
450
- // If it’s open, update the state.
451
- if ( STATE.open ) {
455
+ // If it’s already closed, do nothing more.
456
+ if ( !STATE.open ) return P
452
457
 
453
- // Set it as closed.
454
- STATE.open = false
458
+ // Set it as closed.
459
+ STATE.open = false
455
460
 
456
- // Unbind the document events.
457
- $document.off( '.P' + STATE.id )
458
- }
461
+ // Unbind the document events.
462
+ $document.off( '.P' + STATE.id )
459
463
 
460
464
  // Trigger the queued “close” events.
461
465
  return P.trigger( 'close' )
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*!
3
- * Time picker for pickadate.js v3.3.1
3
+ * Time picker for pickadate.js v3.3.2
4
4
  * http://amsul.github.io/pickadate.js/time.htm
5
5
  */
6
6
 
@@ -35,13 +35,19 @@
35
35
  */
36
36
  .picker__select--month,
37
37
  .picker__select--year {
38
- font-size: .8em;
39
38
  border: 1px solid #b7b7b7;
40
39
  height: 2.5em;
41
40
  padding: .5em .25em;
42
41
  margin-left: .25em;
43
42
  margin-right: .25em;
44
- margin-top: -0.5em;
43
+ font-size: .6em;
44
+ }
45
+ @media (min-width: 24.5em) {
46
+ .picker__select--month,
47
+ .picker__select--year {
48
+ font-size: .8em;
49
+ margin-top: -0.5em;
50
+ }
45
51
  }
46
52
  .picker__select--month {
47
53
  width: 35%;
@@ -59,18 +65,34 @@
59
65
  .picker__nav--prev,
60
66
  .picker__nav--next {
61
67
  position: absolute;
62
- top: -0.33em;
63
- padding: .5em 1.33em;
68
+ padding: .5em 1.25em;
64
69
  width: 1em;
65
70
  height: 1em;
71
+ top: -0.25em;
72
+ }
73
+ @media (min-width: 24.5em) {
74
+ .picker__nav--prev,
75
+ .picker__nav--next {
76
+ top: -0.33em;
77
+ }
66
78
  }
67
79
  .picker__nav--prev {
68
80
  left: -1em;
69
- padding-right: 1.5em;
81
+ padding-right: 1.25em;
82
+ }
83
+ @media (min-width: 24.5em) {
84
+ .picker__nav--prev {
85
+ padding-right: 1.5em;
86
+ }
70
87
  }
71
88
  .picker__nav--next {
72
89
  right: -1em;
73
- padding-left: 1.5em;
90
+ padding-left: 1.25em;
91
+ }
92
+ @media (min-width: 24.5em) {
93
+ .picker__nav--next {
94
+ padding-left: 1.5em;
95
+ }
74
96
  }
75
97
  .picker__nav--prev:before,
76
98
  .picker__nav--next:before {
@@ -35,13 +35,19 @@
35
35
  */
36
36
  .picker__select--month,
37
37
  .picker__select--year {
38
- font-size: .8em;
39
38
  border: 1px solid #b7b7b7;
40
39
  height: 2.5em;
41
40
  padding: .5em .25em;
42
41
  margin-left: .25em;
43
42
  margin-right: .25em;
44
- margin-top: -0.5em;
43
+ font-size: .6em;
44
+ }
45
+ @media (min-width: 24.5em) {
46
+ .picker__select--month,
47
+ .picker__select--year {
48
+ font-size: .8em;
49
+ margin-top: -0.5em;
50
+ }
45
51
  }
46
52
  .picker__select--month {
47
53
  width: 35%;
@@ -59,18 +65,34 @@
59
65
  .picker__nav--prev,
60
66
  .picker__nav--next {
61
67
  position: absolute;
62
- top: -0.33em;
63
- padding: .5em 1.33em;
68
+ padding: .5em 1.25em;
64
69
  width: 1em;
65
70
  height: 1em;
71
+ top: -0.25em;
72
+ }
73
+ @media (min-width: 24.5em) {
74
+ .picker__nav--prev,
75
+ .picker__nav--next {
76
+ top: -0.33em;
77
+ }
66
78
  }
67
79
  .picker__nav--prev {
68
80
  left: -1em;
69
- padding-right: 1.5em;
81
+ padding-right: 1.25em;
82
+ }
83
+ @media (min-width: 24.5em) {
84
+ .picker__nav--prev {
85
+ padding-right: 1.5em;
86
+ }
70
87
  }
71
88
  .picker__nav--next {
72
89
  right: -1em;
73
- padding-left: 1.5em;
90
+ padding-left: 1.25em;
91
+ }
92
+ @media (min-width: 24.5em) {
93
+ .picker__nav--next {
94
+ padding-left: 1.5em;
95
+ }
74
96
  }
75
97
  .picker__nav--prev:before,
76
98
  .picker__nav--next:before {
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: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Fraser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-13 00:00:00.000000000 Z
11
+ date: 2014-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties