Sha256: c8fac7a943cc28b0d0143ffafbaf0e9f0ebdcf2383bc972e659b7ef1d069d0d0

Contents?: true

Size: 686 Bytes

Versions: 3

Compression:

Stored size: 686 Bytes

Contents

class EndpointsExtended < Endpoints
  def configure(c)
    super
    c.title = "Endpoints Extended"
  end

  action :with_response do |c|
    c.text = "With extended response"
  end

  js_configure do |c|
    c.on_bug_server = <<-JS
      function(){
        this.callParent();
        var bottomBar = this.getDockedItems()[1] || this.getDockedItems()[0]; // Hacky-hacky... better way to surely get the bottom bar?
        bottomBar.add({text: "Added" + " by extended Server Caller"});
      }
    JS
  end

  # Overriding the :whats_up endpoint from ServerCaller
  endpoint :whats_up do |params, this|
    super(params, this)

    this.set_title(this.set_title[0] + " plus")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netzke-core-0.8.4 test/core_test_app/app/components/endpoints_extended.rb
netzke-core-0.8.3 test/core_test_app/app/components/endpoints_extended.rb
netzke-core-0.8.2 test/core_test_app/app/components/endpoints_extended.rb