Public Member Functions | |
JSCalendar () | |
& | getInstance () |
render ($value, $name= '', $calImg= '', $helpImg= '') | |
renderImages ($calImg= '', $helpImg= '') | |
setConfigOption ($option, $value, $nonString=false) | |
setInputField ($field) | |
getInputField () | |
setLanguage ($lang='') | |
setCSS ($calendarCSS= 'aqua') | |
setNLP ($mode) | |
setDateFormat ($time=false) | |
getConfigJS () | |
getMainJS () | |
languageCheck ($lang) | |
Public Attributes | |
$config = array() | |
$jsSent = false | |
$lang = null |
Definition at line 30 of file class.jscalendar.php.
JSCalendar.JSCalendar | ( | ) |
Constructor
the problem with nlp and irre needs to be fixed
Definition at line 49 of file class.jscalendar.php.
References setConfigOption(), setCSS(), setDateFormat(), setLanguage(), and setNLP().
Referenced by getInstance().
& JSCalendar.getInstance | ( | ) |
Creates a singleton instance of JSCalendar. Its important to use only this funcion than a direct initialization of the class! You can use this method via a static call.
Definition at line 74 of file class.jscalendar.php.
References JSCalendar().
Referenced by tx_date2cal_wizard.renderWizard().
JSCalendar.render | ( | $ | value, | |
$ | name = '' , |
|||
$ | calImg = '' , |
|||
$ | helpImg = '' | |||
) |
Renders an whole calendar input element. The name and id of the checkbox will be prefixed with _cb. The id of the input field will be prefixed with _hr. If you haven't defined the input field then it will be named "date". Please define the input field if you have multiple calendars on the page.
string | $value default value of the input field element | |
string | $name name (default is inputField coniguration setting) of the input and checkbox field (prefixed with _cb) | |
string | $calImg calendar image (optional) | |
string | $helpImg help image (optional) |
Definition at line 94 of file class.jscalendar.php.
References renderImages(), and setInputField().
JSCalendar.renderImages | ( | $ | calImg = '' , |
|
$ | helpImg = '' | |||
) |
Renders the image buttons of the calendar (= trigger) and the help button. Both images values can fallback to the default ones if you don't want to define them.
string | $calImg calendar image (optional) | |
string | $helpImg help image (optional) |
Definition at line 125 of file class.jscalendar.php.
References getConfigJS().
Referenced by render().
JSCalendar.setConfigOption | ( | $ | option, | |
$ | value, | |||
$ | nonString = false | |||
) |
Sets a config option of the calendar.
Official documentation of the JSCalendar options: http://www.dynarch.com/demos/jscalendar/doc/html/reference.html#node_sec_2.3
string | $option name of the option | |
string | $value value of the option | |
bool | $nonString set this option if you want to set a boolean or integer |
Definition at line 166 of file class.jscalendar.php.
Referenced by JSCalendar(), setDateFormat(), and setInputField().
JSCalendar.setInputField | ( | $ | field | ) |
Sets the input field of the calendar. You doesn't need to set an input id if you want an automatic generation of the input field via the render function. Please don't try this for multiple instances on the same page!
string | $field special input field (will be prefixed with _hr) |
Definition at line 178 of file class.jscalendar.php.
References setConfigOption().
Referenced by render().
JSCalendar.getInputField | ( | ) |
Returns the input field.
Definition at line 189 of file class.jscalendar.php.
JSCalendar.setLanguage | ( | $ | lang = '' |
) |
Sets the language of the calendar. Includes availability checks and fallback modes for frontend and backend.
string | $lang language (let it empty for automatic detection) |
Definition at line 200 of file class.jscalendar.php.
References $lang, and languageCheck().
Referenced by JSCalendar().
JSCalendar.setCSS | ( | $ | calendarCSS = 'aqua' |
) |
Sets the calendar css. Includes an availability check with a fallback to the aqua theme.
string | $calendarCSS calendar css file (default: aqua) |
Definition at line 219 of file class.jscalendar.php.
Referenced by JSCalendar().
JSCalendar.setNLP | ( | $ | mode | ) |
Sets the natural language parser mode. Additionaly it checks the TYPO3 version, because the feature can only be used with TYPO3 >= 4.1.
bool | $mode calendar with natural language parser mode (true) |
Definition at line 232 of file class.jscalendar.php.
Referenced by JSCalendar().
JSCalendar.setDateFormat | ( | $ | time = false |
) |
Sets the date format of the calendar. You can't influence the format at the moment. It will be automatically created to the value "%d-%m-%Y" or "%m-%d-%y" with the US setting of TYPO3.
bool | $time set this option if you want to define the time |
Definition at line 246 of file class.jscalendar.php.
References setConfigOption().
Referenced by JSCalendar().
JSCalendar.getConfigJS | ( | ) |
Returns the javascript configuration code for a single calendar instance.
Definition at line 262 of file class.jscalendar.php.
References $config.
Referenced by renderImages().
JSCalendar.getMainJS | ( | ) |
Returns the shared javascript code for all calendar instances. The function can only be called once!
Definition at line 301 of file class.jscalendar.php.
JSCalendar.languageCheck | ( | $ | lang | ) |
Checks the availability of a language file. The functions attends utf8 compatibility in the backend.
Note that the language code would be transformed into an iso code if possible. If no translation file matches than the function returns english as fallback.
string | $lang language code |
Definition at line 345 of file class.jscalendar.php.
References $lang.
Referenced by setLanguage().
JSCalendar.$config = array() |
array configuration
Definition at line 33 of file class.jscalendar.php.
Referenced by getConfigJS().
JSCalendar.$jsSent = false |
bool prevents the object to generate the initialization javascript twice
Definition at line 36 of file class.jscalendar.php.
JSCalendar.$lang = null |
object holds the language object
Definition at line 39 of file class.jscalendar.php.
Referenced by languageCheck(), and setLanguage().