712 # define a function in headers and use it in the link to avoid url |
712 # define a function in headers and use it in the link to avoid url |
713 # unescaping pb: browsers give the js expression to the interpreter |
713 # unescaping pb: browsers give the js expression to the interpreter |
714 # after having url unescaping the content. This may make appear some |
714 # after having url unescaping the content. This may make appear some |
715 # quote or other special characters that will break the js expression. |
715 # quote or other special characters that will break the js expression. |
716 extraparams.setdefault('fname', 'view') |
716 extraparams.setdefault('fname', 'view') |
|
717 # remove pageid from the generated URL as it's forced as a parameter |
|
718 # to the loadxhtml call below. |
|
719 extraparams.pop('pageid', None) |
717 url = self.build_url('ajax', **extraparams) |
720 url = self.build_url('ajax', **extraparams) |
718 cbname = build_cb_uid(url[:50]) |
721 cbname = build_cb_uid(url[:50]) |
719 # think to propagate pageid. XXX see https://www.cubicweb.org/ticket/1753121 |
722 # think to propagate pageid. XXX see https://www.cubicweb.org/ticket/1753121 |
720 jscode = u'function %s() { $("#%s").%s; }' % ( |
723 jscode = u'function %s() { $("#%s").%s; }' % ( |
721 cbname, nodeid, js.loadxhtml(url, {'pageid': self.pageid}, |
724 cbname, nodeid, js.loadxhtml(url, {'pageid': self.pageid}, |