[views/table] use cubicweb.ajax.js for pagination stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 27 Nov 2013 16:18:54 +0100
branchstable
changeset 9332 7a5d46db5c36
parent 9331 c6f54ed6b60a
child 9333 22423634d06d
[views/table] use cubicweb.ajax.js for pagination Else we fail in js-land on a "AJAX_PREFIX_URL is not defined". Closes #3329072.
web/views/tableview.py
--- a/web/views/tableview.py	Tue Dec 03 13:23:59 2013 +0100
+++ b/web/views/tableview.py	Wed Nov 27 16:18:54 2013 +0100
@@ -446,6 +446,7 @@
     handle_pagination = True
 
     def call(self, **kwargs):
+        self._cw.add_js('cubicweb.ajax.js') # for pagination
         self.layout_render(self.w)
 
     def column_renderer(self, colid, *args, **kwargs):
@@ -621,7 +622,7 @@
             else:
                 msg = '[3.14] %s argument is deprecated' % ', '.join(kwargs)
             warn(msg, DeprecationWarning, stacklevel=2)
-        self.layout_render(self.w)
+        super(RsetTableView, self).call(**kwargs)
 
     def main_var_index(self):
         """returns the index of the first non-attribute variable among the RQL