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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bf19a1e90ff362c15e93a1fb69dd4cad8654eee
4
- data.tar.gz: c6d9f01496fc058b995759847998a57865bad842
3
+ metadata.gz: 054d7f7b3d597469a7446210cb71d806dff12c7a
4
+ data.tar.gz: fd4045f9d1f818f5d370b0c578ef1015b5a72d5d
5
5
  SHA512:
6
- metadata.gz: bf772cb71dd927780994515f9684ab7d417c0b0dc17bf22468edf1e48d2e6d0496e118f16a9c537c54490fcfff1024b4a7a53ef5f4b3b3bd99b2dcdf0c31126e
7
- data.tar.gz: 676c4bb35250d70b12de2fb15e7d40d435f6874fe2ca29da330e6c9bf133688eae55e4fc652542c4f630d832fab5fdbab2d4de0545ece94085668af68b7eb2e7
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', [(ref = e.originalEvent) != null ? ref.data.url : void 0]);
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 base;
27919
+ var ref;
27920
27920
  _this.trigger('before-page-cache', [_this.currentPage]);
27921
- if (typeof (base = _this.currentPage).prepareCache === "function") {
27922
- base.prepareCache();
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.trigger('before-leave') == false
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.prepareCache?()
51
+ @currentPage?.prepareCache?()
52
52
  window.currentPage = @currentPage = null
53
53
 
54
54
  .on 'turbolinks:request-end', (e) =>
@@ -1,5 +1,5 @@
1
1
  module TaoOnRails
2
2
  module Rails
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
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.1
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-28 00:00:00.000000000 Z
12
+ date: 2016-12-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: turbolinks