guardsjs-rails 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ecaddb03b89008086fe01b4fb8a192361d7932c
4
- data.tar.gz: 7ac29aeec4958754ce9287e3b4a394c784ad4179
3
+ metadata.gz: 47e88240dd71764ae557fcf35a1b0ca1949816d3
4
+ data.tar.gz: 4347ff7620be77ae6f0fdc2cd97303bec5b65592
5
5
  SHA512:
6
- metadata.gz: e46265182f15c0aa8428589ee3d55f4083e5ae3ff6bb8ce116c3c569b28d8cb068cb1378cee554bcbed984b576eac40a37e84f5db78c35dddc5818a12b88cbfe
7
- data.tar.gz: 3350e7fdf53ae9c936a0607ef7867701e5d5bd31a488e2d51d9bec0151122fe0f48b57106ab77497a80b71b76227e52c55bf3b226bf556a263cf7163c173df30
6
+ metadata.gz: 44553216c036e9b286b378ed23274db1099b8d779e471f78f9f2d5f7c56875cac8dfcc704b7eb85e9ff699cc7669991593c84206e84ae32d13050aeabbae531c
7
+ data.tar.gz: da50ff12b8e692f07d5a69f99f55585936d8b9c94158a40105ff7d8eb588f2732534107aa5a9ff446cb56fc472c18bd09ec7bf4e3f050eece654025efad660d4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Guards JavaScript jQuery Plugin v1.3.1
2
+ * Guards JavaScript jQuery Plugin v1.3.2
3
3
  * https://github.com/on-site/guards.js
4
4
  *
5
5
  * Copyright 2010-2014, 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: Sun Apr 13 13:33:25 2014 -0700
11
+ * Date: Sun Apr 13 17:05:11 2014 -0700
12
12
  */
13
13
 
14
14
  /**
@@ -48,7 +48,7 @@
48
48
  return $.guards.add(selector);
49
49
  };
50
50
 
51
- $.guard.version = "1.3.1";
51
+ $.guard.version = "1.3.2";
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.3.1";
748
+ $.Guards.prototype.version = "1.3.2";
749
749
 
750
750
  $.Guards.prototype.parentContext = function(element) {
751
751
  var $element = $(element);
@@ -1524,6 +1524,18 @@
1524
1524
  return result;
1525
1525
  };
1526
1526
 
1527
+ $.Guards.prototype.triggerImmediateDataErrors = function() {
1528
+ var self = this;
1529
+
1530
+ $("[data-immediate-guard-error]").each(function() {
1531
+ var guard = new $.Guard({ selector: this, guards: self });
1532
+ var $this = $(this);
1533
+ guard.using("never").message($this.data("immediate-guard-error") || "");
1534
+ guard.triggerError();
1535
+ $this.removeAttr("data-immediate-guard-error");
1536
+ });
1537
+ };
1538
+
1527
1539
  $.Guard = function(options) {
1528
1540
  this.name = options.name;
1529
1541
  this._named = options.named;
@@ -2841,4 +2853,5 @@
2841
2853
  // Data driven guards
2842
2854
  $.liveGuard("[data-live-guarded]");
2843
2855
  $.enableGuards("[data-guarded]");
2856
+ $(function() { $.guards.triggerImmediateDataErrors(); });
2844
2857
  })(jQuery);
@@ -1,5 +1,5 @@
1
1
  module GuardsJS
2
2
  module Rails
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
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.3.1
4
+ version: 1.3.2
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: 2014-04-13 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties