Sha256: efa91c60a423ad100c6257509676664543cc28cc46a7545b8bfeedbc145a0da0
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
module Netzke # # Ext.grid.PropertyGrid # class PropertyGrid < Base interface :load_source, :submit_source def initialize(*args) super @config = {:ext_config => {}}.merge(@config) end def self.js_base_class "Ext.grid.PropertyGrid" end def actions [{ :text => 'Apply', :handler_name => 'submit', :id => 'apply' }] end def self.js_default_config super.merge({ :bbar => "config.actions".l }) end def self.js_extend_properties { :submit => <<-JS.l, function() { Ext.Ajax.request({ url:this.initialConfig.interface.submitSource, params:{data:Ext.encode(this.getSource())}, scope:this }) } JS :on_widget_load => <<-JS.l, function(){ this.loadSource() } JS :load_source => <<-JS.l, function(){Ext.Ajax.request({ url:this.initialConfig.interface.loadSource, success:function(r){ var m = Ext.decode(r.responseText); this.setSource(m.source); // this.feedback(m.flash); }, scope:this })} JS } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
netzke-basepack-0.3.4 | lib/netzke/property_grid.rb |
netzke-basepack-0.3.5 | lib/netzke/property_grid.rb |