# HG changeset patch # User Aurelien Campeas # Date 1316624449 -7200 # Node ID 93d9a9c29bfb9a9da1527dd2d04c3e214f6f1082 # Parent be4a3e97090dbd5166007819b9642e041df37e24 [tabs] fix clic on tab that does nothing (closes #1942750) (there was an area around the text that would trigger the tab switch but not load the tab content) diff -r be4a3e97090d -r 93d9a9c29bfb web/views/tabs.py --- a/web/views/tabs.py Wed Sep 21 18:35:45 2011 +0200 +++ b/web/views/tabs.py Wed Sep 21 19:00:49 2011 +0200 @@ -140,9 +140,7 @@ for i, (tabid, domid, tabkwargs) in enumerate(tabs): w(u'
  • ') w(u'' % domid) - w(u'' % xml_escape(unicode(uilib.js.setTab(domid, self.cookie_name)))) w(tabkwargs.pop('label', self._cw._(tabid))) - w(u'') w(u'') w(u'
  • ') if domid == active_tab: @@ -160,7 +158,12 @@ # because the callback binding needs to be done before # XXX make work history: true self._cw.add_onload(u""" - jQuery('#entity-tabs-%(eeid)s').tabs( { selected: %(tabindex)s }); + jQuery('#entity-tabs-%(eeid)s').tabs( + { selected: %(tabindex)s, + select: function(event, ui) { + setTab(ui.panel.id, '%(cookiename)s'); + } + }); setTab('%(domid)s', '%(cookiename)s'); """ % {'tabindex' : active_tab_idx, 'domid' : active_tab,