romo 0.20.3 → 0.20.4

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
  SHA512:
3
- metadata.gz: 5aeadbefd98f8b82e409d936c583ad53939f70db564b5079fd3105507db499427278c209837da5c28b697ac96e803ff77873dded7640bd1d3cb3dbd12d1680e6
4
- data.tar.gz: c34dae4264fd7b9f278da8123578aebcead9ea5b3645ce2be3258ed795fc1df3148af4f58ab4f97976364b63802f7c8677d4d71b99314722b62cbbb40a11be71
3
+ metadata.gz: fc92a94417b75d8dcd13b5f9e48fd5f7d00789e18bb9969a1b21ab55f85e572c70a17ac3a80e62c31e0abca1989e4be6d48e2746a8ea0d44719c5cbf08e13dd3
4
+ data.tar.gz: 16c16fbf9a5fc4bf11c0b71cd8944b131a36e5c19e4ffcef3a03e6274564fd4a73ce5473eaa24fb9dd9421ed652bad4490f123237ba9282c38db5b65965b43ec
5
5
  SHA1:
6
- metadata.gz: 6b2439dc448fe66da286d45dc2d964c0a41a177a
7
- data.tar.gz: eb90ed22e98caa51444b2fc2b799807fef755d3f
6
+ metadata.gz: 753cd71f80760176c3b62b6ae4920c3a21067017
7
+ data.tar.gz: 300d46042e20b7b35e1ba5706a32b86318bdf01e
@@ -967,11 +967,12 @@ RomoPopupStack.prototype.addStyleClass = function(styleClass) {
967
967
  }
968
968
 
969
969
  RomoPopupStack.prototype.addElem = function(popupElem, boundOpenFn, boundCloseFn, boundPlaceFn) {
970
- this.items.push(new this.itemClass(popupElem, boundCloseFn, boundPlaceFn));
971
-
972
970
  // allow any body click events to propagate and run first. This ensures
973
971
  // any existing stack is in the appropriate state before opening a new popup.
974
- Romo.pushFn(boundOpenFn);
972
+ Romo.pushFn(Romo.proxy(function() {
973
+ this.items.push(new this.itemClass(popupElem, boundCloseFn, boundPlaceFn));
974
+ boundOpenFn();
975
+ }, this));
975
976
  }
976
977
 
977
978
  RomoPopupStack.prototype.closeThru = function(popupElem) {
@@ -1042,7 +1043,7 @@ RomoPopupStack.prototype._onBodyClick = function(e) {
1042
1043
  if (Romo.is(e.target, this.popupSelector)) {
1043
1044
  popupElem = e.target;
1044
1045
  } else {
1045
- popupElem = Romo.parents(e.target, this.popupSelector)[0];
1046
+ popupElem = Romo.closest(e.target, this.popupSelector);
1046
1047
  }
1047
1048
 
1048
1049
  if (popupElem === undefined || !this._includes(popupElem)) {
@@ -111,8 +111,8 @@ RomoDropdown.prototype._openPopup = function() {
111
111
  Romo.on(Romo.scrollableParents(this.elem), 'scroll', this._onScrollableParentsScroll);
112
112
 
113
113
  if (Romo.data(this.elem, 'romo-dropdown-content-elem') !== undefined) {
114
- var contentElem = Romo.elems(Romo.data(this.elem, 'romo-dropdown-content-elem'))[0];
115
- this._loadBodySuccess(contentElem.outerHTML);
114
+ var contentElem = Romo.f(Romo.data(this.elem, 'romo-dropdown-content-elem'))[0];
115
+ this._loadBodySuccess(contentElem.innerHTML);
116
116
  } else {
117
117
  this.romoAjax.doInvoke();
118
118
  }
@@ -211,7 +211,12 @@ RomoForm.prototype._getXhrDataType = function() {
211
211
  RomoForm.prototype.romoEvFn._onSubmitClick = function(e) {
212
212
  e.preventDefault();
213
213
 
214
- var submitElem = e.target;
214
+ var submitElem;
215
+ if (Romo.is(e.target, '[data-romo-form-submit]')) {
216
+ submitElem = e.target;
217
+ } else {
218
+ submitElem = Romo.closest(e.target, '[data-romo-form-submit]');
219
+ }
215
220
  if (!Romo.hasClass(submitElem, 'disabled')) {
216
221
  if (Romo.data(submitElem, 'romo-form-submit') === 'confirm') {
217
222
  Romo.trigger(this.elem, 'romoForm:confirmSubmit', [this]);
@@ -67,7 +67,7 @@ RomoInlineForm.prototype._bindForm = function() {
67
67
  Romo.on(formElem, 'romoForm:ready', Romo.proxy(function(e, romoForm) {
68
68
  Romo.trigger(this.elem, 'romoInlineForm:romoForm:ready', [romoForm, this]);
69
69
  }, this));
70
- Romo.on(formElem, 'romoForm:confirmSubmit', Romo.proxy(function(e, form) {
70
+ Romo.on(formElem, 'romoForm:confirmSubmit', Romo.proxy(function(e, romoForm) {
71
71
  Romo.trigger(this.elem, 'romoInlineForm:romoForm:confirmSubmit', [romoForm, this]);
72
72
  }, this));
73
73
  Romo.on(formElem, 'romoForm:beforeSubmit', Romo.proxy(function(e, romoForm) {
@@ -73,8 +73,8 @@ RomoModal.prototype.doPlacePopupElem = function() {
73
73
 
74
74
  RomoModal.prototype._openPopup = function() {
75
75
  if (Romo.data(this.elem, 'romo-modal-content-elem') !== undefined) {
76
- var contentElem = Romo.elems(Romo.data(this.elem, 'romo-modal-content-elem'))[0];
77
- this._loadBodySuccess(contentElem.outerHTML);
76
+ var contentElem = Romo.f(Romo.data(this.elem, 'romo-modal-content-elem'))[0];
77
+ this._loadBodySuccess(contentElem.innerHTML);
78
78
  } else {
79
79
  this.romoAjax.doInvoke();
80
80
  }
@@ -11,6 +11,10 @@ var RomoSpinner = RomoComponent(function(elem) {
11
11
  });
12
12
 
13
13
  RomoSpinner.prototype.doStart = function(customBasisSize) {
14
+ if (this.spinner !== undefined) {
15
+ return;
16
+ }
17
+
14
18
  var basisSize = (
15
19
  customBasisSize ||
16
20
  Romo.data(this.elem, 'romo-spinner-basis-size') ||
@@ -51,6 +55,10 @@ RomoSpinner.prototype.doStart = function(customBasisSize) {
51
55
  }
52
56
 
53
57
  RomoSpinner.prototype.doStop = function() {
58
+ if (this.spinner === undefined) {
59
+ return;
60
+ }
61
+
54
62
  if (this.spinner !== undefined) {
55
63
  this.spinner.stop();
56
64
  this.spinner = undefined;
data/lib/romo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Romo
2
- VERSION = "0.20.3"
2
+ VERSION = "0.20.4"
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.20.3
4
+ version: 0.20.4
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-12-04 00:00:00 Z
13
+ date: 2017-12-07 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: assert