romo 0.20.3 → 0.20.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/js/romo/base.js +5 -4
- data/assets/js/romo/dropdown.js +2 -2
- data/assets/js/romo/form.js +6 -1
- data/assets/js/romo/inline_form.js +1 -1
- data/assets/js/romo/modal.js +2 -2
- data/assets/js/romo/spinner.js +8 -0
- data/lib/romo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc92a94417b75d8dcd13b5f9e48fd5f7d00789e18bb9969a1b21ab55f85e572c70a17ac3a80e62c31e0abca1989e4be6d48e2746a8ea0d44719c5cbf08e13dd3
|
4
|
+
data.tar.gz: 16c16fbf9a5fc4bf11c0b71cd8944b131a36e5c19e4ffcef3a03e6274564fd4a73ce5473eaa24fb9dd9421ed652bad4490f123237ba9282c38db5b65965b43ec
|
5
5
|
SHA1:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 753cd71f80760176c3b62b6ae4920c3a21067017
|
7
|
+
data.tar.gz: 300d46042e20b7b35e1ba5706a32b86318bdf01e
|
data/assets/js/romo/base.js
CHANGED
@@ -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(
|
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.
|
1046
|
+
popupElem = Romo.closest(e.target, this.popupSelector);
|
1046
1047
|
}
|
1047
1048
|
|
1048
1049
|
if (popupElem === undefined || !this._includes(popupElem)) {
|
data/assets/js/romo/dropdown.js
CHANGED
@@ -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.
|
115
|
-
this._loadBodySuccess(contentElem.
|
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
|
}
|
data/assets/js/romo/form.js
CHANGED
@@ -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
|
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,
|
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) {
|
data/assets/js/romo/modal.js
CHANGED
@@ -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.
|
77
|
-
this._loadBodySuccess(contentElem.
|
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
|
}
|
data/assets/js/romo/spinner.js
CHANGED
@@ -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
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.
|
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-
|
13
|
+
date: 2017-12-07 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: assert
|