Yii Framework Forum: echosen - Yii Framework Forum

Jump to content

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

echosen display the 'X' to clear the field Rate Topic: -----

#1 User is offline   Bruno Piaui 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 18-October 10

Posted 03 January 2012 - 10:54 AM

Hello,
I'd like to know how to display the 'X' in the dropdown to clear the field?
I saw the http://harvesthq.github.com/chosen/ that you can set the attribute 'allow_single_deselect: true' but can not reproduce in the extension.
in the attached image is an example.

Attached File  imagem.png (1.87K)
Number of downloads: 29

Thanks
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 03 January 2012 - 11:11 AM

In what way does this relate to a Yii extension?
Or Yii in general?
"Less noise - more signal"
0

#3 User is offline   Bruno Piaui 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 18-October 10

Posted 03 January 2012 - 11:18 AM

View Postjacmoe, on 03 January 2012 - 11:11 AM, said:

In what way does this relate to a Yii extension?
Or Yii in general?


has an extension that uses this component: http://www.yiiframew...tension/echosen
1

#4 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 03 January 2012 - 12:29 PM

Thanks for the link - and the clarification. :)
"Less noise - more signal"
0

#5 User is offline   Bruno Piaui 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 18-October 10

Posted 08 January 2012 - 11:18 AM

View PostBruno Piaui, on 03 January 2012 - 10:54 AM, said:

Hello,
I'd like to know how to display the 'X' in the dropdown to clear the field?
I saw the http://harvesthq.github.com/chosen/ that you can set the attribute 'allow_single_deselect: true' but can not reproduce in the extension.
in the attached image is an example.

Attachment imagem.png

Thanks


anyone??
0

#6 User is offline   glazedates 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 26-November 12

Posted 27 November 2012 - 05:25 AM

I've also been looking for the solution to the allow_single_deselect problem. This might help. :)

To display the 'X' in the drop down, use
'class' => 'chzn-select-deselect'
(instead of
'class' => 'chzn-select'
), and add the following JavaScript:
$(".chzn-select-deselect").chosen({allow_single_deselect:true});
.
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