# HG changeset patch # User Aurelien Campeas # Date 1267525289 -3600 # Node ID 64806b0f74316d060cf33a0f4abfeab474f75a48 # Parent 6cca4f602486e5a1d8df9a20641fa7e24a5b745d [reledit] add ajax html head div, which allows to get additional css/js up to the browser #620569 diff -r 6cca4f602486 -r 64806b0f7431 web/views/basecontrollers.py --- a/web/views/basecontrollers.py Mon Mar 01 16:02:22 2010 +0100 +++ b/web/views/basecontrollers.py Tue Mar 02 11:21:29 2010 +0100 @@ -402,13 +402,23 @@ @xhtmlize def js_reledit_form(self): + req = self._cw args = dict((x, self._cw.form[x]) for x in frozenset(('rtype', 'role', 'reload', 'landing_zone'))) entity = self._cw.entity_from_eid(int(self._cw.form['eid'])) # note: default is reserved in js land args['default'] = self._cw.form['default_value'] args['reload'] = simplejson.loads(args['reload']) - return entity.view('doreledit', **args) + rset = req.eid_rset(int(self._cw.form['eid'])) + view = req.vreg['views'].select('doreledit', req, rset=rset, rtype=args['rtype']) + stream = view.set_stream() + view.render(**args) + extresources = req.html_headers.getvalue(skiphead=True) + if extresources: + stream.write(u'
\n') + stream.write(extresources) + stream.write(u'
\n') + return stream.getvalue() @jsonize def js_i18n(self, msgids):