Class: Netzke::Basepack::QueryBuilder

Inherits:
Netzke::Base
  • Object
show all
Defined in:
lib/netzke/basepack/query_builder.rb

Overview

Search query builder used in Grid's advanced search. Based on Ext.tab.Panel. A new tab is created for each OR condition. Each tab contains an instance of SearchPanel which is used to build AND conditions.

Instance Method Summary collapse

Instance Method Details

#configure(c) ⇒ Object



40
41
42
43
# File 'lib/netzke/basepack/query_builder.rb', line 40

def configure(c)
  super
  c.bbar = (c.bbar || []) + [:clear_all, :reset, "->", I18n.t('netzke.basepack.query_builder.presets'), :preset_selector, :save_preset, :delete_preset ]
end

#configure_client(c) ⇒ Object



45
46
47
48
# File 'lib/netzke/basepack/query_builder.rb', line 45

def configure_client(c)
  super
  c.preset_store = state[:presets].blank? ? [[[], ""]] : state[:presets].map{ |s| [s["query"], s["name"]] }
end