# HG changeset patch # User Aurelien Campeas # Date 1233332107 -3600 # Node ID 73aab1d2a27aca47ef7255cfa39fca5db2dbc22a # Parent 890e8d016d12ce4d2458bfa46aeadc8c447abe66 [tabs] fix the no-eid case, remove unused code diff -r 890e8d016d12 -r 73aab1d2a27a web/views/tabs.py --- a/web/views/tabs.py Fri Jan 30 17:01:15 2009 +0100 +++ b/web/views/tabs.py Fri Jan 30 17:15:07 2009 +0100 @@ -18,12 +18,6 @@ from cubicweb.web.views.basecontrollers import JSonController -# the prepend hack only work for 1-level lazy views -# a whole lot different thing must be done otherwise -@monkeypatch(HTMLHead) -def prepend_post_inline_script(self, content): - self.post_inlined_scripts.insert(0, content) - class LazyViewMixin(object): """provides two convenience methods for the tab machinery @@ -38,11 +32,12 @@ """ w = w or self.w self.req.add_js('cubicweb.lazy.js') - eid = eid or '' + urlparams = {'vid' : vid, 'mode' : 'html'} + if eid: + urlparams['rql'] = rql_for_eid(eid) # w(u'
' % (vid, vid, eid)) w(u'
' % ( - vid, html_escape(self.build_url('json', rql=rql_for_eid(eid), vid=vid, - mode='html')))) + vid, html_escape(self.build_url('json', **urlparams)))) if show_spinbox: w(u'%s' % (vid, self.req._('loading')))