Sha256: d3e3057d00c9e2a648f1fbafcb3c6e4d25f1e6bffe81563eaea55e4fe2322271
Contents?: true
Size: 1.37 KB
Versions: 20
Compression:
Stored size: 1.37 KB
Contents
module Netzke module Basepack class RecordFormWindow < Netzke::Basepack::Window 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 :multi_edit_form do |c| preconfigure_form(c) c.multi_edit = true end js_configure do |c| c.button_align = :right c.width = '80%' c.auto_height = true c.modal = true c.init_component = <<-JS function(params){ this.callParent(); this.items.first().on("submitsuccess", function(){ this.closeRes = "ok"; this.close(); }, this); } JS c.on_ok = <<-JS function(params){ this.items.first().onApply(); } JS c.on_cancel = <<-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 = Form c.border = true c.bbar = false c.prevent_header = true c.merge! config.form_config end end end end
Version data entries
20 entries across 20 versions & 1 rubygems