thin_man 0.15.12 → 0.15.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/thin_man.js +18 -6
- data/lib/thin_man/ajax_helper.rb +2 -1
- 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: b9b07c9af95707c57a982f7cdee7f3322b95502f
|
4
|
+
data.tar.gz: 4b1e8263b98f084fc8106433e840a52138b9aa16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91aa64b10c2ee2a9ed8ecea75d6e550981143fce49b81fa45ebc4d29a2cc00944c3a4119b77ab10a0510bb264b2e8d0cee57b4674e194a33bdb402ee6c699e1b
|
7
|
+
data.tar.gz: 5592648b37b19700445460c93ca656b983e16521094262062192db7dbc95f06978a9406944e0794281f5dd10ac98673d749735eb12301c5232809a4cffe4a52b
|
@@ -86,13 +86,18 @@ var initThinMan = function(){
|
|
86
86
|
insertHtml: function(data) {
|
87
87
|
if(this.target){
|
88
88
|
this.target[this.insert_method](data);
|
89
|
-
this.
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
89
|
+
if(this.refocus()){
|
90
|
+
this.target.find('input,select,textarea').filter(':visible:enabled:first').each(function(){
|
91
|
+
if(!$(this).data('date-picker')){
|
92
|
+
$(this).focus();
|
93
|
+
}
|
94
|
+
});
|
95
|
+
}
|
94
96
|
}
|
95
97
|
},
|
98
|
+
refocus: function(){
|
99
|
+
return true;
|
100
|
+
},
|
96
101
|
ajaxSuccess: function(data,textStatus,jqXHR){
|
97
102
|
if(typeof data === 'string'){
|
98
103
|
this.insertHtml(data);
|
@@ -461,7 +466,14 @@ var initThinMan = function(){
|
|
461
466
|
},
|
462
467
|
showTrigger: function(){
|
463
468
|
this.trigger.css('visibility','visible');
|
464
|
-
}
|
469
|
+
},
|
470
|
+
refocus: function(){
|
471
|
+
if(this.jq_obj.data('ajax-link-now')){
|
472
|
+
return false
|
473
|
+
}
|
474
|
+
return true
|
475
|
+
},
|
476
|
+
|
465
477
|
}),
|
466
478
|
thin_man.AjaxModalOpener = thin_man.AjaxLinkSubmission.extend({
|
467
479
|
ajaxSuccess: function(data,textStatus,jqXHR) {
|
data/lib/thin_man/ajax_helper.rb
CHANGED
@@ -17,7 +17,7 @@ module ThinMan
|
|
17
17
|
html_options.merge(ajax_options))
|
18
18
|
end
|
19
19
|
|
20
|
-
def ajax_link_now(name, options, html_options, target, sub_class: nil, insert_method: nil, empty_on_success: nil, http_method: nil, progress_target: nil, progress_color: nil)
|
20
|
+
def ajax_link_now(name, options, html_options, target, sub_class: nil, insert_method: nil, empty_on_success: nil, http_method: nil, no_mouse_click: nil, progress_target: nil, progress_color: nil)
|
21
21
|
ajax_options = {
|
22
22
|
'data-ajax-link-now' => true,
|
23
23
|
'data-ajax-target' => target
|
@@ -26,6 +26,7 @@ module ThinMan
|
|
26
26
|
ajax_options.merge!('data-insert-method' => insert_method) if insert_method.present?
|
27
27
|
ajax_options.merge!('data-ajax-method' => http_method) if http_method.present?
|
28
28
|
ajax_options.merge!('data-empty-on-success' => empty_on_success) if empty_on_success.present?
|
29
|
+
ajax_options.merge!('data-no-mouse-click' => no_mouse_click) if no_mouse_click.present?
|
29
30
|
ajax_options.merge!('data-progress-target' => progress_target) if progress_target.present?
|
30
31
|
ajax_options.merge!('data-progress-color' => progress_color) if progress_color.present?
|
31
32
|
link_to(name,
|
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.15.
|
4
|
+
version: 0.15.13
|
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:
|
11
|
+
date: 2017-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|