614 # after having url unescaping the content. This may make appear some |
614 # after having url unescaping the content. This may make appear some |
615 # quote or other special characters that will break the js expression. |
615 # quote or other special characters that will break the js expression. |
616 extraparams.setdefault('fname', 'view') |
616 extraparams.setdefault('fname', 'view') |
617 url = self.build_url('json', **extraparams) |
617 url = self.build_url('json', **extraparams) |
618 cbname = build_cb_uid(url[:50]) |
618 cbname = build_cb_uid(url[:50]) |
|
619 # think to propagate pageid. XXX see https://www.cubicweb.org/ticket/1753121 |
619 jscode = 'function %s() { $("#%s").%s; }' % ( |
620 jscode = 'function %s() { $("#%s").%s; }' % ( |
620 cbname, nodeid, js.loadxhtml(url, None, 'get', replacemode)) |
621 cbname, nodeid, js.loadxhtml(url, {'pageid': self.pageid}, |
|
622 'get', replacemode)) |
621 self.html_headers.add_post_inline_script(jscode) |
623 self.html_headers.add_post_inline_script(jscode) |
622 return "javascript: %s()" % cbname |
624 return "javascript: %s()" % cbname |
623 |
625 |
624 # urls/path management #################################################### |
626 # urls/path management #################################################### |
625 |
627 |