# HG changeset patch # User Sylvain Thénault # Date 1256125936 -7200 # Node ID 957e7cffdefb4f0fb3fac72f1d3a57cc6210d1e8 # Parent 021d32e3a28970a6508d1ec72b7b1d46c626d21c# Parent 03924de0014d495cfc084eba08b99b54731808b8 merge diff -r 021d32e3a289 -r 957e7cffdefb entities/wfobjs.py --- 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): diff -r 021d32e3a289 -r 957e7cffdefb rset.py --- 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: diff -r 021d32e3a289 -r 957e7cffdefb web/data/cubicweb.edition.js --- 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'); diff -r 021d32e3a289 -r 957e7cffdefb web/data/cubicweb.form.css --- 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; diff -r 021d32e3a289 -r 957e7cffdefb web/views/editforms.py --- 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'
' % form.event_args['divid']) w(u'
' % ( - 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'
') + w(u'
%s
' % (divid, value)) w(form.form_render(renderer=renderer)) w(u'
')