rails_script 2.0.0 → 2.0.1
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
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTYzNzBlZGU0Mjk0OGQxNjIzYzY3OTYzY2IzYTkxZjk3M2NlNjA0Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTJmMGJiNDllOTEwNjJhOGI5NzA0YTM3NzlkZjMwYjYyMTIzYmExOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2Q4MDY0NjZkMDQ2NGFiNmZkNzRiYmFlYTlmNTU4ZGNlNGUzZGM1ZjM3YTE0
|
10
|
+
YmQ1OTBlYmI3ZDM2NDBlMDZjNjI5MGViOTg0MmU1MzRlMTQzODU4NjdlZTJm
|
11
|
+
MGRkN2FhNTBiYzg2YjgwOGYzZDMyZTI1YWEzMjU3MGQwYzI5NTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTcxZjA2ZDMwNGQzYTU3ODc0NzE0NjFlYTk2YmU4ZDYwMmY5Y2M0ZGU0MmE4
|
14
|
+
MzJlZTc5YzJmOWI3OWQ0MjY4OTM3MjBlNGY1YWYxMjA1YTEyMzNjM2VkYzNm
|
15
|
+
ZThmMzhhNGRlMzBkYjhlZjQ0MTE1N2VlNzU2MzIxOWVlZTk4YjI=
|
data/lib/rails_script/version.rb
CHANGED
@@ -3,11 +3,13 @@ window.App ||= {}
|
|
3
3
|
window.Element ||= {}
|
4
4
|
window.Utility ||= {}
|
5
5
|
|
6
|
-
|
6
|
+
# Initializer
|
7
|
+
$(document).on "ready.rails_script page:load.rails_script turbolinks:load.rails_script", ->
|
8
|
+
controller = $('#rails-script').data('controller')
|
9
|
+
action = $('#rails-script').data('action')
|
7
10
|
Utility.RailsVars = $('#rails-script').data('vars')
|
8
|
-
window.$this = new (App["#{$('#rails-script').data('controller')}"] || App.Base)()
|
9
11
|
|
10
|
-
|
12
|
+
window.$this = new (App[controller] || App.Base)()
|
11
13
|
|
12
14
|
if typeof $this.beforeAction == 'function'
|
13
15
|
$this.beforeAction action
|
@@ -16,8 +18,9 @@ $(document).on "turbolinks:load.rails_script", ->
|
|
16
18
|
if typeof $this.afterAction == 'function'
|
17
19
|
$this.afterAction action
|
18
20
|
|
21
|
+
# Clear event handlers on navigation
|
19
22
|
RailsScript.setClearEventHandlers = ->
|
20
|
-
jQuery(document).on 'turbolinks:before-visit', ->
|
23
|
+
jQuery(document).on 'page:before-change turbolinks:before-visit', ->
|
21
24
|
for element in [window, document]
|
22
25
|
for event, handlers of (jQuery._data(element, 'events') || {})
|
23
26
|
for handler in handlers
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_script
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Pheasey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|