tao_on_rails 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dist/tao.js +8 -6
- data/lib/assets/javascripts/tao/application.coffee +2 -2
- data/lib/tao_on_rails/rails/version.rb +1 -1
- 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: 054d7f7b3d597469a7446210cb71d806dff12c7a
|
4
|
+
data.tar.gz: fd4045f9d1f818f5d370b0c578ef1015b5a72d5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7fa880098b3ad2a001c0f41993ca5c07baff065a40a8adc21c6317ca78458446d51b56361b8e2afa8f1768b9d9304d8eb036f315cf075cea09f6563996d6c97
|
7
|
+
data.tar.gz: 100d15fdfdafa2d390719cc5ce0da7ab41fe0713015d0b8419572e048b53dafea66bc5d0f4282878efb4a4bf1f6d34bea87ddddba33fac67133a83b66e7bad4c
|
data/dist/tao.js
CHANGED
@@ -27897,12 +27897,12 @@ return jQuery;
|
|
27897
27897
|
TaoApplication.prototype._initTurbolinks = function() {
|
27898
27898
|
return $(document).on('turbolinks:before-visit', (function(_this) {
|
27899
27899
|
return function(e) {
|
27900
|
-
var ref;
|
27901
|
-
if (_this.currentPage.trigger('before-leave') === false) {
|
27900
|
+
var ref, ref1;
|
27901
|
+
if (((ref = _this.currentPage) != null ? ref.trigger('before-leave') : void 0) === false) {
|
27902
27902
|
e.preventDefault();
|
27903
27903
|
return;
|
27904
27904
|
}
|
27905
|
-
return _this.trigger('before-page-visit', [(
|
27905
|
+
return _this.trigger('before-page-visit', [(ref1 = e.originalEvent) != null ? ref1.data.url : void 0]);
|
27906
27906
|
};
|
27907
27907
|
})(this)).on('turbolinks:request-start', (function(_this) {
|
27908
27908
|
return function(e) {
|
@@ -27916,10 +27916,12 @@ return jQuery;
|
|
27916
27916
|
};
|
27917
27917
|
})(this)).on('turbolinks:before-cache', (function(_this) {
|
27918
27918
|
return function(e) {
|
27919
|
-
var
|
27919
|
+
var ref;
|
27920
27920
|
_this.trigger('before-page-cache', [_this.currentPage]);
|
27921
|
-
if (
|
27922
|
-
|
27921
|
+
if ((ref = _this.currentPage) != null) {
|
27922
|
+
if (typeof ref.prepareCache === "function") {
|
27923
|
+
ref.prepareCache();
|
27924
|
+
}
|
27923
27925
|
}
|
27924
27926
|
return window.currentPage = _this.currentPage = null;
|
27925
27927
|
};
|
@@ -34,7 +34,7 @@ class TaoApplication extends TaoModule
|
|
34
34
|
|
35
35
|
_initTurbolinks: ->
|
36
36
|
$(document).on 'turbolinks:before-visit', (e) =>
|
37
|
-
if @currentPage
|
37
|
+
if @currentPage?.trigger('before-leave') == false
|
38
38
|
e.preventDefault()
|
39
39
|
return
|
40
40
|
|
@@ -48,7 +48,7 @@ class TaoApplication extends TaoModule
|
|
48
48
|
|
49
49
|
.on 'turbolinks:before-cache', (e) =>
|
50
50
|
@trigger 'before-page-cache', [@currentPage]
|
51
|
-
@currentPage
|
51
|
+
@currentPage?.prepareCache?()
|
52
52
|
window.currentPage = @currentPage = null
|
53
53
|
|
54
54
|
.on 'turbolinks:request-end', (e) =>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tao_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siyuan Liu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-12-
|
12
|
+
date: 2016-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: turbolinks
|