turbolinks 2.5.2 → 2.5.3

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: 9b00e79da70fa234720d97cb476bd21e237261fb
4
- data.tar.gz: 84e4fbdd8d4949206833fc226a74609d511ee4ae
3
+ metadata.gz: 64f0af44179f8e5f1098974870c5d5466f0c55d6
4
+ data.tar.gz: 9775690715e3c8ed5a33f8d4d90353b958de4243
5
5
  SHA512:
6
- metadata.gz: 891313ccf4e64d39db45b2a92a2f4c5e95a93f55aeedb33c085501c2a631d4e1142eca5dcdf8bb463c363224280f5e4b10a64be3e2fb0cc84a7ad360a179ac37
7
- data.tar.gz: 2a10327848e32dad567b76c1a4c653c979a5018805a56a1ed3f3d1f6e0913aeb8f25e56f1984b72fe2d892c2ca1c9b24b262c8c6e5f567aacbf4d529bb509481
6
+ metadata.gz: a6c14d5b31f559268cc7c9f1324f36a861fca1d61f9edb4aae29c52a5294673f6cb1b2d3a2871bd0d08d80afa1c30c2530ce4416abc28c3145dc616ddea18f55
7
+ data.tar.gz: 9a03541795685a494305c00a384513a9fd5a1b251c77650272549beb7897a651d903fc7704d969817640e1b68485398ac58ccc8af89bfb7ac17733d6c822c0c2
data/README.md CHANGED
@@ -68,7 +68,13 @@ $(document).on("page:fetch", startSpinner);
68
68
  $(document).on("page:receive", stopSpinner);
69
69
  ```
70
70
 
71
- DOM transformations that are idempotent are best. If you have transformations that are not, hook them to happen only on `page:load` instead of `page:change` (as that would run them again on the cached pages).
71
+ DOM transformations that are idempotent are best. If you have transformations that are not, bind them to `page:load` (in addition to the initial page load) instead of `page:change` (as that would run them again on the cached pages):
72
+
73
+ ```javascript
74
+ // using jQuery for simplicity
75
+
76
+ $(document).on("ready page:load", nonIdempotentFunction);
77
+ ```
72
78
 
73
79
  Transition Cache: A Speed Boost
74
80
  -------------------------------
@@ -82,7 +88,7 @@ To enable Transition Cache, include the following in your javascript:
82
88
  Turbolinks.enableTransitionCache();
83
89
  ```
84
90
 
85
- The one drawback is that dramatic differences in appearence between a cached copy and new copy may lead to a jarring affect for the end-user. This will be especially true for pages that have many moving parts (expandable sections, sortable tables, infinite scrolling, etc.).
91
+ The one drawback is that dramatic differences in appearance between a cached copy and new copy may lead to a jarring affect for the end-user. This will be especially true for pages that have many moving parts (expandable sections, sortable tables, infinite scrolling, etc.).
86
92
 
87
93
  If you find that a page is causing problems, you can have Turbolinks skip displaying the cached copy by adding `data-no-transition-cache` to any DOM element on the offending page.
88
94
 
@@ -149,7 +155,7 @@ Also, Turbolinks is installed as the last click handler for links. So if you ins
149
155
  jquery.turbolinks
150
156
  -----------------
151
157
 
152
- If you have a lot of existing JavaScript that binds elements on jQuery.ready(), you can pull the [jquery.turbolinks](https://github.com/kossnocorp/jquery.turbolinks) library into your project that will trigger ready() when Turbolinks triggers the the `page:load` event. It may restore functionality of some libraries.
158
+ If you have a lot of existing JavaScript that binds elements on jQuery.ready(), you can pull the [jquery.turbolinks](https://github.com/kossnocorp/jquery.turbolinks) library into your project that will trigger ready() when Turbolinks triggers the `page:load` event. It may restore functionality of some libraries.
153
159
 
154
160
  Add the gem to your project, then add the following line to your JavaScript manifest file, after `jquery.js` but before `turbolinks.js`:
155
161
 
@@ -227,6 +233,7 @@ Language Ports
227
233
  * [ASP.NET MVC Turbolinks](https://github.com/kazimanzurrashid/aspnetmvcturbolinks)
228
234
  * [PHP Turbolinks Component](https://github.com/helthe/Turbolinks) (Symfony Component)
229
235
  * [PHP Turbolinks Package](https://github.com/frenzyapp/turbolinks) (Laravel Package)
236
+ * [Grails Turbolinks](http://grails.org/plugin/turbolinks) (Grails Plugin)
230
237
 
231
238
  Credits
232
239
  -------
@@ -378,9 +378,11 @@ class ProgressBar
378
378
 
379
379
  constructor: (@elementSelector) ->
380
380
  @value = 0
381
- @opacity = 1
382
381
  @content = ''
383
382
  @speed = 300
383
+ # Setting the opacity to a value < 1 fixes a display issue in Safari 6 and
384
+ # iOS 6 where the progress bar would fill the entire page.
385
+ @opacity = 0.99
384
386
  @install()
385
387
 
386
388
  install: ->
@@ -413,6 +415,8 @@ class ProgressBar
413
415
  @_reset()
414
416
 
415
417
  _reset: ->
418
+ originalOpacity = @opacity
419
+
416
420
  setTimeout =>
417
421
  @opacity = 0
418
422
  @_updateStyle()
@@ -420,7 +424,7 @@ class ProgressBar
420
424
 
421
425
  setTimeout =>
422
426
  @value = 0
423
- @opacity = 1
427
+ @opacity = originalOpacity
424
428
  @_withSpeed(0, => @_updateStyle(true))
425
429
  , @speed
426
430
 
@@ -1,3 +1,3 @@
1
1
  module Turbolinks
2
- VERSION = '2.5.2'
3
- end
2
+ VERSION = '2.5.3'
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbolinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-10 00:00:00.000000000 Z
11
+ date: 2014-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coffee-rails