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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 056dd5fc780de215f3539e3c6a5ba69994a912f4
4
- data.tar.gz: 4b88cad5d960273c59ab47d84a5c55100d9ad3db
3
+ metadata.gz: b9b07c9af95707c57a982f7cdee7f3322b95502f
4
+ data.tar.gz: 4b1e8263b98f084fc8106433e840a52138b9aa16
5
5
  SHA512:
6
- metadata.gz: c268de696a3094961fc180262b8684e108fed053c8ef8688d3348f8f1ebd57a323d89fd15389126b5bcba0e60d51e858f05c1c386b5dff3d0438da09c12913e3
7
- data.tar.gz: 7c1ca14040f25e018ddec7c49d9329ca6498e21c79b1085a31cc202539636681d1d621bce5ab67f69b9701cb2726ab08b9a13463df26718023af1e176554ff49
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.target.find('input,select,textarea').filter(':visible:enabled:first').each(function(){
90
- if(!$(this).data('date-picker')){
91
- $(this).focus();
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) {
@@ -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,
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.15.12"
2
+ VERSION = "0.15.13"
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.15.12
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: 2016-12-22 00:00:00.000000000 Z
11
+ date: 2017-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails