web/views/tabs.py
changeset 2383 96780c1e0c53
parent 2381 caad2367d940
child 2386 b246d5cee44e
equal deleted inserted replaced
2381:caad2367d940 2383:96780c1e0c53
   132                 self.lazyview(tab, static=True)
   132                 self.lazyview(tab, static=True)
   133             w(u'</div>')
   133             w(u'</div>')
   134         w(u'</div>')
   134         w(u'</div>')
   135         # call the set_tab() JS function *after* each tab is generated
   135         # call the set_tab() JS function *after* each tab is generated
   136         # because the callback binding needs to be done before
   136         # because the callback binding needs to be done before
       
   137         # XXX make work history: true
   137         self.req.add_onload(u'''
   138         self.req.add_onload(u'''
   138     jQuery(function() {
   139     jQuery(function() {
   139       jQuery("#tabs-%(eeid)s").tabs("#panes-%(eeid)s > div", {initialIndex: %(tabindex)s});
   140       jQuery("#tabs-%(eeid)s").tabs("#panes-%(eeid)s > div", {initialIndex: %(tabindex)s});
   140       set_tab('%(vid)s', '%(cookiename)s');
   141       set_tab('%(vid)s', '%(cookiename)s');
   141     });''' % {'eeid' : entity.eid,
   142     });''' % {'eeid' : entity.eid,