--- a/web/htmlwidgets.py Tue Dec 22 13:13:53 2009 +0100
+++ b/web/htmlwidgets.py Tue Dec 22 13:14:34 2009 +0100
@@ -288,8 +288,8 @@
When using remember to include the required css and js with:
- self.req.add_js('jquery.tablesorter.js')
- self.req.add_css(('cubicweb.tablesorter.css', 'cubicweb.tableview.css'))
+ self._cw.add_js('jquery.tablesorter.js')
+ self._cw.add_css(('cubicweb.tablesorter.css', 'cubicweb.tableview.css'))
"""
highlight = "onmouseover=\"addElementClass(this, 'highlighted');\" " \
"onmouseout=\"removeElementClass(this, 'highlighted');\""
--- a/web/views/forms.py Tue Dec 22 13:13:53 2009 +0100
+++ b/web/views/forms.py Tue Dec 22 13:14:34 2009 +0100
@@ -227,9 +227,9 @@
return self.force_session_key
# XXX if this is a json request, suppose we should redirect to the
# entity primary view
- if self.req.json_request and self.edited_entity.has_eid():
+ if self._cw.json_request and self.edited_entity.has_eid():
return '%s#%s' % (self.edited_entity.absolute_url(), self.domid)
- return '%s#%s' % (self.req.url(), self.domid)
+ return '%s#%s' % (self._cw.url(), self.domid)
def build_context(self, formvalues=None):
super(EntityFieldsForm, self).build_context(formvalues)
--- a/web/views/startup.py Tue Dec 22 13:13:53 2009 +0100
+++ b/web/views/startup.py Tue Dec 22 13:14:34 2009 +0100
@@ -73,10 +73,10 @@
self.w(u'<ul class="createLink">')
for etype in self.add_etype_links:
eschema = self.schema.eschema(etype)
- if eschema.has_perm(self.req, 'add'):
+ if eschema.has_perm(self._cw, 'add'):
self.w(u'<li><a href="%s">%s</a></li>' % (
- self.req.build_url('add/%s' % eschema),
- self.req.__('add a %s' % eschema).capitalize()))
+ self._cw.build_url('add/%s' % eschema),
+ self._cw.__('add a %s' % eschema).capitalize()))
self.w(u'</ul>')
def startup_views(self):