jquery-rails 4.0.0.beta2 → 4.0.0

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.

Potentially problematic release.


This version of jquery-rails might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e887a893642721415c82ed5352f0bf20aeaf7b80
4
- data.tar.gz: 78878da2589447f73ba45d807fcfdbf46277216f
3
+ metadata.gz: 6bf30e6ef5f9b2d4528eb799c7a2009ef6a7f2b1
4
+ data.tar.gz: 3a90842b9e2ab6ed931b70defcf4e7ac1283cf31
5
5
  SHA512:
6
- metadata.gz: 2b7534cbe3d773035193a64966498fccf547cc4a5c7bb6d253599429f2fecd59ce669d6e93ff05ebd1a5a5120c3d6cfcdfa62eaa9fed1682677a5f618599688e
7
- data.tar.gz: 9db1588e83c175bee49ae8e1da8a417ca6dd96808dbe3f6b81a89becabeb708c32ef16b6daf89e90974a515fe878d8e12ecdf078bd8cd23312b0bf36ff5e9f8f
6
+ metadata.gz: bf0699f2f116bcc30f91a537dc74a3dfc03c149da88fcc0864f477f32c9bc94981c70fbe235469a8f27200cea8331445b844c318f93e8a1a53f1c3fca987fe6e
7
+ data.tar.gz: 55aaa35df96f439eafc88a4a84f4fb7e6e1ba91ba7301203bb5da87dee8e52213464a8afd5a2ae58dc26c5061764bc5de64860ee0b5c7e0e83dfba041f0e0f4e
@@ -1,6 +1,8 @@
1
1
  ## 4.0.0
2
2
 
3
3
  - Minimum dependency set to Rails 4.2
4
+ - Updated to jquery-ujs 1.0.2
5
+ - Support jQuery 1.x and 2.x
4
6
 
5
7
  ## 3.1.2 (1 September 2014)
6
8
 
data/Rakefile CHANGED
@@ -37,3 +37,9 @@ task :update_jquery do
37
37
  download_jquery('jquery2', Jquery::Rails::JQUERY_2_VERSION)
38
38
  puts "\e[32mDone!\e[0m"
39
39
  end
40
+
41
+ task :update_jquery_ujs do
42
+ puts "Downloading jquery_ujs.js"
43
+ puts `curl -o vendor/assets/javascripts/jquery_ujs.js https://raw.githubusercontent.com/rails/jquery-ujs/v#{Jquery::Rails::JQUERY_UJS_VERSION}/src/rails.js`
44
+ puts "\e[32mDone!\e[0m"
45
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  | Gem | jQuery | jQuery UJS | jQuery UI |
4
4
  |--------|--------|------------| ----------|
5
- | 4.0.0 | 1.1.1 & 2.1.1 | | - |
5
+ | 4.0.0 | 1.1.1 & 2.1.1 | 1.0.2 | - |
6
6
  | 3.1.2 | 1.11.1 | 1.0.1 | - |
7
7
  | 3.1.1 | 1.11.1 | 1.0.0 | - |
8
8
  | 3.1.0 | 1.11.0 | - | - |
@@ -1,8 +1,8 @@
1
1
  module Jquery
2
2
  module Rails
3
- VERSION = "4.0.0.beta2"
3
+ VERSION = "4.0.0"
4
4
  JQUERY_VERSION = "1.11.1"
5
5
  JQUERY_2_VERSION = "2.1.1"
6
- JQUERY_UJS_VERSION = "1.0.1"
6
+ JQUERY_UJS_VERSION = "1.0.2"
7
7
  end
8
8
  end
@@ -322,6 +322,29 @@
322
322
 
323
323
  $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
324
324
 
325
+ // This event works the same as the load event, except that it fires every
326
+ // time the page is loaded.
327
+ //
328
+ // See https://github.com/rails/jquery-ujs/issues/357
329
+ // See https://developer.mozilla.org/en-US/docs/Using_Firefox_1.5_caching
330
+ $(window).on("pageshow.rails", function () {
331
+ $($.rails.enableSelector).each(function () {
332
+ var element = $(this);
333
+
334
+ if (element.data("ujs:enable-with")) {
335
+ $.rails.enableFormElement(element);
336
+ }
337
+ });
338
+
339
+ $($.rails.linkDisableSelector).each(function () {
340
+ var element = $(this);
341
+
342
+ if (element.data("ujs:enable-with")) {
343
+ $.rails.enableElement(element);
344
+ }
345
+ });
346
+ });
347
+
325
348
  $document.delegate(rails.linkDisableSelector, 'ajax:complete', function() {
326
349
  rails.enableElement($(this));
327
350
  });
@@ -348,7 +371,7 @@
348
371
  }
349
372
  return false;
350
373
 
351
- } else if (link.data('method')) {
374
+ } else if (method) {
352
375
  rails.handleMethod(link);
353
376
  return false;
354
377
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta2
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-06 00:00:00.000000000 Z
11
+ date: 2014-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: 1.3.6
114
114
  requirements: []
115
115
  rubyforge_project: jquery-rails
116
- rubygems_version: 2.2.1
116
+ rubygems_version: 2.2.2
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Use jQuery with Rails 4+