Sha256: fac64e3f8a0986a03879fcb725d897f298639eb19f22e351d2616ff22b1509f5

Contents?: true

Size: 805 Bytes

Versions: 5

Compression:

Stored size: 805 Bytes

Contents

class PanelWithPersistentRegions < Netzke::Base
  include Netzke::Basepack::ItemPersistence

  js_configure do |c|
    c.layout = :border
  end

  component :west do |c|
    c.klass = Netzke::Core::Panel
    c.width = 100
    c.collapsible = true
    c.region = :west
    c.split = true
  end

  component :south do |c|
    c.klass = Netzke::Core::Panel
    c.height = 100
    c.collapsible = true
    c.region = :south
    c.split = true
  end

  def configure(c)
    super
    c.items = [
      :west,
      :south,
      {region: :center, title: "An Ext panel"},

      # not that for a regular region (which is not a Netzke component), item_id has to be set to enable this region's persistence
      {region: :east, width: 200, split: true, title: "Another Ext panel", item_id: :east}
    ]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
netzke-basepack-0.8.4 test/basepack_test_app/app/components/panel_with_persistent_regions.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/components/panel_with_persistent_regions.rb
netzke-basepack-0.8.2 test/basepack_test_app/app/components/panel_with_persistent_regions.rb
netzke-basepack-0.8.1 test/basepack_test_app/app/components/panel_with_persistent_regions.rb
netzke-basepack-0.8.0 test/basepack_test_app/app/components/panel_with_persistent_regions.rb