Hi all, first of all - thanks for this great framework.
And now the problem: i can't register jquery plugin.
here is my code
Yii::app()->clientScript->registerCoreScript('jquery');
Yii::app()->clientScript->registerCoreScript('jquery.rating');
on site i get
<script type="text/javascript" src="/assets/9e8bbef9/jquery.min.js"></script>
but no jquery.rating script.
the file is in web/js/source
qiang
(Qiang Xue)
2
Use 'rating' instead of 'jquery.rating'.
The list of core js files can be found in /web/js/packages.php
thanks! and what about jquery.rating css file? how to register?
qiang
(Qiang Xue)
4
You use 'rating' to refer to the whole rating plugin package which includes jquery.rating.js and its dependencies.
sry, but i don't understand you. there is no css dependencies in packages.php
qiang
(Qiang Xue)
6
Sorry I didn't read your message carefully.
You need to call CStarRating::registerCssFile() if you are not using CStarRating but would still want its CSS file registered.
If you are using CStarRating widget, both js and css files will be automatically registered by the widget. You don't need to call these methods.