Class: Netzke::ConfigurationPanel

Inherits:
TabPanel
  • Object
show all
Defined in:
lib/netzke/configuration_panel.rb

Overview

TabPanel-based widget that wraps-up “configuration widgets” that each widget can define (along) with including the Plugins::ConfigurationTool tool.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TabPanel

#api_activate_tab, #fit_panels, #get_active_tab, #initial_aggregatees, #initialize, #items, js_base_class, #js_config

Constructor Details

This class inherits a constructor from Netzke::TabPanel

Class Method Details

.js_extend_propertiesObject



14
15
16
17
18
19
20
21
22
# File 'lib/netzke/configuration_panel.rb', line 14

def self.js_extend_properties
  {
    :reload_parent => <<-END_OF_JAVASCRIPT.l,
      function(){
        this.getParent().reload();
      }
    END_OF_JAVASCRIPT
  }
end

Instance Method Details

#commit(params) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/netzke/configuration_panel.rb', line 6

def commit(params)
  commit_data = ActiveSupport::JSON.decode params[:commit_data]
  commit_data.each_pair do |k,v|
    aggregatee_instance(k).commit(v)
  end
  {:reload_parent => true, :feedback => (@flash.empty? ? nil : @flash)}
end