polymer-rails-forms 0.1.13 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/rails-forms/rails-form-helpers.html +2 -2
- data/assets/rails-forms/rails-form.html +15 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99e7b1677ddc0f20f5fd3b099d441374ef2026e7
|
4
|
+
data.tar.gz: 70aa1538f6ff43a9f410aee9234ac5f2f39825d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e31bb104ede0d50094ccf06a6967b2a4f66b320f7556881a984d4f2d0c9224aad51ecbb135626d965a4c996dcac7a5c75dc40a72104ccee02473dd164371376
|
7
|
+
data.tar.gz: 50e87d98b438f12bb271feab02ad8a95cd1b75a015ce99f0fa1c2c5c5c8596464d14e11e1f8da254bcc08f544e6d89d96a8099035f3624f6fd44690d9f57dcad
|
@@ -635,8 +635,8 @@
|
|
635
635
|
},
|
636
636
|
|
637
637
|
appendInputs: function(){
|
638
|
-
|
639
|
-
var obj = this.inputList
|
638
|
+
while (this.inputList.length){
|
639
|
+
var obj = this.inputList.shift(),
|
640
640
|
container = this.shadowRoot.querySelector(obj.container);
|
641
641
|
|
642
642
|
//TODO: insert points
|
@@ -252,12 +252,25 @@
|
|
252
252
|
|
253
253
|
domReady: function(){
|
254
254
|
var form = this.shadowRoot.querySelector("form"),
|
255
|
-
button = this.shadowRoot.querySelector("
|
255
|
+
button = this.shadowRoot.querySelector("#submit-button");
|
256
256
|
|
257
257
|
button.addEventListener("click", function(e){
|
258
258
|
if (this.action !== null){
|
259
259
|
if (this.xhr){
|
260
|
-
|
260
|
+
if (!!this.scope && this.scope.length > 0){
|
261
|
+
var data = {};
|
262
|
+
data[this.scope] = this.data;
|
263
|
+
} else {
|
264
|
+
data = this.data;
|
265
|
+
}
|
266
|
+
|
267
|
+
this.$.xhr.request({
|
268
|
+
method: this.method,
|
269
|
+
url: this.action,
|
270
|
+
body: JSON.stringify(data),
|
271
|
+
callback: this.handleXhrCallback,
|
272
|
+
headers: { "Content-type": "application/json", "Accept": "application/json" }
|
273
|
+
})
|
261
274
|
} else {
|
262
275
|
form.submit();
|
263
276
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polymer-rails-forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Weber
|
@@ -42,7 +42,7 @@ files:
|
|
42
42
|
- lib/polymer-rails-forms.rb
|
43
43
|
- lib/polymer_rails_forms/railtie.rb
|
44
44
|
- lib/tasks/install.rake
|
45
|
-
homepage: https://
|
45
|
+
homepage: https://gihub.com/gearcommons/polymer-rails-forms
|
46
46
|
licenses:
|
47
47
|
- MIT
|
48
48
|
metadata: {}
|