api update again
authorSandrine Ribeau <sandrine.ribeau@logilab.fr>
Wed, 09 Dec 2009 16:06:27 +0100
changeset 4085 002ba2a3bb13
parent 4084 69739e6ebd2a
child 4086 9b96126e0b14
api update again
web/views/basecomponents.py
web/views/tabs.py
--- a/web/views/basecomponents.py	Wed Dec 09 16:05:01 2009 +0100
+++ b/web/views/basecomponents.py	Wed Dec 09 16:06:27 2009 +0100
@@ -224,8 +224,8 @@
     def cell_call(self, row, col, view):
         entity = self.cw_rset.get_entity(row, col)
         url = entity.absolute_url(vid=view.id, __template='pdf-main-template')
-        iconurl = self.req.build_url('data/pdf_icon.gif')
-        label = self.req._('Download page as pdf')
+        iconurl = self._cw.build_url('data/pdf_icon.gif')
+        label = self._cw._('Download page as pdf')
         self.w(u'<a href="%s" title="%s" class="toolbarButton"><img src="%s" alt="%s"/></a>' %
                (xml_escape(url), label, iconurl, label))
 
--- a/web/views/tabs.py	Wed Dec 09 16:05:01 2009 +0100
+++ b/web/views/tabs.py	Wed Dec 09 16:06:27 2009 +0100
@@ -65,7 +65,7 @@
 
     @property
     def cookie_name(self):
-        return str('%s_active_tab' % self._cw.config.appid)
+        return str('%s_active_tab' % self._cw.vreg.config.appid)
 
     def active_tab(self, default):
         if 'tab' in self._cw.form: