Yii Framework Forum: [ Resolved ] Customize Cjuisliderinput - Yii Framework Forum

Jump to content

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

[ Resolved ] Customize Cjuisliderinput Rate Topic: -----

#1 User is offline   tiffany 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 02-January 13

Posted 02 January 2013 - 10:11 AM

Hello,

I want to change the color of the party started in my slide.

Here is my source code:
<?php 		
			$this->widget('zii.widgets.jui.CJuiSliderInput', array(
			'model'=>$model,
			'attribute'=>'progression',
			'value'=>50,
			'event'=>'change',
			'options'=>array(
				'min'=>0,
				'max'=>100,	
			'animate'=> true,
			'slide'=>'js:function(event,ui){$("#amount").text(ui.value+"%"); }',
			),
			'htmlOptions'=>array(
				'style'=>'width:220px; float:left;height:10px; margin-right: 10px'
			),
		));
		?>


My value is 50% => I want to have the 50% portion began in gray and the remainder in white.

Could you suggest me something?

Thank you in advance.
0

#2 User is offline   grandoom 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 11-July 12

Posted 02 January 2013 - 06:59 PM

hi,
i think you should Tweak the css


add this in widget array
'themeUrl' => Yii::app()->baseUrl . '/css/jui',
'theme' => 'softark',
'cssFile' => 'jquery-ui-1.9.2.custom.css',

then modify the CCS

hope this help you!
0

#3 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 06 January 2013 - 09:49 AM

Moved to General Discussion for Yii 1.1.x

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#4 User is offline   tiffany 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 02-January 13

Posted 07 January 2013 - 05:27 AM

Hello,

I find a solution:

I have use range:min in the options. But "CJuiSliderInput" don't suport range: min or max.


So i extend the class CJuiSliderInput and i followed advices in this link:

http://www.yiiframew...ge__pid__168004

Thx.
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