romo 0.19.2 → 0.19.3

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
- SHA512:
3
- metadata.gz: 1e1c9f9b88cfa50366a8c658d12251b7414682f6261cf6a314c30f90dfb2ad343c9cbb1872e1903f330a5c0c2d22c1e722092ac57938d417b9cf4a623055618b
4
- data.tar.gz: c41dbc991e089a775f9ec8c3743153bc0c6a29ffe00ffe6d1c4a67286aae89cbbb44cb2ba84d6a496d312fb57daf7fea09b1f717d8483beb1affc37819ff8fe9
5
2
  SHA1:
6
- metadata.gz: 2c228f78f2a8852cda11f95130b029863c62a478
7
- data.tar.gz: 0a5ea88cefc3a57aec4ab3f5659905460711bb05
3
+ metadata.gz: 453dd6a22e154e5ce1632a27f69486fd706c47db
4
+ data.tar.gz: ada5144693043deaa1675bee74a8a5c81df4573b
5
+ SHA512:
6
+ metadata.gz: 51d1aff498ebbd3be8ab5ca7206cca0110ac06e94354b3f0e54dc07eab660b8001d253c3541426fd6401ce5ea6a4a8a80ef58912dad98b08a6007ddc9e465f18
7
+ data.tar.gz: 80d0ed512aa24f85c7109ee9e9997c16f5270492bcbb1f74a03a5f4720fb6dc2d0a93270dbf5d2b253d0603e525449ef5a8045f495b1c9a7d7afcad25fbfab35
@@ -21,6 +21,8 @@ var RomoAjax = function(element) {
21
21
  this.invokeQueued = false;
22
22
  this.invokeRunning = false;
23
23
 
24
+ this.queuedInvokeData = undefined;
25
+
24
26
  if (this.invokeOn !== undefined) {
25
27
  this.elem.unbind(this.invokeOn);
26
28
  }
@@ -49,29 +51,31 @@ RomoAjax.prototype.doUnbindElem = function() {
49
51
  this.elem.off('romoAjax:triggerInvoke', $.proxy(this.onInvoke, this));
50
52
  }
51
53
 
52
- RomoAjax.prototype.onInvoke = function(e) {
54
+ RomoAjax.prototype.onInvoke = function(e, data) {
53
55
  if (e !== undefined) {
54
56
  e.preventDefault();
55
57
  }
56
58
 
57
59
  if (this.elem.hasClass('disabled') === false) {
58
- this.doInvoke();
60
+ this.doInvoke(data);
59
61
  }
60
62
  }
61
63
 
62
- RomoAjax.prototype.doInvoke = function() {
63
- this.invokeQueued = true;
64
+ RomoAjax.prototype.doInvoke = function(data) {
65
+ this.invokeQueued = true;
66
+ this.queuedInvokeData = data;
64
67
  if (this.invokeRunning === false) {
65
68
  this._doInvoke();
66
69
  }
67
70
  }
68
71
 
69
- RomoAjax.prototype.doCall = function(callUrl) {
72
+ RomoAjax.prototype.doCall = function(callUrl, data) {
70
73
  this._trigger('romoAjax:callStart', [this]);
71
74
 
72
75
  $.ajax({
73
76
  type: this.callMethod,
74
77
  url: callUrl,
78
+ data: (data || {}),
75
79
  success: $.proxy(this.onCallSuccess, this),
76
80
  error: $.proxy(this.onCallError, this)
77
81
  });
@@ -101,12 +105,16 @@ RomoAjax.prototype._doCompleteInvoke = function() {
101
105
  RomoAjax.prototype._doInvoke = function() {
102
106
  this.invokeQueued = false;
103
107
  this.invokeRunning = true;
108
+
109
+ var data = this.queuedInvokeData;
110
+ this.queuedInvokeData = undefined;
111
+
104
112
  var callUrl = this.elem.attr(this.urlAttr);
105
113
  if (this.callOnlyOnce === true) {
106
114
  this.elem.removeAttr(this.urlAttr);
107
115
  }
108
116
  if (callUrl !== undefined) {
109
- this.doCall(callUrl);
117
+ this.doCall(callUrl, data);
110
118
  } else {
111
119
  this._doCompleteInvoke();
112
120
  }
data/lib/romo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Romo
2
- VERSION = "0.19.2"
2
+ VERSION = "0.19.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: romo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2
4
+ version: 0.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2017-07-11 00:00:00 Z
13
+ date: 2017-07-17 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: assert