Optimization Module

Ask your feature Requests about CKforms component

Optimization Module

Postby matthieu » Fri Apr 02, 2010 3:46 pm

Congratulations for your work !

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
matthieu
 
Posts: 1
Joined: Fri Apr 02, 2010 3:31 pm
Top

Re: Optimization Module

Postby fdam30 » Wed Jun 30, 2010 11:52 am

Tanks matthieu,
but in which file I have to replace the code?
Sorry for the question but I'm e new jommla user.


matthieu wrote:Congratulations for your work !

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
fdam30
 
Posts: 1
Joined: Wed Jun 30, 2010 11:49 am
Top


Return to Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests