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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79aeb57ed0d7c6a293bd3c4d355141956a4b04b1
4
- data.tar.gz: 6add27598620533ed44c5fcc30e0934902bc0be1
3
+ metadata.gz: eb4951cee85aa0fed2c2f8a3446998ee8887287e
4
+ data.tar.gz: b8e950562e320a8fe0bf1c22999820087cf3dde0
5
5
  SHA512:
6
- metadata.gz: 24a6e650c9f3dec57e9e94f520b7b022530e24d6b7a3ad67a2387c849329bc2bd97147b2536dbfe5c99323d8d3561d9bb2b5086a860070a18aab64d759325050
7
- data.tar.gz: b4276aefb7112a70263a808ff0aac337f34a40171d856c00a7a16528fade6d2cdb446503ac60c2830513aaa61c63971430927c3db2264c00208c9e3af5bd49dc
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
- return confirm("Are you sure you want to delete this?");
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({
@@ -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))
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.11.5"
2
+ VERSION = "0.11.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.5
4
+ version: 0.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut, Adam Bialek