guardsjs-rails 1.5.0 → 1.5.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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b7cd3781971dda62987c9bac7706fddb481a526
4
- data.tar.gz: b36add19563e88ca973b009f992ebbd7c09b15de
3
+ metadata.gz: f1e094ec21ff31b680f1afcaf7bc67f1c5768912
4
+ data.tar.gz: 36b4b847a60a52d270c3f0d2b998ded36ceca25c
5
5
  SHA512:
6
- metadata.gz: 282ecf6277d3b2679d27e545973828b47c041e332aaba649d4904550445dbb687730ff7eaeacb99f4fba1b1842432647ae6bfcd59f360ca1d6d39e8087845618
7
- data.tar.gz: 7b4e7ee943ba2782919c939a19685fd34202313e0b7e1ffcbd964a0276622161c4a5ce01a6ae150be63ac1f87f715b78c997273ec72240be15ca9723ae65f781
6
+ metadata.gz: fb11dd677782b49e464ea37361a93058c0aa0f0129bcdc46bb85652cac27e3eb5f616cf6cb3dcf44ea54e784edbef0558d207a1485e8dd3a8b39c9b3f02a4f7f
7
+ data.tar.gz: f2f5a919692b3fb05aed57136cc0aecf9f3bc7368649d8ddcaf87fab59bb0b096162bbaa36edc5918e3cf3e8ab9842e8a3be4ddb17fb87f4ee364887ed88282f
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Guards JavaScript jQuery Plugin v1.5.0
2
+ * Guards JavaScript jQuery Plugin v1.5.1
3
3
  * https://github.com/on-site/guards.js
4
4
  *
5
5
  * Copyright 2010-2015, On-Site.com, http://www.on-site.com/
@@ -8,7 +8,7 @@
8
8
  * Includes code for email and phone number validation from the jQuery
9
9
  * Validation plugin. http://docs.jquery.com/Plugins/Validation
10
10
  *
11
- * Date: Tue Jan 13 14:24:09 2015 -0800
11
+ * Date: Tue Jan 13 17:54:45 2015 -0800
12
12
  */
13
13
 
14
14
  /**
@@ -48,7 +48,7 @@
48
48
  return $.guards.add(selector);
49
49
  };
50
50
 
51
- $.guard.version = "1.5.0";
51
+ $.guard.version = "1.5.1";
52
52
 
53
53
  $.Guards = function() {
54
54
  var self = this;
@@ -745,7 +745,7 @@
745
745
  * This version of guards.js library as a string, like <code>"1.0.0"</code>.
746
746
  * </p>
747
747
  */
748
- $.Guards.prototype.version = "1.5.0";
748
+ $.Guards.prototype.version = "1.5.1";
749
749
 
750
750
  $.Guards.prototype.parentContext = function(element) {
751
751
  var $element = $(element);
@@ -2815,7 +2815,8 @@
2815
2815
  * fields are any inputs, textareas or selects.
2816
2816
  */
2817
2817
  $.fn.guardableFields = function() {
2818
- return this.find(":guardable");
2818
+ var results = this.filter(":guardable");
2819
+ return results.add(this.find(":guardable"));
2819
2820
  };
2820
2821
 
2821
2822
  /**
@@ -2831,13 +2832,18 @@
2831
2832
  * focus the first such field.
2832
2833
  * </p>
2833
2834
  *
2835
+ * <p>
2836
+ * As of version 1.5.1, directly selected form fields will be guarded as well. The
2837
+ * order of evaluating selected fields is undefined, as it is dependent on jQuery.
2838
+ * </p>
2839
+ *
2834
2840
  * <div class="example">
2835
2841
  * <div class="display">
2836
2842
  * <script>
2837
2843
  * $.guard(".guarded-field").using("required");
2838
2844
  * $(function() {
2839
2845
  * $("#invoke-guard").click(function() {
2840
- * $("#guard-container").guard();
2846
+ * $("#guard-container, #uncontained-field").guard();
2841
2847
  * return false;
2842
2848
  * });
2843
2849
  * });
@@ -2849,6 +2855,12 @@
2849
2855
  * </p>
2850
2856
  * </div>
2851
2857
  *
2858
+ * <div>
2859
+ * <p>
2860
+ * <input id="uncontained-field" class="guarded-field" type="text" />
2861
+ * </p>
2862
+ * </div>
2863
+ *
2852
2864
  * <p>
2853
2865
  * <input id="invoke-guard" type="button" value="Test Guards" />
2854
2866
  * </p>
@@ -1,5 +1,5 @@
1
1
  module GuardsJS
2
2
  module Rails
3
- VERSION = "1.5.0"
3
+ VERSION = "1.5.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guardsjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Virata-Stone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-13 00:00:00.000000000 Z
11
+ date: 2015-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties