LnkWcb Framework

LnkWcb  2.5.0

LnkWcb Framework > LnkWcb > LnkWcb.CalendarJquery
Search:
 
Filters

Class LnkWcb.CalendarJquery - extends LnkWcb.Calendar

Calendar implementation that uses jQuery to display a date picker.

Please refer to the base class for a full documentation of how to use a calendar instance.

Constructor

LnkWcb.CalendarJquery ( cfg )
Parameters:
cfg <Object> the initial configuration settings

Properties

rsc - Object

The current resource used.

Properties inherited from LnkWcb.Calendar:

cfg

Methods

addOption

protected void addOption ( selectElem , content )
Add an option to the time component passed as argument (hours or minutes).
Parameters:
selectElem <HTMLElement> the time <select> element
content <String> the specification for the option (as documented for the LnkWcb.util.createMarkupNode method)

beforeShowDayAction

protected Array beforeShowDayAction ( date )
Default listener for the beforeShowDay event of the jQuery date picker.
Parameters:
date <Date> a date instance
Returns: Array
[0] is a boolean indicating whether or not the date is selectable

createDateSelector

protected HTMLElement createDateSelector ( )
Fetch the date container element.
Returns: HTMLElement
the element that contains the date picker

createTimeComponent

protected HTMLElement createTimeComponent ( selectorSel )
Create or fetch a time selector element. Whether hours or minutes is specified by the CSS selector.
Parameters:
selectorSel <String> the CSS selector that locates the time <select> element
Returns: HTMLElement
the created or fetched element

destroyDateSelector

protected void destroyDateSelector ( )
Destroy the date picker.

destroyTimeComponent

protected void destroyTimeComponent ( selectElem )
Destroy the time component passed as argument (hours or minutes).
Parameters:
selectElem <HTMLElement> the time <select> element

getDateTime

private Object getDateTime ( )
Concrete method. Not documented. Reserved for future use.
Returns: Object
the selected date, hours and minutes

getHoursSelectorSel

protected String getHoursSelectorSel ( )
Computes the absolute CSS selector that locates the hours <select> element.
Returns: String
the CSS (absolute) selector

getMinutesSelectorSel

protected String getMinutesSelectorSel ( )
Computes the absolute CSS selector that locates the minutes <select> element.
Returns: String
the CSS (absolute) selector

getWcbDate

String getWcbDate ( )
Get the selected date and time.

The returned value is formated according to the LnkWcb convention, as implemented in the LnkWcb.util.formatDateTime method.

Returns: String
the selected date and time

hideDateSelector

protected void hideDateSelector ( )
Hide the date picker.

hideTimeComponent

protected void hideTimeComponent ( selectElem )
Hide the time component passed as argument (hours or minutes).
Parameters:
selectElem <HTMLElement> the time <select> element

populateEmptyTimeComponent

protected void populateEmptyTimeComponent ( selectElem )
Add a default void option to the time component passed as argument (hours or minutes).
Parameters:
selectElem <HTMLElement> the time <select> element

populateHours

private void populateHours ( )
Populate the hours selector with the available hours for the selected date.

When calling this method, this muse be set to the correct LnkWcb.CalendarJquery instance.


populateMinutes

private void populateMinutes ( hoursMinutes )
Populate the minutes selector with the available minutes for the selected date, and selected hour.

When calling this method, this muse be set to the correct LnkWcb.CalendarJquery instance.

Parameters:
hoursMinutes <Array<Array<Number>>> Optional opened minutes list for the currently selected hour.

renderDateSelector

protected void renderDateSelector ( )
Render the date picker. Displays it to the websurfer.

renderHours

protected String renderHours ( hours )
Format an hour, according to the pat.hour format of the resource.
Parameters:
hours <Number> an hour
Returns: String
the formated hour

renderMinutes

protected String renderMinutes ( minutes )
Format some minutes, according to the pat.minutes format of the resource.
Parameters:
minutes <Number> some minutes
Returns: String
the formated minutes

renderTimeComponent

protected void renderTimeComponent ( selectElem )
Render the time component passed as argument (hours or minutes). Displays it to the websurfer.
Parameters:
selectElem <HTMLElement> the time <select> element

resetTimeComponent

protected void resetTimeComponent ( selectElem )
Reset the time component passed as argument (hours or minutes). Deletes all options in it.
Parameters:
selectElem <HTMLElement> the time <select> element

Events

onCreate

protected static onCreate ( bouton )
Class event. Fires when an LnkWcb.CalendarJquery instance is just created.
Parameters:
bouton <Object> the new instance

Events inherited from LnkWcb.Calendar:

Configuration Attributes

dateContainerRelSel - String

The relative CSS selector that locates the date container element. Relative to the form root as specified by formSel.
Default Value: .lnk-wcb-date

formSel - String

A CSS selector that locates the form container. This container element might not necessarily be a <form> element. It is just a root element in which other elements will be looked for.
Default Value: #LnkWcbForm

hoursSelectorClass - protected String

The CSS class attribute of the created hours <select> element.
Default Value: lnk-wcb-hours

minutesSelectorClass - protected String

The CSS class attribute of the created minutes <select> element.
Default Value: lnk-wcb-minutes

timeContainerRelSel - String

The relative CSS selector that locates the time container element. Relative to the form root as specified by formSel.
Default Value: .lnk-wcb-time

voidChar - String

The text of any selector (hours or minutes) that has no available option.
Default Value: --

Configuration attributes inherited from LnkWcb.Calendar:


Copyright © 2010 Linkeo.com All rights reserved.