thin_man 0.14.0 → 0.15.0

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: 770d8ac8603108fd26ebb9283f9e74701bb77b5d
4
- data.tar.gz: c65b486c253925376e1ee80cc5cdc422ae73dfe9
3
+ metadata.gz: 15be20c1677bc5e48c432eeaac4555d0cfb75ea2
4
+ data.tar.gz: 4e0c8639e7435d43e6663d6706b293980520de50
5
5
  SHA512:
6
- metadata.gz: 9455fe810419071e80b47e53c00ab588d2c0f56696adc89af09ea2796bb397efe8627939f89fba707af04201487010926e82dfcf1af0d58f8fbe7fe4f85af36d
7
- data.tar.gz: 85fb29391269e1d5c5d4794096d54bae36ea4a46f2f959adaf16df5419214ddf5d269cfbf8d7b0de3936605a6b22d352b932e77b313a815d990bce078c2aa358
6
+ metadata.gz: 57f9de04125363ab1857e3f06d897528732ceb46ad8e3ecbbd6a7338fe47dd5012b5b8dbdb18201dc21871c4b7f7ea7716b269e336c9b2cdbaa8154796cc8cc3
7
+ data.tar.gz: 827e8d5fb5ce39bb40e088034a2a2a1fcc00985e02a6d689301ef5b8e254135ee9b64456962cf042fce867ecf3e30bfd36a0f7c5220aeee450f7c675810ec3f4
@@ -544,7 +544,7 @@ var initThinMan = function(){
544
544
  }
545
545
  });
546
546
 
547
- window.any_time_manager.registerListWithClasses({'sortable' : 'AjaxSorter', 'ajax-link-now' : 'AjaxLinkSubmission'},'thin_man');
547
+ window.any_time_manager.registerListWithClasses({'sortable' : 'AjaxSorter', 'ajax-link-now' : 'AjaxLinkSubmission', 'ajax-form-now' : 'AjaxFormSubmission'},'thin_man');
548
548
  window.any_time_manager.registerList(['ajax-link-now'])
549
549
  window.any_time_manager.load();
550
550
 
@@ -60,6 +60,21 @@ module ThinMan
60
60
  ajax_options
61
61
  end
62
62
 
63
+ def ajax_form_now(target, sub_class: nil, insert_method: nil, error_target: nil, empty_on_success: nil, reset_on_success: nil, container: nil, custom_progress: nil)
64
+ ajax_options = {
65
+ 'data-ajax-form-now' => true,
66
+ 'data-ajax-target' => target
67
+ }
68
+ ajax_options.merge!('data-insert-method' => insert_method) if insert_method.present?
69
+ ajax_options.merge!('data-sub-type' => sub_class) if sub_class.present?
70
+ ajax_options.merge!('data-container' => container) if container.present?
71
+ ajax_options.merge!('data-error-target' => error_target) if error_target.present?
72
+ ajax_options.merge!('data-empty-on-success' => empty_on_success) if empty_on_success.present?
73
+ ajax_options.merge!('data-reset-on-success' => reset_on_success) if reset_on_success.present?
74
+ ajax_options.merge!('data-custom-progress' => custom_progress) if custom_progress.present?
75
+ ajax_options
76
+ end
77
+
63
78
  def ajax_form_attrs(target, sub_class: nil, insert_method: nil, error_target: nil, empty_on_success: nil, reset_on_success: nil, no_mouse_click: nil)
64
79
  data_attrs = "data-ajax-form=true data-ajax-target=#{target}"
65
80
  data_attrs += " data-insert-method=#{insert_method}" if insert_method
@@ -71,6 +86,16 @@ module ThinMan
71
86
  data_attrs
72
87
  end
73
88
 
89
+ def ajax_form_now_attrs(target, sub_class: nil, insert_method: nil, error_target: nil, empty_on_success: nil, reset_on_success: nil)
90
+ data_attrs = "data-ajax-form-now=true data-ajax-target=#{target}"
91
+ data_attrs += " data-insert-method=#{insert_method}" if insert_method
92
+ data_attrs += " data-sub-type=#{sub_class}" if sub_class
93
+ data_attrs += " data-empty-on-success=#{empty_on_success}" if empty_on_success
94
+ data_attrs += " data-reset-on-success=#{reset_on_success}" if reset_on_success
95
+ data_attrs += " data-error-target=#{error_target}" if error_target
96
+ data_attrs
97
+ end
98
+
74
99
  def ajax_link_attrs(target, insert_method: nil, sub_type: nil, empty_on_success: nil, http_method: nil, no_mouse_click: nil)
75
100
  data_attrs = "data-ajax-link=true data-ajax-target=#{target}"
76
101
  data_attrs += " data-insert-method=#{insert_method}" if insert_method
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.14.0"
2
+ VERSION = "0.15.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut, Adam Bialek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails