Class: Wice::Columns::ViewColumnJqueryDatepicker

Inherits:
ViewColumn show all
Includes:
CommonDateDatetimeMixin, CommonJsDateDatetimeMixin, JsCalendarHelpers
Defined in:
lib/wice/columns/column_jquery_datepicker.rb

Overview

:nodoc:

Constant Summary

Constants inherited from ViewColumn

Wice::Columns::ViewColumn::FIELDS

Instance Attribute Summary

Attributes inherited from ViewColumn

#cell_rendering_block, #contains_a_text_input, #custom_filter, #filter_control_options, #grid, #main_table, #table_name

Instance Method Summary collapse

Methods included from CommonJsDateDatetimeMixin

#prepare

Methods included from CommonDateDatetimeMixin

#render_filter_internal, #yield_declaration_of_column_filter

Methods included from JsCalendarHelpers

#date_calendar_jquery, #prepare_data_for_calendar

Methods inherited from ViewColumn

#add_css_class, #attribute_name_fully_qualified_for_all_but_main_table_columns, #auto_reloading_input_with_negation_checkbox?, #capable_of_hosting_filter_related_icons?, #config, #controller, #css_class, #detachness, #filter_shown?, #filter_shown_in_main_table?, #form_parameter_name_id_and_query, #fully_qualified_attribute_name, #has_auto_reloading_input?, #has_auto_reloading_select?, #initialize, #render_filter, #render_filter_internal, #table_alias_or_table_name, #yield_declaration, #yield_declaration_of_column_filter

Methods included from ActionView::Helpers::TagHelper

#public_tag_options

Constructor Details

This class inherits a constructor from Wice::Columns::ViewColumn

Instance Method Details

#do_render(params) ⇒ Object

:nodoc:



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/wice/columns/column_jquery_datepicker.rb', line 9

def do_render(params) #:nodoc:
  calendar_data_from = prepare_data_for_calendar(
    initial_date: params[:fr],
    title:      NlMessage['date_selector_tooltip_from'],
    name:       @name1,
    fire_event: auto_reload,
    grid_name:  self.grid.name
  )

  calendar_data_to = prepare_data_for_calendar(
    initial_date: params[:to],
    title:      NlMessage['date_selector_tooltip_to'],
    name:       @name2,
    fire_event: auto_reload,
    grid_name:  self.grid.name
  )

  calendar_data_from.the_other_datepicker_id_to   = calendar_data_to.dom_id
  calendar_data_to.the_other_datepicker_id_from   = calendar_data_from.dom_id

  html1 = date_calendar_jquery calendar_data_from

  html2 = date_calendar_jquery calendar_data_to

  %(<div class="date-filter wg-jquery-datepicker">#{html1}<br/>#{html2}</div>)
end

#has_auto_reloading_calendar?Boolean

:nodoc:

Returns:

  • (Boolean)


36
37
38
# File 'lib/wice/columns/column_jquery_datepicker.rb', line 36

def has_auto_reloading_calendar? #:nodoc:
  auto_reload
end