Sha256: 115544f8dc5b5367f10940ee0b50bfb86c821513d0fb87fcc0d890f7682255cf

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

module Netzke
  module Basepack
    class SearchWindow < Netzke::Window::Base

      action :search
      action :cancel

      client_class do |c|
        c.width = "50%"
        c.auto_height = true
        c.close_action = "hide"
        c.modal = true
        c.init_component = l(<<-JS)
          function(){
            this.callParent();

            this.on('show', function(){
              this.closeRes = 'cancel';
            });
          }
        JS

        c.get_query = l(<<-JS)
          function(){
            return this.items.first().getQuery();
          }
        JS

        c.netzke_on_search = l(<<-JS)
          function(){
            this.closeRes = 'search';
            this.hide();
          }
        JS

        c.netzke_on_cancel = l(<<-JS)
          function(){
            this.hide();
          }
        JS
      end

      def configure(c)
        super
        c.items = [:query_builder]
        c.title = I18n.t('netzke.basepack.search_window.title')
        c.persistence = false
        c.prevent_header = true
        c.buttons = [:search, :cancel]
      end

      component :query_builder do |c|
        c.klass = QueryBuilder
        c.model = config[:model]
        c.fields = config[:fields]
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
netzke-basepack-6.5.0.0 lib/netzke/basepack/search_window.rb
netzke-basepack-6.5.0.0.rc2 lib/netzke/basepack/search_window.rb
netzke-basepack-6.5.0.0.rc1 lib/netzke/basepack/search_window.rb
netzke-basepack-1.0.1.0 lib/netzke/basepack/search_window.rb
netzke-basepack-1.0.0.1 lib/netzke/basepack/search_window.rb
netzke-basepack-1.0.0.0 lib/netzke/basepack/search_window.rb
netzke-basepack-1.0.0.0.pre3 lib/netzke/basepack/search_window.rb