small cleanup & revert to less intrusive icon stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 20 Oct 2009 19:19:19 +0200
branchstable
changeset 3761 2c3b72faf05d
parent 3760 9d93faa0e6dc
child 3762 e416186fb91c
small cleanup & revert to less intrusive icon
web/data/cubicweb.form.css
web/views/editforms.py
--- a/web/data/cubicweb.form.css	Tue Oct 20 18:13:36 2009 +0200
+++ b/web/data/cubicweb.form.css	Tue Oct 20 19:19:19 2009 +0200
@@ -180,13 +180,6 @@
   margin-left: 2em;
 }
 
-/*FIXME inlineedit not used ?*/
-/*
-div.inlineedit {
-  display: none;
-}
-*/
-
 div.editableField {
   display: inline;
 }
--- a/web/views/editforms.py	Tue Oct 20 18:13:36 2009 +0200
+++ b/web/views/editforms.py	Tue Oct 20 19:19:19 2009 +0200
@@ -114,8 +114,7 @@
     _onsubmit = ("return inlineValidateRelationForm('%(rtype)s', '%(role)s', '%(eid)s', "
                  "'%(divid)s', %(reload)s, '%(vid)s', '%(default)s', '%(lzone)s');")
     _cancelclick = "hideInlineEdit(%s,\'%s\',\'%s\')"
-    _defaultlandingzone = (u'<img title="%(msg)s" '
-                           'src="data/accessories-text-editor.png" '
+    _defaultlandingzone = (u'<img title="%(msg)s" src="data/file.gif" '
                            'alt="%(msg)s"/>')
     _landingzonemsg = _('click to edit this field')
     # default relation vids according to cardinality
@@ -199,8 +198,10 @@
         """
         w = self.w
         w(u'<div id="%s-reledit" class="field">' % form.event_args['divid'])
-        w(u'<div id="%s" class="editableField" onclick="%s">%s' % (
-                form.event_args['divid'], xml_escape(self._onclick % form.event_args), lzone))
+        w(u'<div id="%s" class="editableField" onclick="%s" title="%s">' % (
+                form.event_args['divid'], xml_escape(self._onclick % form.event_args),
+                self.req._(self._landingzonemsg)))
+        w(lzone)
         w(value)
         w(u'</div>')
         w(form.form_render(renderer=renderer))