Sha256: df82164d5db80e5bfb386b6ce80f27ac7d79af994df597efed05b44de8c26bbe

Contents?: true

Size: 707 Bytes

Versions: 7

Compression:

Stored size: 707 Bytes

Contents

class BookGridWithCustomColumns < Netzke::Basepack::GridPanel
  js_property :title, "Books"

  model "Book"

  column :author__first_name, :renderer => :my_renderer
  column :author__last_name, :renderer => :uppercase
  column :author__name, :flex => 1, :text => "Author"
  column :title, :flex => 1
  column :digitized
  column :rating,
    :editor => {
      :trigger_action => :all,
      :xtype => :combo,
      :store => [[1, "Good"], [2, "Average"], [3, "Poor"]]
    },
    :renderer => "function(v){return ['', 'Good', 'Average', 'Poor'][v];}"
  column :exemplars
  column :updated_at

  js_method :my_renderer, <<-JS
    function(value){
      return value ? "*" + value + "*" : "";
    }
  JS

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
netzke-basepack-0.7.7 test/basepack_test_app/app/components/book_grid_with_custom_columns.rb
netzke-basepack-zh-0.7.6 test/basepack_test_app/app/components/book_grid_with_custom_columns.rb
netzke-basepack-0.7.6 test/basepack_test_app/app/components/book_grid_with_custom_columns.rb
netzke-basepack-0.7.5 test/basepack_test_app/app/components/book_grid_with_custom_columns.rb
netzke-basepack-0.7.4 test/basepack_test_app/app/components/book_grid_with_custom_columns.rb
netzke-basepack-0.7.3 test/basepack_test_app/app/components/book_grid_with_custom_columns.rb
netzke-basepack-0.7.2 test/basepack_test_app/app/components/book_grid_with_custom_columns.rb