guardsjs-rails 1.3.1 → 1.3.2
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 +4 -4
- data/app/assets/javascripts/guards.js +17 -4
- data/lib/guardsjs-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47e88240dd71764ae557fcf35a1b0ca1949816d3
|
4
|
+
data.tar.gz: 4347ff7620be77ae6f0fdc2cd97303bec5b65592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44553216c036e9b286b378ed23274db1099b8d779e471f78f9f2d5f7c56875cac8dfcc704b7eb85e9ff699cc7669991593c84206e84ae32d13050aeabbae531c
|
7
|
+
data.tar.gz: da50ff12b8e692f07d5a69f99f55585936d8b9c94158a40105ff7d8eb588f2732534107aa5a9ff446cb56fc472c18bd09ec7bf4e3f050eece654025efad660d4
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Guards JavaScript jQuery Plugin v1.3.
|
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
|
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.
|
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.
|
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);
|
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.
|
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-
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|