Instead of Yii widgets/extensions auto-including jQuery files I want to include these files manually (using my own versions) so that they are always available.
This is how I've configured it in my main.php layout file:
<?php
$cs=Yii::app()->clientScript;
$cs->scriptMap=array(
'jquery.js'=>Yii::app()->request->baseUrl.'/js/jquery-1.4.2.min.js',
'jquery-ui-1.7.2.custom.min.js'=>Yii::app()->request->baseUrl.'/js/jquery-ui-1.7.2.custom.min.js',
);
$cs->registerScriptFile('jquery-ui-1.7.2.custom.min.js');
?>The problem I'm having at the moment is that 'jquery-ui-1.7.2.custom.min.js' is being added last. I am using a widget which registers a script file and this file depends on jQueryUI and therefore needs to be added after 'jquery-ui-1.7.2.custom.min.js'.
So how do I get the two jQuery files to be included together, and all other additional scripts to be added at the end?

Help














