conjoin 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/conjoin/inputs/select.rb +4 -0
- data/lib/conjoin/version.rb +1 -1
- data/lib/conjoin/widgets.rb +14 -9
- 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: e248e80cf3cd06a0fcce465bbc553bfb668cf282
|
4
|
+
data.tar.gz: 0643883e98f7053f640f6831872749889f253702
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2baa2ffa1b09b441371e5bcde0097a9d6da505118bb1791a6963661e765d17784cd0b1a09fd888a6bdaee036cd307c84554a5263c315b01d5f36bce847ff38a0
|
7
|
+
data.tar.gz: ae9f1b7b9076fefcb4087e3b9d655855c89aa2d37e2b03a6751d5722511898987d3d2581aed7e857b6cac856d0c2f615fb5d2a8ecc5305aa89dfd7fc6dd26487
|
data/lib/conjoin/version.rb
CHANGED
data/lib/conjoin/widgets.rb
CHANGED
@@ -211,21 +211,26 @@ module Conjoin
|
|
211
211
|
js.to_s.gsub(/(\\|<\/|\r\n|\\3342\\2200\\2250|[\n\r"'])/) {|match| JS_ESCAPE[match] }
|
212
212
|
end
|
213
213
|
|
214
|
-
def trigger
|
215
|
-
req.env[:
|
216
|
-
|
214
|
+
def trigger t_event, data = {}
|
215
|
+
req.env[:loaded_widgets].each do |n, w|
|
216
|
+
w.trigger_event t_event, req.params['widget_name'], data.to_ostruct
|
217
|
+
end
|
217
218
|
end
|
218
219
|
|
219
|
-
def trigger_event
|
220
|
+
def trigger_event t_event, widget_name, data = {}
|
220
221
|
if events = self.class.events
|
221
222
|
events.each do |class_event, opts|
|
222
|
-
if class_event ==
|
223
|
-
|
223
|
+
if class_event == t_event && (widget_name == folder.to_s or opts[:for].to_s == widget_name)
|
224
|
+
if not opts[:with]
|
225
|
+
e = t_event
|
226
|
+
else
|
227
|
+
e = opts[:with]
|
228
|
+
end
|
224
229
|
|
225
|
-
if method(
|
226
|
-
send(
|
230
|
+
if method(e) and method(e).parameters.length > 0
|
231
|
+
send(e, data)
|
227
232
|
else
|
228
|
-
send(
|
233
|
+
send(e)
|
229
234
|
end
|
230
235
|
end
|
231
236
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjoin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cuba
|