thin_man 0.10.1 → 0.10.2

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: 0a373a9345490879ece8eb5a41d704cc4d6d6171
4
- data.tar.gz: 42da82ca9ee283686cfc8e14d1a8ca6ee51bca7e
3
+ metadata.gz: ce8570c2dae08da4e160aab8bc11c939262a1ab0
4
+ data.tar.gz: c6c55c1c6f004747f33e4afffce65fa832b0283b
5
5
  SHA512:
6
- metadata.gz: 069241f3a058e810864ea6bb8bbd93f89cf023619fb18c7bbfdb5a04e5a6cbaf8a9f9a6841a86ed50d604e79e91da0d8ede956815330deacaedcd95f0a04df53
7
- data.tar.gz: 8902f79b94489082ffa9a708a5c764228a5d116e0a8b6ded3692367720ede152fb95bd48839d80aaf8c8c8f49060c4b779e1b16eaa83f17d3319c3592abf9987
6
+ metadata.gz: 3a73063e12c2ede952c54704a3394ec2460246652548543ad90fc36ccc55179f635371c8f6db4aeaa11b89a67ddc0cc527c0e060e77df15529c2ee8c05158522
7
+ data.tar.gz: c3cc43aeb492bcc4cb10bbe20fe455c6b2624cd3b0df30c8cd93a1106ec3491d4c47b5f896f0afa98bcaaceb1371c928275259d48bb22afc56268786328f80c4
@@ -32,9 +32,12 @@ var initThinMan = function(){
32
32
  success: function(data,textStatus,jqXHR) { ajax_submission.ajaxSuccess(data,textStatus,jqXHR) },
33
33
  error: function(jqXHr) { ajax_submission.ajaxError(jqXHr) },
34
34
  complete: function(jqXHr) { ajax_submission.ajaxComplete(jqXHr) },
35
- contentType: false,
36
- processData: false
35
+ processData: ajax_submission.getProcessData()
37
36
  };
37
+ if(!ajax_submission.sendContentType()){
38
+ this.ajax_options.contentType = false
39
+ }
40
+ console.log(this.ajax_options)
38
41
  $.ajax(ajax_submission.ajax_options);
39
42
  },
40
43
  getTarget: function(){
@@ -59,6 +62,12 @@ var initThinMan = function(){
59
62
  getData: function() {
60
63
  return null;
61
64
  },
65
+ getProcessData: function() {
66
+ return true;
67
+ },
68
+ sendContentType: function() {
69
+ return true;
70
+ },
62
71
  insertHtml: function(data) {
63
72
  if(this.target){
64
73
  this.target[this.insert_method](data);
@@ -321,6 +330,12 @@ var initThinMan = function(){
321
330
  // http://stackoverflow.com/questions/12989442/uploading-multiple-files-using-formdata
322
331
  return new FormData(this.jq_obj[0]);
323
332
  },
333
+ getProcessData: function() {
334
+ return false;
335
+ },
336
+ sendContentType: function() {
337
+ return false;
338
+ },
324
339
  getTrigger: function(){
325
340
  this.trigger = this.jq_obj.find('button, input[type="submit"]');
326
341
  },
@@ -342,6 +357,9 @@ var initThinMan = function(){
342
357
  }
343
358
  return this_data
344
359
  },
360
+ getProcessData: function() {
361
+ return true;
362
+ },
345
363
  getAjaxType: function(){
346
364
  return this.jq_obj.data('ajax-method') || 'GET'
347
365
  },
@@ -423,6 +441,9 @@ var initThinMan = function(){
423
441
  getData: function(){
424
442
  return {authenticity_token: $('[name="csrf-token"]').attr('content')};
425
443
  },
444
+ getProcessData: function() {
445
+ return true;
446
+ },
426
447
  ajaxBefore: function(jqXHR){
427
448
  return confirm("Are you sure you want to delete this?");
428
449
  }
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.10.1"
2
+ VERSION = "0.10.2"
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.1
4
+ version: 0.10.2
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-08-28 00:00:00.000000000 Z
11
+ date: 2015-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails