thin_man 0.10.2 → 0.10.3

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: ce8570c2dae08da4e160aab8bc11c939262a1ab0
4
- data.tar.gz: c6c55c1c6f004747f33e4afffce65fa832b0283b
3
+ metadata.gz: 921c2884c2b1df615c72ea87eacfbbb7f95caff2
4
+ data.tar.gz: e18cbf5f04609940809dd0308029b776d85beabe
5
5
  SHA512:
6
- metadata.gz: 3a73063e12c2ede952c54704a3394ec2460246652548543ad90fc36ccc55179f635371c8f6db4aeaa11b89a67ddc0cc527c0e060e77df15529c2ee8c05158522
7
- data.tar.gz: c3cc43aeb492bcc4cb10bbe20fe455c6b2624cd3b0df30c8cd93a1106ec3491d4c47b5f896f0afa98bcaaceb1371c928275259d48bb22afc56268786328f80c4
6
+ metadata.gz: 9e2c5a1b54466524617e5f7cd93ca51c077775017bab2dda422f52090eafa5ebcf3c1c2599bbdce36c764f34a1b347fc8f15fe64ae78778392a4e8d6720a4613
7
+ data.tar.gz: f010d380c401b1a625d44d2f14ed4f4d5e85bea6ca0f3a6c8a69306c9a3b0d45f81571766b7874e5702f85548b4e69d174df74e2aa79691d5b9f69de0a4dbbbc
@@ -37,7 +37,6 @@ var initThinMan = function(){
37
37
  if(!ajax_submission.sendContentType()){
38
38
  this.ajax_options.contentType = false
39
39
  }
40
- console.log(this.ajax_options)
41
40
  $.ajax(ajax_submission.ajax_options);
42
41
  },
43
42
  getTarget: function(){
@@ -326,15 +325,28 @@ var initThinMan = function(){
326
325
  return this.jq_obj.attr('method') || 'POST'
327
326
  },
328
327
  getData: function(){
329
- // need to implement a data-attribute for multiple file fields so we can allow selecting mutliple files at once. example here:
330
- // http://stackoverflow.com/questions/12989442/uploading-multiple-files-using-formdata
331
- return new FormData(this.jq_obj[0]);
328
+ if(this.getAjaxType().toLowerCase() == 'get'){
329
+ var data_array = this.jq_obj.serializeArray();
330
+ return data_array;
331
+ }else{
332
+ // need to implement a data-attribute for multiple file fields so we can allow selecting mutliple files at once. example here:
333
+ // http://stackoverflow.com/questions/12989442/uploading-multiple-files-using-formdata
334
+ return new FormData(this.jq_obj[0]);
335
+ }
332
336
  },
333
337
  getProcessData: function() {
334
- return false;
338
+ if(this.getAjaxType().toLowerCase() == 'get'){
339
+ return true;
340
+ }else{
341
+ return false;
342
+ }
335
343
  },
336
344
  sendContentType: function() {
337
- return false;
345
+ if(this.getAjaxType().toLowerCase() == 'get'){
346
+ return true;
347
+ }else{
348
+ return false;
349
+ }
338
350
  },
339
351
  getTrigger: function(){
340
352
  this.trigger = this.jq_obj.find('button, input[type="submit"]');
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.10.2"
2
+ VERSION = "0.10.3"
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.10.2
4
+ version: 0.10.3
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: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails