ajaxify_rails 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module AjaxifyRails
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -29,8 +29,8 @@ ajaxify = ->
29
29
 
30
30
  if active
31
31
 
32
- if load_page_from_hash
33
- load_page_from_hash = false
32
+ if Ajaxify.load_page_from_hash
33
+ Ajaxify.load_page_from_hash = false
34
34
  on_hash_change()
35
35
 
36
36
  protocol_and_hostname = "#{window.location.protocol}//#{window.location.hostname}"
@@ -110,7 +110,7 @@ on_hash_change = ->
110
110
 
111
111
  load = (options, pop_state = false) ->
112
112
 
113
- unless load_page_from_hash
113
+ unless Ajaxify.load_page_from_hash
114
114
 
115
115
  data = options.data || { ajaxified: true }
116
116
 
@@ -126,7 +126,7 @@ load = (options, pop_state = false) ->
126
126
  if options.confirm
127
127
  return false unless confirm options.confirm
128
128
 
129
- $('body').trigger 'ajaxify:before_load', [options.url]
129
+ $(document).trigger 'ajaxify:before_load', [options.url]
130
130
 
131
131
  $.ajax
132
132
  url: options.url
@@ -149,7 +149,7 @@ show_flashes = (flashes) ->
149
149
  if flashes and flashes[this]
150
150
  $("##{this}").html flashes[this]
151
151
  $("##{this}").show()
152
- $('body').trigger 'ajaxify:flash_displayed', [this]
152
+ $(document).trigger 'ajaxify:flash_displayed', [this]
153
153
 
154
154
  else
155
155
  $("##{this}").hide()
@@ -171,7 +171,7 @@ on_ajaxify_success = (data, status, jqXHR, pop_state, options) ->
171
171
 
172
172
  update_url options, pop_state
173
173
 
174
- $('body').trigger 'ajaxify:content_inserted'
174
+ $(document).trigger 'ajaxify:content_inserted'
175
175
 
176
176
  $("##{content_container} #ajaxify_content").remove()
177
177
 
@@ -180,7 +180,7 @@ on_ajaxify_success = (data, status, jqXHR, pop_state, options) ->
180
180
 
181
181
  show_flashes(flashes)
182
182
 
183
- $('body').trigger('ajaxify:content_loaded', [data, status, jqXHR, options.url])
183
+ $(document).trigger('ajaxify:content_loaded', [data, status, jqXHR, options.url])
184
184
 
185
185
 
186
186
  update_url = (options, pop_state = false) ->
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ajaxify_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-11 00:00:00.000000000 Z
12
+ date: 2012-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -64,18 +64,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
64
  - - ! '>='
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
- segments:
68
- - 0
69
- hash: 4265493633309199773
70
67
  required_rubygems_version: !ruby/object:Gem::Requirement
71
68
  none: false
72
69
  requirements:
73
70
  - - ! '>='
74
71
  - !ruby/object:Gem::Version
75
72
  version: '0'
76
- segments:
77
- - 0
78
- hash: 4265493633309199773
79
73
  requirements: []
80
74
  rubyforge_project:
81
75
  rubygems_version: 1.8.24
@@ -84,3 +78,4 @@ specification_version: 3
84
78
  summary: Rails gem for automatically turning internal links/forms into ajax links/forms
85
79
  that load content without a full page reload.
86
80
  test_files: []
81
+ has_rdoc: