turbolinks 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -3
- data/lib/assets/javascripts/turbolinks.js.coffee +6 -2
- data/lib/turbolinks/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64f0af44179f8e5f1098974870c5d5466f0c55d6
|
4
|
+
data.tar.gz: 9775690715e3c8ed5a33f8d4d90353b958de4243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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
|
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
|
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 =
|
427
|
+
@opacity = originalOpacity
|
424
428
|
@_withSpeed(0, => @_updateStyle(true))
|
425
429
|
, @speed
|
426
430
|
|
data/lib/turbolinks/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Turbolinks
|
2
|
-
VERSION = '2.5.
|
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.
|
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
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-rails
|