Yii Framework Forum: Listview Ajaxupdate And Bootstrap Dropdown - Yii Framework Forum

Jump to content

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

Listview Ajaxupdate And Bootstrap Dropdown Rate Topic: -----

#1 User is offline   ema 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 11-June 11

Posted 23 September 2012 - 04:48 AM

Note: this is not really a yii bug, more a Bootstrap bug, but I think it's hard to expect that bootstrap will change. I wanted to report this FYI.

Boostrap dropdown intercepts a click event on 'html' and stops the event.
I recently asked on stackoverflow about this, but with no success:
http://stackoverflow...-events-on-html

Because of this, the following procedure won't work:
1. configure a CListView with updateSelector=>'a.inDropdow' where a.inDropdown is a link within a bootstrap dropdown
2. click on the link a.inDropdown within the drop down
3. expected result: ajaxUpdate, actual result: redirect to another page

Solution: bind the click event on 'body', i.e. in jquery.yiilistview.js:35
--- $(document).on('click.yiiListView', settings.updateSelector,function(){
+++ $('body').on('click.yiiListView', settings.updateSelector,function(){

Best, E.
0

#2 User is offline   yiqing95 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 591
  • Joined: 27-December 10
  • Location:china

Posted 23 September 2012 - 09:56 AM

why not post it to the bootstrap topic bootstrap discussion
:lol:
0

#3 User is offline   jacmoe 

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

Posted 23 September 2012 - 01:12 PM

/* Moved from Bugs to Extensions ... */
"Less noise - more signal"
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