Sha256: bdf030d3b6220a1474224f739d127fe6f66a5c6acbf0510c791c89de00b78dd0
Contents?: true
Size: 659 Bytes
Versions: 3
Compression:
Stored size: 659 Bytes
Contents
class PluginWithEndpoints < Netzke::Plugin js_configure do |c| c.init = <<-JS function(){ this.callParent(arguments); // inject a tool into parent this.cmp.tools = this.cmp.tools || []; this.cmp.tools = [{id: 'gear', handler: this.onGear, scope: this}]; } JS c.on_gear = <<-JS function(){ this.serverOnGear(); } JS c.process_gear_callback = <<-JS function(newTitle){ this.cmp.setTitle(newTitle); } JS end endpoint :server_on_gear do |params, this| this.process_gear_callback("Response from server side of PluginWithEndpoints") end end
Version data entries
3 entries across 3 versions & 1 rubygems