Yii Framework Forum: Not Getting Star Image In Cstarrating Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Not Getting Star Image In Cstarrating Extension Rate Topic: -----

#1 User is offline   rohitashv 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 03-January 13

Posted 07 June 2013 - 08:06 AM

Hey guys

I am currenly working on a project, in which I need to include CStarRating.

But When I am using it as follow :

<?php

$this->widget('CStarRating',array(
'model'=>$model,
'attribute'=>'rating',
'minRating'=>1,
'maxRating'=>5,
'starCount'=>5,
'readOnly'=>false,
));
?>


I am getting the radio button in the form, but I am unable to show the stars, I can only see the radio buttons, In console I am getting no error


Please help me, how can I come out of this bug ???

Attached File(s)

  • Attached File  1.jpg (248.11K)
    Number of downloads: 23

0

#2 User is offline   jneto 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 19-November 12
  • Location:Portugal

Posted 07 June 2013 - 10:08 PM

Hello. i had the same problem before.


- test it using the basic example

            $this->widget('CStarRating',array(
                'name'=>'rating_1 ,
                'value'=> 4,
                'readOnly'=>true,
            ));

            $this->widget('CStarRating',array(
                'name'=>'rating_2 ,
                'value'=> 4,
            ));




- make sure that the name/id is unique on the page.


- if you get the page using ajax, you have run some js code, after load like
  'afterAjaxUpdate'=>'function(id,data) {
        $.fn.rating.options.readOnly = true;
        $("span[id^=\'rating\'] > input").rating();
        }',

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users