Methods

Netzke::Basepack::GridPanel::Javascript::InstanceMethods

Public Instance Methods

js_config() click to toggle source

The result of this method (a hash) is converted to a JSON object and passed as the configuration parameter to the constructor of our JavaScript class. Override it when you want to pass any extra configuration to the JavaScript side.

    # File lib/netzke/basepack/grid_panel/javascript.rb, line 17
17:           def js_config
18:             super.merge({
19:               :bbar => config.has_key?(:bbar) ? config[:bbar] : default_bbar,
20:               :context_menu => config.has_key?(:context_menu) ? config[:context_menu] : default_context_menu,
21:               :columns => columns, # columns
22:               :model => config[:model], # the model name
23:               :inline_data => (get_data if config[:load_inline_data]), # inline data (loaded along with the grid panel)
24:               :pri => data_class.primary_key # table primary key name
25:             })
26:           end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.