Class: Wice::ViewColumnDate
- Inherits:
-
ViewColumnDatetime
- Object
- ViewColumn
- ViewColumnDatetime
- Wice::ViewColumnDate
- Defined in:
- lib/view_columns.rb
Overview
:nodoc:
Constant Summary collapse
- @@datetime_chunk_names =
%w(year month day)
Constants inherited from ViewColumn
Instance Attribute Summary
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
-
#render_calendar_filter_internal(params) ⇒ Object
:nodoc:.
-
#render_filter_internal(params) ⇒ Object
:nodoc:.
-
#render_standard_filter_internal(params) ⇒ Object
:nodoc:.
Methods inherited from ViewColumnDatetime
#has_auto_reloading_calendar?, #name_and_id_from_options, #prepare_for_calendar_filter, #prepare_for_standard_filter, #yield_declaration_of_column_filter
Methods included from JsCalendarHelpers
#date_calendar_jquery, #date_calendar_prototype, #datetime_calendar_prototype
Methods inherited from ViewColumn
#auto_reloading_input_with_negation_checkbox?, #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_input?, #has_auto_reloading_select?, #initialize, #render_filter, #yield_declaration_of_column_filter, #yield_javascript
Constructor Details
This class inherits a constructor from Wice::ViewColumn
Instance Method Details
#render_calendar_filter_internal(params) ⇒ Object
:nodoc:
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/view_columns.rb', line 380 def render_calendar_filter_internal(params) #:nodoc: calendar_helper_method = if Wice::Defaults::JS_FRAMEWORK == :prototype :date_calendar_prototype else :date_calendar_jquery end html1, js1 = send(calendar_helper_method, params[:fr], @view, {:include_blank => true, :prefix => @name1, :fire_event => auto_reload}, :title => WiceGridNlMessageProvider.(:DATE_SELECTOR_TOOLTIP_FROM)) html2, js2 = send(calendar_helper_method, params[:to], @view, {:include_blank => true, :prefix => @name2, :fire_event => auto_reload}, :title => WiceGridNlMessageProvider.(:DATE_SELECTOR_TOOLTIP_TO)) [%!<div class="date-filter">#{html1}<br/>#{html2}</div>!, js1 + js2] end |
#render_filter_internal(params) ⇒ Object
:nodoc:
398 399 400 401 402 403 404 405 406 407 |
# File 'lib/view_columns.rb', line 398 def render_filter_internal(params) #:nodoc: if helper_style == :standard prepare_for_standard_filter render_standard_filter_internal(params) else prepare_for_calendar_filter render_calendar_filter_internal(params) end end |
#render_standard_filter_internal(params) ⇒ Object
:nodoc:
373 374 375 376 377 378 |
# File 'lib/view_columns.rb', line 373 def render_standard_filter_internal(params) #:nodoc: '<div class="date-filter">' + select_date(params[:fr], {:include_blank => true, :prefix => @name1, :id => @dom_id}) + '<br/>' + select_date(params[:to], {:include_blank => true, :prefix => @name2, :id => @dom_id2}) + '</div>' end |