LnkWcb Framework

LnkWcb  2.5.0

LnkWcb Framework > LnkWcb > LnkWcb.CalendarExtJS
Search:
 
Filters

private Class LnkWcb.CalendarExtJS - extends LnkWcb.Calendar

Deprecated: LnkWcb.CalendarJquery is much more lightweight than this ExtJS one. Use that jQuery version instead.
Calendar implementation based on ExtJS (Ext.Datepicker or DateField).

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

Constructor

LnkWcb.CalendarExtJS ( 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)

computeExtDisabledDates

private Arrays computeExtDisabledDates ( that )
Computes the list of disabled dates, formated as strings, following the ExtJS.DatePicker requirements.
Parameters:
that <LnkWcb.CalendarExtJS> the calendar instance
Returns: Arrays
the list of disabled dates

createDateSelector

protected Ext.form.DateField|Ext.DatePicke createDateSelector ( )
Crate or fetch the date selector.
Returns: Ext.form.DateField|Ext.DatePicke
the date selector

createTimeComponent

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

destroyDateSelector

protected void destroyDateSelector ( )
Destroy the date selector.

destroyTimeComponent

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

getDateSelectorId

protected String getDateSelectorId ( )
Computes the (unique) HTML ID for the date selector.
Returns: String
the HTML ID of the date selector

getDateTime

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

getHoursSelectorId

protected String getHoursSelectorId ( )
Computes the (unique) HTML ID for the hours <select> element.
Returns: String
the HTML ID of the hours selector

getMinutesSelectorId

protected String getMinutesSelectorId ( )
Computes the (unique) HTML ID for the minutes <select> element.
Returns: String
the HTML ID of the minutes 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 selector.

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 ( field , date )
Populate the hours selector with the available hours for the selected date. Registered by default as a listener to the select event of the date picker (or the one of the date field).

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

Parameters:
field <Ext.DatePicker|Ext.form.DateField> the date selector
date <Date> the selected date

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.CalendarExtJS instance is just created.
Parameters:
bouton <Object> the new instance

Events inherited from LnkWcb.Calendar:

Configuration Attributes

containerCss - String

A CSS class that will be added to the date container element. This helps a lot in customizing the CSS properties of the date picker.
Default Value: extjs-css

dateContainerElemId - String

An HTML ID that identifies the date container HTML element.
Default Value: lnk-wcb-date

displayType - String

The display type. Can be of FORM_FIELD (uses an Ext.form.DateField) or INLINE (uses an Ext.Datepicker)
Default Value: FORM_FIELD

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

timeContainerElemId - String

An HTML ID that identifies the time container HTML element.
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.