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

#capable_of_hosting_filter_related_icons?, #config, #controller, #detachness, #filter_shown?, #filter_shown_in_main_table?, #form_parameter_name_id_and_query, #has_auto_reloading_calendar?, #has_auto_reloading_select?, #initialize, #render_filter, #yield_javascript

Constructor Details

This class inherits a constructor from Wice::ViewColumn

Instance Attribute Details

#auto_reloading_input_with_negation_checkboxObject

@@handled_type = self



414
415
416
# File 'lib/view_columns.rb', line 414

def auto_reloading_input_with_negation_checkbox
  @auto_reloading_input_with_negation_checkbox
end

#negationObject

@@handled_type = self



414
415
416
# File 'lib/view_columns.rb', line 414

def negation
  @negation
end

Instance Method Details

#auto_reloading_input_with_negation_checkbox?Boolean

:nodoc:

Returns:

  • (Boolean)


458
459
460
# File 'lib/view_columns.rb', line 458

def auto_reloading_input_with_negation_checkbox? #:nodoc:
  self.auto_reloading_input_with_negation_checkbox
end

#has_auto_reloading_input?Boolean

:nodoc:

Returns:

  • (Boolean)


454
455
456
# File 'lib/view_columns.rb', line 454

def has_auto_reloading_input? #:nodoc:
  auto_reload
end

#render_filter_internal(params) ⇒ Object

:nodoc:



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/view_columns.rb', line 416

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::Defaults::NEGATION_CHECKBOX_LABEL.blank?
        ::Wice::Defaults::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:



444
445
446
447
448
449
450
451
452
# File 'lib/view_columns.rb', line 444

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