dataisland 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dataisland.rb +20 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5e584254b7c3ff6be68ada1db760ad1b6879bb0
|
4
|
+
data.tar.gz: caab786c6b770a567b45ebd73db0f7018252a1fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 122fd66e76d6a2b4c2c042c71f5549d7167bf54d8d0ef3def719362a242023b3b8c8415f683ac68665f9ac8240c9290b1d8d0614ee8921fdb5be33587800252d
|
7
|
+
data.tar.gz: 148b1a3866c1726e1e252fb220a19a6e625c59cc57c9292fe356f1bc13d8a8b1cabbed0d5bab58c19f1e204ed13af2b882faf248da2de9adacfcb9c7bbefae8b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dataisland.rb
CHANGED
@@ -153,6 +153,12 @@ class DataIsland
|
|
153
153
|
add_to_destnodes(dest_nodes,r,e) if r
|
154
154
|
end
|
155
155
|
|
156
|
+
rec.xpath('.//button[@onclick]').each do |e|
|
157
|
+
|
158
|
+
r = e.attribute(:onclick)[/\{([^\}]+)\}$/,1]
|
159
|
+
add_to_destnodes(dest_nodes,r,e) if r
|
160
|
+
end
|
161
|
+
|
156
162
|
dest_nodes.keys.each do |raw_field|
|
157
163
|
|
158
164
|
field = raw_field.to_sym
|
@@ -225,6 +231,20 @@ class DataIsland
|
|
225
231
|
|
226
232
|
when :img
|
227
233
|
e2.attributes[:src] = record[field]
|
234
|
+
|
235
|
+
when :button
|
236
|
+
|
237
|
+
onclick = e2.attributes[:onclick]
|
238
|
+
|
239
|
+
if onclick then
|
240
|
+
|
241
|
+
if onclick[/{#{field}/] then
|
242
|
+
|
243
|
+
val = record[field]
|
244
|
+
new_data = onclick.sub(/\{[^\}]+\}/,val)
|
245
|
+
e2.attributes[:onclick] = new_data
|
246
|
+
end
|
247
|
+
end
|
228
248
|
end
|
229
249
|
|
230
250
|
e2.attributes.delete :datafld
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dataisland
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
hfU2aUsh32EdO0lz//CAq6vJ6SOTB7aLPUBCTqjepgkYPqhbA4xLDdvXr4sd5ObL
|
32
32
|
ZuH02/86EylsSA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-
|
34
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex
|
metadata.gz.sig
CHANGED
Binary file
|