I've noticed some improvements to the module
Replace in the default view :
- Code: Select all
<link rel="stylesheet" href="<?php echo JURI::root(true); ?>/components/com_ckforms/css/ckforms.css" type="text/css" />
<link rel="stylesheet" href="<?php echo JURI::root(true); ?>/components/com_ckforms/css/calendar.css" type="text/css" />
<link rel="stylesheet" href="<?php echo JURI::root(true); ?>/components/com_ckforms/css/tips.css" type="text/css" />
<link rel="stylesheet" href="<?php echo JURI::root(true); ?>/components/com_ckforms/js/theme/classic/formcheck.css" type="text/css" />
<link rel="stylesheet" href="<?php echo JURI::root(true); ?>/modules/mod_ckforms/css/ckforms.css" type="text/css" />
<script type="text/javascript" src="<?php echo JURI::root(true); ?>/components/com_ckforms/js/calendar.js"></script>
<script type="text/javascript" src="<?php echo JURI::root(true); ?>/components/com_ckforms/js/ui.datepicker.packed.js"></script>
<script type="text/javascript" src="<?php echo JURI::root(true); ?>/components/com_ckforms/js/formcheck.js"></script>
By :
- Code: Select all
//load mootools
JHTML::_( 'behavior.mootools' );
$doc = &JFactory::getDocument();
$doc->addStyleSheet( JURI::Root(true) . '/components/com_ckforms/css/ckforms.css' );
$doc->addStyleSheet( JURI::Root(true) . '/components/com_ckforms/css/calendar.css' );
$doc->addStyleSheet( JURI::Root(true) . '/components/com_ckforms/css/tips.css' );
$doc->addStyleSheet( JURI::Root(true) . '/components/com_ckforms/css/formcheck.css' );
$doc->addStyleSheet( JURI::Root(true) . /'modules/mod_ckforms/css/ckforms.css' );
$doc->addScript(JURI::Root(true) . '/components/com_ckforms/js/calendar.js');
$doc->addScript(JURI::Root(true) . '/components/com_ckforms/js/formcheck.js');
The code is cleaner and it does not load 2 times the mootools library and delete ui.datepicker.packed.js