thin_man 0.11.5 → 0.11.6
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/thin_man.js +3 -1
- data/lib/thin_man/ajax_helper.rb +2 -1
- data/lib/thin_man/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb4951cee85aa0fed2c2f8a3446998ee8887287e
|
4
|
+
data.tar.gz: b8e950562e320a8fe0bf1c22999820087cf3dde0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30aa69e0349aca40a5b09f09e615ee7d61bcef05a32085996c61b8b289f2408eaa43ff836425f76d719b58cd809622ebb2267dcb244262bb8284c6a1e8d5fa3e
|
7
|
+
data.tar.gz: 3df3836e661f3af2ab8d751f19bae9b701918df12595eb812f8b531646f8db806303825c307b187ad752f09ca029fcb74e2186b898e037252c4f7295d391b570
|
@@ -477,7 +477,9 @@ var initThinMan = function(){
|
|
477
477
|
return true;
|
478
478
|
},
|
479
479
|
ajaxBefore: function(jqXHR){
|
480
|
-
|
480
|
+
if(!this.jq_obj.data('no-confirm')){
|
481
|
+
return confirm("Are you sure you want to delete this?");
|
482
|
+
}
|
481
483
|
}
|
482
484
|
}),
|
483
485
|
thin_man.ReplaceDelete = thin_man.DeleteLink.extend({
|
data/lib/thin_man/ajax_helper.rb
CHANGED
@@ -28,13 +28,14 @@ module ThinMan
|
|
28
28
|
html_options.merge(ajax_options))
|
29
29
|
end
|
30
30
|
|
31
|
-
def ajax_delete(name, options, html_options, target, sub_class: nil, replace_response: false)
|
31
|
+
def ajax_delete(name, options, html_options, target, sub_class: nil, replace_response: false, no_confirm: false)
|
32
32
|
ajax_options = {
|
33
33
|
'data-ajax-delete' => true,
|
34
34
|
'data-ajax-target' => target
|
35
35
|
}
|
36
36
|
ajax_options.merge!('data-sub-type' => sub_class) if sub_class.present?
|
37
37
|
ajax_options.merge!('data-replace-response' => true) if replace_response
|
38
|
+
ajax_options.merge!('data-no-confirm' => true) if no_confirm
|
38
39
|
link_to(name,
|
39
40
|
options,
|
40
41
|
html_options.merge(ajax_options))
|
data/lib/thin_man/version.rb
CHANGED