data_confirm_modal 0.1.2 → 0.1.3

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: 4377cbbdb26816736adcb6f1fc3539cc526d61ad
4
- data.tar.gz: 2198698d92a7a90e8f0085aa461e33a47a3851d6
3
+ metadata.gz: 4652f807e5daf4caa1b44a357fdc877b1ca745de
4
+ data.tar.gz: 7570a8d5c7e15b7659cbc84e88a2d1e2b78855cf
5
5
  SHA512:
6
- metadata.gz: 44ac32d2a689d9cc429fe48a61d81b85f9d5701d72a96b8e5fed6c1e7a07b3d9589610bcdd45bbb39614bd6dee34769be84781e12b53b07f675ede11ea422c21
7
- data.tar.gz: bf2bc439c60d2254e1b1a3b304186e0d740276bdec62da4a8aa7f0d3eda3d25a13bb33125210dee1a8503c20a735531068257d2e24716aad119741b753a1f95a
6
+ metadata.gz: cf43ac45a6fd69a108394be6f6efaa7c9ded4ba0ecbd77c437df6886ccb4458b6d125feb2dfd7454a78b5df9217f908898bce6fbedc9f60bc95dc7bfdf2856f9
7
+ data.tar.gz: c0579dde7e2032c2070dfc577aab55ec759e22253c1cca9bb5923e9486fb786c766085f309db23be54a3c637cde0107a6f57128f718a9aca5ef46e1267b16910
data/README.md CHANGED
@@ -23,12 +23,12 @@ Or install it yourself as:
23
23
  ## Usage
24
24
  ### At Present This Gem is only compatible with Foundation Framework 5+
25
25
 
26
- Add to your application.js like shown below:
26
+ Add to your ```application.js``` as shown below:
27
27
 
28
28
  ```ruby
29
29
  //= require jquery_ujs
30
30
  //= require foundation
31
- //= require data_confirm_modal
31
+ //= require data_confirm_modal -> Must be placed below jquery-ujs aside from that it dose not have to be below foundation
32
32
  ```
33
33
 
34
34
  Add the following to the bottom of the page but above ```</html>``` that contains the modal you wish to modify:
@@ -54,7 +54,40 @@ To force a user to type a password of your choosing to proceed with the action:
54
54
  })
55
55
  </script>
56
56
  ```
57
- To Be Continued... This should be enough to get you out of the gate!
57
+
58
+ To add this directly to a ```link_to```, to customize one-off modals:
59
+ ```ruby
60
+ <%= link_to 'some_link', your_path_here, :class => 'button', data: { confirm:
61
+ { title: 'do you really want to do this?',
62
+ body: 'it cant be undone, not even wishing will fix-it',
63
+ prompt: 'type THIS to unlock the confirm button',
64
+ password: 'THIS',
65
+ ok: 'be gone with it',
66
+ cancel: 'I may loose my job if I do this..'
67
+ }
68
+ } %>
69
+ ```
70
+ Further Customizations:
71
+ ```ruby
72
+ modal_class: custom css classes for the modal handling the confirmation
73
+
74
+ title: adds a custom modal title (the default is set to Are you sure?)
75
+ title_class: add css classes for styling the title
76
+
77
+ body: adds modal body text
78
+ body_class: custom css classes for styling the body
79
+
80
+ prompt: adds type ... to continue
81
+ password: this is what the user will use to unlock the continue button.
82
+
83
+ footer_class: custom css classes to style modal footer
84
+
85
+ ok: set the text to appear inside confirm button
86
+ ok_class: style the ok button and text with custom css
87
+
88
+ cancel: set the text to appear inside the cancel button
89
+ cancel_class: style the cancel button and text with custom css
90
+ ```
58
91
 
59
92
  ## Contributing
60
93
 
@@ -1,3 +1,3 @@
1
1
  module DataConfirmModal
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_confirm_modal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Wilson