Sha256: 1535d918171eb7bde31b33f2f86ceea7dd65556dddc611826ded9526a4ab579b

Contents?: true

Size: 731 Bytes

Versions: 11

Compression:

Stored size: 731 Bytes

Contents

module Touch
  class ServerCaller < Netzke::Base
    js_base_class "Ext.Panel"

    def configuration
      super.merge({
        :docked_items => [{:dock => :top, :xtype => :toolbar, :title => 'Server Caller', :items => [
          {:text => "Bug server", :handler => :on_bug_server}
        ]}]
      })
    end

    js_method :on_bug_server, <<-JS
      function(){
        if (!this.maskCmp) this.maskCmp = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
        this.maskCmp.show();
        this.whatsUp({}, function(){
          this.maskCmp.hide();
        }, this);
      }
    JS

    endpoint :whats_up do |params|
      sleep 1 # for visual testing
      {:update => "Hello from the server!"}
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
netzke-core-0.7.7 test/core_test_app/app/components/touch/server_caller.rb
netzke-core-0.7.6 test/core_test_app/app/components/touch/server_caller.rb
netzke-core-0.7.5 test/core_test_app/app/components/touch/server_caller.rb
netzke-core-0.7.4 test/core_test_app/app/components/touch/server_caller.rb
netzke-core-0.7.3 test/core_test_app/app/components/touch/server_caller.rb
netzke-core-0.7.2 test/core_test_app/app/components/touch/server_caller.rb
netzke-core-0.7.1 test/rails_app/app/components/touch/server_caller.rb
netzke-core-0.6.7 test/rails_app/app/components/touch/server_caller.rb
netzke-core-0.7.0 test/rails_app/app/components/touch/server_caller.rb
netzke-core-0.6.6 test/rails_app/app/components/touch/server_caller.rb
netzke-core-0.6.5 test/rails_app/app/components/touch/server_caller.rb