Class: Wice::ViewColumnString

Inherits:
ViewColumn show all
Defined in:
lib/view_columns.rb

Overview

:nodoc:

Constant Summary

Constants inherited from ViewColumn

Wice::ViewColumn::FIELDS

Instance Attribute Summary collapse

Attributes inherited from ViewColumn

#cell_rendering_block, #contains_a_text_input, #css_class, #custom_filter, #grid, #main_table, #model_class, #table_name

Instance Method Summary collapse

Methods inherited from ViewColumn

#attribute_name_fully_qualified_for_all_but_main_table_columns, #capable_of_hosting_filter_related_icons?, #detachness, #filter_shown?, #filter_shown_in_main_table?, #form_parameter_name_id_and_query, #fully_qualified_attribute_name, #has_auto_reloading_calendar?, #has_auto_reloading_select?, #initialize, #render_filter, #table_alias_or_table_name, #yield_javascript

Methods included from ActionView::Helpers::TagHelper

#tag_options

Constructor Details

This class inherits a constructor from Wice::ViewColumn

Instance Attribute Details

#auto_reloading_input_with_negation_checkboxObject

Returns the value of attribute auto_reloading_input_with_negation_checkbox


429
430
431
# File 'lib/view_columns.rb', line 429

def auto_reloading_input_with_negation_checkbox
  @auto_reloading_input_with_negation_checkbox
end

#negationObject

Returns the value of attribute negation


429
430
431
# File 'lib/view_columns.rb', line 429

def negation
  @negation
end

Instance Method Details

#auto_reloading_input_with_negation_checkbox?Boolean

:nodoc:

Returns:

  • (Boolean)

473
474
475
# File 'lib/view_columns.rb', line 473

def auto_reloading_input_with_negation_checkbox? #:nodoc:
  self.auto_reloading_input_with_negation_checkbox
end

#has_auto_reloading_input?Boolean

:nodoc:

Returns:

  • (Boolean)

469
470
471
# File 'lib/view_columns.rb', line 469

def has_auto_reloading_input? #:nodoc:
  auto_reload
end

#render_filter_internal(params) ⇒ Object

:nodoc:


431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/view_columns.rb', line 431

def render_filter_internal(params) #:nodoc:
  @contains_a_text_input = true
  css_class = auto_reload ? 'auto_reload' : nil

  if negation
    self.auto_reloading_input_with_negation_checkbox = true if auto_reload

    @query, _, parameter_name, @dom_id = form_parameter_name_id_and_query(:v => '')
    @query2, _, parameter_name2, @dom_id2 = form_parameter_name_id_and_query(:n => '')

    '<div class="text_filter_container">' +
      text_field_tag(parameter_name, params[:v], :size => 8, :id => @dom_id, :class => css_class) +
      if defined?(Wice::Defaults::NEGATION_CHECKBOX_LABEL) && ! Wice::ConfigurationProvider.value_for(:NEGATION_CHECKBOX_LABEL).blank?
        Wice::ConfigurationProvider.value_for(:NEGATION_CHECKBOX_LABEL)
      else
        ''
      end +
      check_box_tag(parameter_name2, '1', (params[:n] == '1'),
        :id => @dom_id2,
        :title => WiceGridNlMessageProvider.get_message(:NEGATION_CHECKBOX_TITLE),
        :class => 'negation_checkbox') +
      '</div>'
  else
    @query, _, parameter_name, @dom_id = form_parameter_name_id_and_query('')
    text_field_tag(parameter_name, (params.blank? ? '' : params), :size => 8, :id => @dom_id, :class => css_class)
  end
end

#yield_declaration_of_column_filterObject

:nodoc:


459
460
461
462
463
464
465
466
467
# File 'lib/view_columns.rb', line 459

def yield_declaration_of_column_filter #:nodoc:
  if negation
    %$templates : ['#{@query}', '#{@query2}'],
        ids : ['#{@dom_id}', '#{@dom_id2}'] $
  else
    %$templates : ['#{@query}'],
        ids : ['#{@dom_id}'] $
  end
end