Sha256: ba8fe3352aec077a9077aba14af9697f5ad51e533d5eed5d7c87a010d715ce26
Contents?: true
Size: 1.41 KB
Versions: 7
Compression:
Stored size: 1.41 KB
Contents
module Netzke module Basepack class RecordFormWindow < Netzke::Window::Base def configure(c) super c.fbar = [:ok, :cancel] end component :add_form do |c| preconfigure_form(c) end component :edit_form do |c| preconfigure_form(c) c.record_id = config.client_config[:record_id] end component :multiedit_form do |c| preconfigure_form(c) c.multiedit = true end client_class do |c| c.button_align = :right c.width = '80%' c.auto_height = true c.modal = true c.init_component = l(<<-JS) function(params){ this.callParent(); this.items.first().on("submitsuccess", function(){ this.closeRes = "ok"; this.close(); }, this); } JS c.netzke_on_ok = l(<<-JS) function(params){ this.items.first().netzkeOnApply(); } JS c.netzke_on_cancel = l(<<-JS) function(params){ this.close(); } JS end action :ok action :cancel protected def self.server_side_config_options [:form_config, *super] end def preconfigure_form(c) c.klass = Netzke::Form::Base c.border = true c.bbar = false c.prevent_header = true c.merge! config.form_config end end end end
Version data entries
7 entries across 7 versions & 1 rubygems