[reledit] repair some brokennes

authorAurelien Campeas <aurelien.campeas@logilab.fr>
changeset784d6f300070
branchdefault
phasepublic
hiddenno
parent revision#0eed6045d785 [reledit] kill the reledit/doreledit duality
child revision#611663348158 [merge] backport stable fixes into default
files modified by this revision
web/views/reledit.py
# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1299842252 -3600
# Fri Mar 11 12:17:32 2011 +0100
# Node ID 784d6f3000704f436059efb7348f38b720016ed5
# Parent 0eed6045d785cb7628e7fa30a712a3a62f6d2f06
[reledit] repair some brokennes

diff --git a/web/views/reledit.py b/web/views/reledit.py
@@ -85,11 +85,11 @@
1                    ):
2          """display field to edit entity's `rtype` relation on click"""
3          assert rtype
4          self._cw.add_css('cubicweb.form.css')
5          self._cw.add_js(('cubicweb.reledit.js', 'cubicweb.edition.js', 'cubicweb.ajax.js'))
6 -        entity = self.cw_rset.get_entity(row, col)
7 +        self.entity = self.cw_rset.get_entity(row, col)
8          rschema = self._cw.vreg.schema[rtype]
9          self._rules = rctrl.etype_get(self.entity.e_schema.type, rschema.type, role, '*')
10          if rvid is not None or default_value is not None:
11              warn('[3.9] specifying rvid/default_value on select is deprecated, '
12                   'reledit_ctrl rtag to control this' % self, DeprecationWarning)
@@ -218,11 +218,11 @@
13 
14      def _build_edit_zone(self):
15          return self._build_zone(self._editzone, self._editzonemsg, self._editlogo)
16 
17      def _build_delete_zone(self):
18 -        return self._build_zone(self._deletezone, self._deletezonemsg, self._deletelogo)
19 +        return self._build_zone(self._deletezone, self._deletemsg, self._deletelogo)
20 
21      def _build_add_zone(self):
22          return self._build_zone(self._addzone, self._addzonemsg, self._addlogo)
23 
24      def _build_divid(self, rtype, role, entity_eid):