--- a/entities/wfobjs.py Wed Oct 21 13:52:05 2009 +0200
+++ b/entities/wfobjs.py Wed Oct 21 13:52:16 2009 +0200
@@ -411,7 +411,10 @@
def latest_trinfo(self):
"""return the latest transition information for this entity"""
- return self.reverse_wf_info_for[-1]
+ try:
+ return self.reverse_wf_info_for[-1]
+ except IndexError:
+ return None
@cached
def cwetype_workflow(self):
--- a/rset.py Wed Oct 21 13:52:05 2009 +0200
+++ b/rset.py Wed Oct 21 13:52:16 2009 +0200
@@ -505,6 +505,9 @@
# UNION query, find the subquery from which this entity has been found
select = rqlst.locate_subquery(locate_query_col, etype, self.args)[0]
col = rqlst.subquery_selection_index(select, col)
+ if col is None:
+ # XXX unexpected, should fix subquery_selection_index ?
+ return None, None
try:
myvar = select.selection[col].variable
except AttributeError:
--- a/web/data/cubicweb.edition.js Wed Oct 21 13:52:05 2009 +0200
+++ b/web/data/cubicweb.edition.js Wed Oct 21 13:52:16 2009 +0200
@@ -503,14 +503,16 @@
function showInlineEditionForm(eid, rtype, divid) {
jQuery('#' + divid).hide();
- jQuery('#' + divid+'-form').show();
+ jQuery('#' + divid + '-value' ).hide();
+ jQuery('#' + divid+ '-form').show();
}
function hideInlineEdit(eid, rtype, divid) {
jQuery('#appMsg').hide();
jQuery('div.errorMessage').remove();
jQuery('#' + divid).show();
- jQuery('#' + divid+'-form').hide();
+ jQuery('#' + divid + '-value').show();
+ jQuery('#' + divid +'-form').hide();
}
CubicWeb.provide('edition.js');
--- a/web/data/cubicweb.form.css Wed Oct 21 13:52:05 2009 +0200
+++ b/web/data/cubicweb.form.css Wed Oct 21 13:52:16 2009 +0200
@@ -184,6 +184,10 @@
display: inline;
}
+div.editableFieldValue {
+ display: inline;
+}
+
div.editableField:hover,
div.editableField p:hover {
background-color: #eeedd9;
--- a/web/views/editforms.py Wed Oct 21 13:52:05 2009 +0200
+++ b/web/views/editforms.py Wed Oct 21 13:52:16 2009 +0200
@@ -193,17 +193,18 @@
"""xxx-reledit div (class=field)
+-xxx div (class="editableField")
| +-landing zone
- + +-value
- +-form-xxx div
+ +-xxx-value div
+ +-xxx-form div
"""
w = self.w
+ divid = form.event_args['divid']
w(u'<div id="%s-reledit" class="field">' % form.event_args['divid'])
w(u'<div id="%s" class="editableField" onclick="%s" title="%s">' % (
- form.event_args['divid'], xml_escape(self._onclick % form.event_args),
+ divid, xml_escape(self._onclick % form.event_args),
self.req._(self._landingzonemsg)))
w(lzone)
- w(value)
w(u'</div>')
+ w(u'<div id="%s-value" class="editableFieldValue">%s</div>' % (divid, value))
w(form.form_render(renderer=renderer))
w(u'</div>')