select_all-rails 0.1.0 → 0.1.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: a83e160f3cfaf4f7cd70334a8f2223789de3b809
4
- data.tar.gz: cf0592db428ea5e03766d481e46efcc69092c217
3
+ metadata.gz: d4682e5b127bbda2a6a782cdbcd24c818a0b380d
4
+ data.tar.gz: e072426be6c07ce87178050532fa38885c92437b
5
5
  SHA512:
6
- metadata.gz: 721a8978151aaf34b74aa3a7635cbfd7d07c2700898976dd9503464e0d1b0f639e03bacf0c0728d1887bfd2b1d54bbd0043a2e069b0e69d9d5a2b23f89c104c7
7
- data.tar.gz: 1806533787b49a5d84a978af3c5ee4fc9966075a64c342862f73d2c58174823855ef7a1753a8e203f964224e9a695fa2234ca8b20885331291303fdf1a5d7108
6
+ metadata.gz: a43ab85d8de0f0b4e613a66f6626aad40ab830faba2e48a0bb5b5cd012643f7454bb62902413d1d6bbaa780d0b5b54caedfb4a0b984722b6c585d9765ce11d14
7
+ data.tar.gz: bca19ff37c5935cf9e8c3959ffda7b3e221bbb9db3a34a75c5cb7949712d7864f46b86c507d19e67b2a0dde69325143b80a701da96a5e8c1166f3b999010e7c5
data/README.md CHANGED
@@ -19,10 +19,16 @@ And then execute:
19
19
  Or install it yourself as:
20
20
 
21
21
  $ gem install select_all-rails
22
+
23
+ And add the following line to your application.js file:
24
+
25
+ //= require select_all.js
22
26
 
23
27
  ## Usage
24
28
 
25
- TODO: Write usage instructions here
29
+ <p>Call the function on main checkbox and add class 'selectable' to sub-checkboxes.</p>
30
+
31
+ <p>Example link: https://jsfiddle.net/jigneshsatam/qvd2mtjd/1/ </p>
26
32
 
27
33
  ## Development
28
34
 
@@ -1,5 +1,5 @@
1
1
  module SelectAll
2
2
  module Rails
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -1,3 +1,8 @@
1
+ //Make sure jQuery has been loaded before select_all.js
2
+ if (typeof jQuery === "undefined") {
3
+ throw new Error("select_all requires jQuery");
4
+ }
5
+
1
6
  (function ( $ ) {
2
7
  $.fn.select_all = function() {
3
8
  $(this).addClass("select_all");
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: select_all-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jignesh Satam