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 +4 -4
- data/app/assets/javascripts/thin_man.js +1 -1
- data/lib/thin_man/ajax_helper.rb +25 -0
- data/lib/thin_man/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15be20c1677bc5e48c432eeaac4555d0cfb75ea2
|
4
|
+
data.tar.gz: 4e0c8639e7435d43e6663d6706b293980520de50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/thin_man/ajax_helper.rb
CHANGED
@@ -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
|
data/lib/thin_man/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|