How can I use the 'Opening time'-timepicker of Watchman? Where can I find the code?
Hi pokemon,
The images, javascript and css are in the administrator/components/com_chronocontact/assets/timespinner folder.
The code is more or less this
Bob
The images, javascript and css are in the administrator/components/com_chronocontact/assets/timespinner folder.
The code is more or less this
<input type='text' name='time' id='time' value='' />
<?php
if ( !$mainframe->isSite() ) { return; }
$start = 0;
if ( $selected ) {
$time_array = explode(':', $selected);
$start = $time_array[0] * 60 + $time_array[1];
}
$script = "
window.addEvent('domready', function() {
var spinner1 = new TimeSpinner($('time'), {
$config
},
$start );
});
";
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration($script);
$doc->addScript(JURI::base().'administrator/components/com_chronocontact/assets/timespinner/timespinner.js');
$doc->addStylesheet(JURI::base().'administrator/components/com_chronocontact/assets/timespinner/timespinner.css');
?>
This has been put together from various bits and pieces and probably needs debugging. The Timespinner docs and code are here.Bob
This topic is locked and no more replies can be posted.