Sha256: 4ab97b8789d277b744b5b29594eba96f4a036b39c51c5a2bc29eb6883fff0485

Contents?: true

Size: 1.59 KB

Versions: 3

Compression:

Stored size: 1.59 KB

Contents

# External dependencies
require 'netzke-core'
require 'searchlogic'

require 'netzke/ar_ext'

# Default boot config
Netzke::Base.config.merge!({
  :grid_panel => {:filters => true}
}.recursive_merge(Object.const_defined?(:NETZKE_BOOT_CONFIG) ? Object.const_get(:NETZKE_BOOT_CONFIG) : {}))

%w{ models }.each do |dir|
  path = File.join(File.dirname(__FILE__), 'app', dir)
  $LOAD_PATH << path
  ActiveSupport::Dependencies.load_paths << path
  ActiveSupport::Dependencies.load_once_paths.delete(path)
end

# Include the javascript
Netzke::Base.config[:javascripts] << "#{File.dirname(__FILE__)}/../javascripts/basepack.js"
Netzke::Base.config[:javascripts] << "#{File.dirname(__FILE__)}/../javascripts/check_column.js"

extjs_dir = "#{RAILS_ROOT}/public/extjs"

# Filters in GridPanel
if Netzke::Base.config[:grid_panel][:filters]
  Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/menu/EditableItem.js"
  Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/menu/RangeMenu.js"
  Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/grid/GridFilters.js"
  %w{Boolean Date List Numeric String}.unshift("").each do |f|
    Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/grid/filter/#{f}Filter.js"
  end
  Netzke::Base.config[:javascripts] << "#{File.dirname(__FILE__)}/../javascripts/filters.js"
end

# Make this plugin reloadable for easier development
ActiveSupport::Dependencies.load_once_paths.delete(File.join(File.dirname(__FILE__)))

# Include CSS
Netzke::Base.config[:css] << "#{File.dirname(__FILE__)}/../css/basepack.css"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netzke-basepack-0.3.3 lib/netzke-basepack.rb
netzke-basepack-0.3.3.1 lib/netzke-basepack.rb
netzke-basepack-0.3.4 lib/netzke-basepack.rb