# HG changeset patch # User Sylvain Thénault # Date 1286471047 -7200 # Node ID d75535983224deba92385eac5e365a37197e5e58 # Parent 2013ef8f56e9201c09a5b18fc937d0571595b3ed# Parent 7674f674de40d930fa19b507f0efaf451400d005 backport stable diff -r 2013ef8f56e9 -r d75535983224 devtools/testlib.py diff -r 2013ef8f56e9 -r d75535983224 utils.py --- a/utils.py Wed Oct 06 14:57:14 2010 +0200 +++ b/utils.py Thu Oct 07 19:04:07 2010 +0200 @@ -218,6 +218,11 @@ javascripts and stylesheets """ js_unload_code = u'jQuery(window).unload(unloadPageData);' + # Making ' def __init__(self): super(HTMLHead, self).__init__() @@ -291,14 +296,14 @@ w = self.write # 1/ variable declaration if any if self.jsvars: - w(u'\n') + w(self.xhtml_safe_script_closing) # 2/ css files for cssfile, media in self.cssfiles: w(u'\n' % @@ -316,9 +321,9 @@ xml_escape(jsfile)) # 5/ post inlined scripts (i.e. scripts depending on other JS files) if self.post_inlined_scripts: - w(u'\n') + w(self.xhtml_safe_script_closing) header = super(HTMLHead, self).getvalue() if skiphead: return header diff -r 2013ef8f56e9 -r d75535983224 web/views/boxes.py --- a/web/views/boxes.py Wed Oct 06 14:57:14 2010 +0200 +++ b/web/views/boxes.py Thu Oct 07 19:04:07 2010 +0200 @@ -235,6 +235,9 @@ def call(self, **kwargs): """display a list of entities by calling their view""" + if 'dispctrl' in self.cw_extra_kwargs: + # XXX do not modify dispctrl! + self.cw_extra_kwargs['dispctrl'].setdefault('subvid', 'outofcontext') box = self._cw.vreg['ctxcomponents'].select( 'rsetbox', self._cw, rset=self.cw_rset, vid='autolimited', title=title, **self.cw_extra_kwargs) diff -r 2013ef8f56e9 -r d75535983224 web/views/dotgraphview.py --- a/web/views/dotgraphview.py Wed Oct 06 14:57:14 2010 +0200 +++ b/web/views/dotgraphview.py Thu Oct 07 19:04:07 2010 +0200 @@ -31,14 +31,15 @@ class DotGraphView(EntityView): __abstract__ = True - + backend_class = DotBackend + backend_kwargs = {'ratio': 'compress', 'size': '30,10'} def cell_call(self, row, col): entity = self.cw_rset.get_entity(row, col) visitor = self.build_visitor(entity) prophdlr = self.build_dotpropshandler() graphname = 'dotgraph%s' % str(entity.eid) - generator = GraphGenerator(DotBackend(graphname, None, - ratio='compress', size='30,10')) + generator = GraphGenerator(self.backend_class(graphname, None, + **self.backend_kwargs)) # map file pmap, mapfile = tempfile.mkstemp(".map", graphname) os.close(pmap) @@ -50,7 +51,7 @@ self._cw.session.data[filekeyid] = tmpfile self.w(u'%s' % ( xml_escape(entity.absolute_url(vid='tmppng', tmpfile=filekeyid)), - xml_escape(self._cw._('Data connection graph for %s') % entity.name), + xml_escape(self._cw._('Data connection graph for %s') % entity.dc_title()), graphname)) stream = open(mapfile, 'r').read() stream = stream.decode(self._cw.encoding) @@ -61,7 +62,7 @@ raise NotImplementedError def build_dotpropshandler(self): - return DotGraphPropsHandler(self._cw) + return DotPropsHandler(self._cw) class DotPropsHandler(object):