nprogress-rails 0.1.6.5 → 0.1.6.6

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a69e555c7d06d23f5b261baeb7763c698651b33
4
- data.tar.gz: 1ed2277a571a02ffdc59efeca1f8f60236e38854
3
+ metadata.gz: b78a59e5e4d3fd4940a31eaf270523eb327955bd
4
+ data.tar.gz: c717e0d7d3e8f6aad2d0df6bc3f798a2b68f3be2
5
5
  SHA512:
6
- metadata.gz: 439b52bf1f42b89d703751e49f35c97667f489391e5b136603d688a572487608e86eb9d733108013f47813d83406b440e5368ffe0d8c1dd22a7b8f828633cf98
7
- data.tar.gz: ff4ac1f15ec6fbac2839de5c331d6274b784c06054579e5798c4808dfb4215590e767aa5d6c809baf1ec05b03e7ff5ca7ce2b25bb256bde05833dcbbc4a7795b
6
+ metadata.gz: a8d24c60a57d728c6332ab41e8865062c22c3a4788af2ede2cc7c629e5fec57f615f0e0de036fcce5abd1e4fff7ac647c7d044e32ff333c522c10931154d30b3
7
+ data.tar.gz: c466e2c41c7f56d9c1569b418dcaae9fb77f4b4a3b835b0528df45c256c727d148b3bd9801c595ff059d2eb488c2701b276afa66ea7cc32ebf7b997f1efdff17
data/README.md CHANGED
@@ -92,6 +92,16 @@ $nprogress-zindex: 10100;
92
92
  @import 'nprogress-bootstrap';
93
93
  ```
94
94
 
95
+ ## Ajax - jQuery or Prototype
96
+ `nprogress-ajax` automatically triggers the NProgress bar when an Ajax
97
+ request is started (the 'ajaxStart' event), and finishes it when the Ajax
98
+ request completes (the 'ajaxStop' event). This works for any Ajax events
99
+ triggered using jQuery.
100
+
101
+ If you're using Prototype, you can include the `nprogress-ajax-prototype`
102
+ javascript file instead, which works for Ajax requests started from Prototype
103
+ (the 'onCreate' and 'onComplete' events, to be exact).
104
+
95
105
  ## Contributing
96
106
 
97
107
  1. Fork it
@@ -0,0 +1,8 @@
1
+ Ajax.Responders.register({
2
+ onCreate: function() {
3
+ NProgress.start();
4
+ },
5
+ onComplete: function() {
6
+ NProgress.done();
7
+ }
8
+ });
@@ -1,4 +1,4 @@
1
- $(function() {
2
- $(document).on('ajaxStart', function() { NProgress.start(); });
3
- $(document).on('ajaxStop', function() { NProgress.done(); });
1
+ jQuery(function() {
2
+ jQuery(document).on('ajaxStart', function() { NProgress.start(); });
3
+ jQuery(document).on('ajaxStop', function() { NProgress.done(); });
4
4
  });
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'nprogress-rails'
7
- spec.version = '0.1.6.5'
7
+ spec.version = '0.1.6.6'
8
8
  spec.authors = ['Carlos Alexandro Becker']
9
9
  spec.email = ['caarlos0@gmail.com']
10
10
  spec.description = %q{This is a gem for the rstacruz' nprogress implementation. It's based on version nprogress 0.1.6.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nprogress-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.5
4
+ version: 0.1.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Alexandro Becker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-29 00:00:00.000000000 Z
11
+ date: 2015-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -79,6 +79,7 @@ files:
79
79
  - LICENSE.txt
80
80
  - README.md
81
81
  - Rakefile
82
+ - app/assets/javascripts/nprogress-ajax-prototype.js
82
83
  - app/assets/javascripts/nprogress-ajax.js
83
84
  - app/assets/javascripts/nprogress-angular.js
84
85
  - app/assets/javascripts/nprogress-pjax.js