You can clone with
HTTPS or Subversion.
I have a jquery conflict
I show a form in a jui dialog with a captcha.
When I render the form partial I have not the needed script for the refresh button.
When I now process the output ($html=$this->processOutput($html) I have the needed script from the captcha but also a second jquery script that make problems.
At the moment I do it so for not getting a second jquery file:
$html=$this->renderPartial('_form_dialog_request', array('model'=>$model), true);
The core script "jquery" is automatically registered because the CCaptcha js script is POS_READY.
Check this one: http://www.yiiframework.com/extension/nlsclientscript/
Thank you for your answer.
I try nlsClientScript extension and it worked well if you have registered jquery.js on the site.
But in my project I have many static pages with different routes where jquery.js is not registered.
In this case I get an js errror because nls register a script like Jquery(.....) and there jquery is not defined.
Is there a possibility with excludePatterns to prevent this for all my static routes (e.g. pages/impressum, blog/read, etc.
P.S. I have read your book "Yii Development Cookbook" that really helped me get started with Yii.
There's no reason to exclude jQuery since it will be cached at the first request (if your server is configured properly).
Yes this is my problem. I do not register jquery on all my routes only on this I really need it.
Do you think I should register jquery for all my routes in my main layout?
It will not hurt because of browser cache.
btw., next time it's better to ask for help at forums. This issue tracker is for bugs/feature requests.
first request : 1) load jquery , 2 ) load jquery.yiigridview
in this case $.fn.yiiGridView undefined , because jquery $ object was reset.
or you can use : Yii::app()->getClientScript()->scriptMap = array("jquery.js"=>false); ?