dominate 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dominate/version.rb +1 -1
- data/lib/dominate/widget.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a16990917e609403b3bf9558f8c9149072c40af3
|
4
|
+
data.tar.gz: 81eea62bec643eccc15c88716ddb61ed5d618957
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 723043df5c8f4103c696f28db2ffe505af90341f491663195fa6a8886512b59ee6c6c90b4c5afc8fd96c0fee84b81655b0730f11ca474d81f07c5353446295ed
|
7
|
+
data.tar.gz: 03553843e1148fed8043d65640aaf4d60e4cafc077c0123078d17c8457cb226a9c377e1ae2bdeab7c8c4a7db7473b0adc956bc1d10f2d0439e350cb2a5e30701
|
data/lib/dominate/version.rb
CHANGED
data/lib/dominate/widget.rb
CHANGED
@@ -106,9 +106,9 @@ module Dominate
|
|
106
106
|
|
107
107
|
def trigger widget_event, data = {}
|
108
108
|
data = data.to_h
|
109
|
-
widget_name = data.delete(:for)
|
109
|
+
widget_name = data.has_key?(:for) ? data.delete(:for) : name
|
110
110
|
|
111
|
-
event.trigger widget_name
|
111
|
+
event.trigger widget_name, widget_event, data.to_h
|
112
112
|
# threads = []
|
113
113
|
#
|
114
114
|
# req.env[:loaded_widgets].each do |n, w|
|
@@ -127,7 +127,7 @@ module Dominate
|
|
127
127
|
if class_events = self.class.events
|
128
128
|
class_events.each do |class_event, opts|
|
129
129
|
if class_event.to_s == widget_event.to_s && (
|
130
|
-
|
130
|
+
(widget_name.to_s == name.to_s && !opts.has_key?(:for)) or
|
131
131
|
opts[:for].to_s == widget_name.to_s
|
132
132
|
)
|
133
133
|
if not opts[:with]
|