closes #1484510: ajax_replace_url should propagate page id (until an underlying api does it automatically stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 15 Jun 2011 17:34:23 +0200
branchstable
changeset 7515 e1ba23fdcf2d
parent 7513 8f4422391e5a
child 7516 9989b69e2a19
closes #1484510: ajax_replace_url should propagate page id (until an underlying api does it automatically
web/request.py
--- a/web/request.py	Wed Jun 15 17:14:40 2011 +0200
+++ b/web/request.py	Wed Jun 15 17:34:23 2011 +0200
@@ -616,8 +616,10 @@
         extraparams.setdefault('fname', 'view')
         url = self.build_url('json', **extraparams)
         cbname = build_cb_uid(url[:50])
+        # think to propagate pageid. XXX see https://www.cubicweb.org/ticket/1753121
         jscode = 'function %s() { $("#%s").%s; }' % (
-            cbname, nodeid, js.loadxhtml(url, None, 'get', replacemode))
+            cbname, nodeid, js.loadxhtml(url, {'pageid': self.pageid},
+                                         'get', replacemode))
         self.html_headers.add_post_inline_script(jscode)
         return "javascript: %s()" % cbname