Permalink
Browse files

* master branch is dropping the support for jquery 1.4, 1.4.1 and 1.4…

….2 .

* If you are using one of those versions then use branch v1.4 .
* All test files have been updated to reflect the same .
  • Loading branch information...
Neeraj Singh
Neeraj Singh committed Nov 12, 2010
1 parent e5b2f83 commit e0761212489131437402a92fa8f548a78f685ae2
Showing with 23 additions and 28 deletions.
  1. +11 −4 README.rdoc
  2. +10 −21 src/rails.js
  3. +1 −1 test/server.rb
  4. +1 −2 test/views/index.erb
View
@@ -2,12 +2,19 @@
Unobtrusive jQuery with Rails 3
-== Following versions of jQuery are supported:
+== The rails.js file from master branch supports following versions of jQuery:
+
+* 1.4.3
+* 1.4.4
+
+== If you are using one of the following version of jQuery then use branch v1.4 .
* 1.4
* 1.4.1
* 1.4.2
-* 1.4.3
+
+ rails.js file from v1.4 branch can be accessed at https://github.com/rails/jquery-ujs/blob/v1.4/src/rails.js .
+
== Automated Installation
@@ -30,7 +37,7 @@ Run this command:
Download jQuery from http://docs.jquery.com/Downloading_jQuery and put the file in public/javascripts. For example, the file might look like:
- public/javascripts/jquery-1.4.3.min.js
+ public/javascripts/jquery-1.4.4.min.js
=== Step 2
@@ -55,4 +62,4 @@ Switch the <tt>javascript_include_tag :defaults</tt> to use jquery instead of th
Visit http://localhost:4567 and all the tests should pass.
-At the top of the page you will see links to jQuery 1.4.1, 1.4.2 and 1.4.3 . By clicking on those links you will be executing the tests against the clicked version of jquery. By default test uses jQuery 1.4.3 .
+At the top of the page you will see links to jQuery 1.4.3 and 1.4.4 . By clicking on those links you will be executing the tests against the clicked version of jquery. By default test uses jQuery 1.4.4 .
View
@@ -3,7 +3,7 @@
*
* http://github.com/rails/jquery-ujs/blob/master/src/rails.js
*
- * This rails.js file supports jQuery 1.4, 1.4.1, 1.4.2 and 1.4.3 .
+ * This rails.js file supports jQuery 1.4.3 and 1.4.4 .
*
*/
@@ -78,26 +78,15 @@ jQuery(function ($) {
*/
var jqueryVersion = $().jquery;
- if ( (jqueryVersion === '1.4') || (jqueryVersion === '1.4.1') || (jqueryVersion === '1.4.2')){
- $('a[data-confirm], button[data-confirm], input[data-confirm]').live('click', function () {
- var el = $(this);
- if (el.triggerAndReturn('confirm')) {
- if (!confirm(el.attr('data-confirm'))) {
- return false;
- }
- }
- });
- } else {
- $('body').delegate('a[data-confirm], button[data-confirm], input[data-confirm]', 'click', function () {
- var el = $(this);
- if (el.triggerAndReturn('confirm')) {
- if (!confirm(el.attr('data-confirm'))) {
- return false;
- }
- }
- });
- }
-
+ $('body').delegate('a[data-confirm], button[data-confirm], input[data-confirm]', 'click', function () {
+ var el = $(this);
+ if (el.triggerAndReturn('confirm')) {
+ if (!confirm(el.attr('data-confirm'))) {
+ return false;
+ }
+ }
+ });
+
/**
View
@@ -15,7 +15,7 @@
get '/' do
FileUtils.cp(source_file, dest_file)
- params[:version] ||= '1.4.3'
+ params[:version] ||= '1.4.4'
erb :index
end
View
@@ -23,9 +23,8 @@
<body id="body">
<h1 id="qunit-header">
jquery-ujs test
- <%= jquery_link '1.4.1' %>
- <%= jquery_link '1.4.2' %>
<%= jquery_link '1.4.3' %>
+ <%= jquery_link '1.4.4' %>
</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>

0 comments on commit e076121

Please sign in to comment.