backout 8f3e963501e2, which is not ready yet stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 14 Feb 2014 10:39:16 +0100
branchstable
changeset 9528 7f3a3fc4a2a3
parent 9527 29442fa3d272
child 9535 09b4ebb9b0f1
backout 8f3e963501e2, which is not ready yet
web/component.py
web/views/navigation.py
--- a/web/component.py	Thu Feb 13 19:29:20 2014 +0100
+++ b/web/component.py	Fri Feb 14 10:39:16 2014 +0100
@@ -122,9 +122,9 @@
 
     def ajax_page_url(self, **params):
         divid = params.setdefault('divid', 'pageContent')
-        params['fname'] = 'view'
         params['rql'] = self.cw_rset.printable_rql()
-        return self._cw.build_url('ajax', **params)
+        return js_href("$(%s).loadxhtml(AJAX_PREFIX_URL, %s, 'get', 'swap')" % (
+            json_dumps('#'+divid), js.ajaxFuncArgs('view', params)))
 
     def page_link(self, path, params, start, stop, content):
         url = xml_escape(self.page_url(path, params, start, stop))
--- a/web/views/navigation.py	Thu Feb 13 19:29:20 2014 +0100
+++ b/web/views/navigation.py	Fri Feb 14 10:39:16 2014 +0100
@@ -55,7 +55,6 @@
 from logilab.mtconverter import xml_escape
 from logilab.common.deprecation import deprecated
 
-from cubicweb.utils import json_dumps
 from cubicweb.predicates import (paginated_rset, sorted_rset,
                                 adaptable, implements)
 from cubicweb.uilib import cut
@@ -282,13 +281,6 @@
     nav = req.vreg['components'].select_or_none(
         'navigation', req, rset=rset, page_size=page_size, view=view)
     if nav:
-        domid = getattr(view, 'domid', 'pageContent')
-        view._cw.add_onload('''
-        jQuery('div.displayAllLink a, div.pagination a').click(function() {
-            cw.jqNode(%s).loadxhtml(this.href, null, 'get', 'swap');
-            return false;
-        });
-            ''' % json_dumps(domid))
         if w is None:
             w = view.w
         if req.form.get('__force_display'):