thin_man 0.15.5 → 0.15.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 +4 -4
- data/app/assets/javascripts/thin_man.js +14 -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: 373fee9d1af3e08f436b8c8c523d74548fe72220
|
4
|
+
data.tar.gz: fb31a388438fb06ca08041272ce0176785d51305
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5d5b86b4e62db5b314253783b219b29f76ae081544c6baa424f804680a954a4fed63f1bc58d9f785cae205dcf8cf1bb1c252c54eefc4404928f9f5355d180e3
|
7
|
+
data.tar.gz: c78d106d8b01b32d333332064baaa713e3094505f0058eadf3aa5f43c030bd536eeaca853202c75bab3e8af6289ffc848fce3fd04fe6b94a777ad4a63d4d6038
|
@@ -374,13 +374,26 @@ var initThinMan = function(){
|
|
374
374
|
return this.jq_obj.attr('method') || 'POST'
|
375
375
|
},
|
376
376
|
getData: function(){
|
377
|
+
var $clicked = $(document.activeElement);
|
378
|
+
|
379
|
+
if ($clicked.length && $clicked.is('button[type="submit"], input[type="submit"], input[type="image"]') && $clicked.is('[name]')) {
|
380
|
+
var button_name = $clicked.attr('name')
|
381
|
+
var button_value = $clicked.attr('value')
|
382
|
+
}
|
377
383
|
if(this.getAjaxType().toLowerCase() == 'get'){
|
378
384
|
var data_array = this.jq_obj.serializeArray();
|
385
|
+
if(button_name && button_value){
|
386
|
+
data_array.push({name: button_name, value: button_value})
|
387
|
+
}
|
379
388
|
return data_array;
|
380
389
|
}else{
|
381
390
|
// need to implement a data-attribute for multiple file fields so we can allow selecting mutliple files at once. example here:
|
382
391
|
// http://stackoverflow.com/questions/12989442/uploading-multiple-files-using-formdata
|
383
|
-
|
392
|
+
var fd = new FormData(this.jq_obj[0]);
|
393
|
+
if(button_name && button_value){
|
394
|
+
fd.set(button_name, button_value)
|
395
|
+
}
|
396
|
+
return fd
|
384
397
|
}
|
385
398
|
},
|
386
399
|
ajaxSuccess: function(data,textStatus,jqXHR){
|
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.6
|
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-
|
11
|
+
date: 2016-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|