flammarion 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/flammarion/version.rb
CHANGED
data/lib/flammarion/writeable.rb
CHANGED
@@ -93,6 +93,12 @@ module Flammarion
|
|
93
93
|
%|<a class="floating-button" href="#" onClick="$ws.send({id:'#{id}', action:'callback', source:'embedded_button'})">#{label}</a>|
|
94
94
|
end
|
95
95
|
|
96
|
+
def callback_link(label, options = {}, &block)
|
97
|
+
id = @front_end.make_id
|
98
|
+
@front_end.callbacks[id] = block
|
99
|
+
%|<a href="#" onClick="$ws.send({id:'#{id}', action:'callback', source:'link'})">#{label}</a>|
|
100
|
+
end
|
101
|
+
|
96
102
|
def input(label, options = {}, &block)
|
97
103
|
id = @front_end.make_id
|
98
104
|
send_json({action:'input', label:label, id:id}.merge(options))
|