web/request.py
changeset 8732 0d9c8f5eb285
parent 8696 0bb18407c053
parent 8730 d4d9f33fd01b
child 8752 e19f4bba89cd
child 8869 a46197b1696f
equal deleted inserted replaced
8727:5bca35901e9b 8732:0d9c8f5eb285
   702         # define a function in headers and use it in the link to avoid url
   702         # define a function in headers and use it in the link to avoid url
   703         # unescaping pb: browsers give the js expression to the interpreter
   703         # unescaping pb: browsers give the js expression to the interpreter
   704         # after having url unescaping the content. This may make appear some
   704         # after having url unescaping the content. This may make appear some
   705         # quote or other special characters that will break the js expression.
   705         # quote or other special characters that will break the js expression.
   706         extraparams.setdefault('fname', 'view')
   706         extraparams.setdefault('fname', 'view')
   707         url = self.build_url('json', **extraparams)
   707         # remove pageid from the generated URL as it's forced as a parameter
       
   708         # to the loadxhtml call below.
       
   709         extraparams.pop('pageid', None)
       
   710         url = self.build_url('ajax', **extraparams)
   708         cbname = build_cb_uid(url[:50])
   711         cbname = build_cb_uid(url[:50])
   709         # think to propagate pageid. XXX see https://www.cubicweb.org/ticket/1753121
   712         # think to propagate pageid. XXX see https://www.cubicweb.org/ticket/1753121
   710         jscode = u'function %s() { $("#%s").%s; }' % (
   713         jscode = u'function %s() { $("#%s").%s; }' % (
   711             cbname, nodeid, js.loadxhtml(url, {'pageid': self.pageid},
   714             cbname, nodeid, js.loadxhtml(url, {'pageid': self.pageid},
   712                                          'get', replacemode))
   715                                          'get', replacemode))