[navigation] move hack from page_link to page_url so '#1251858: Can't see all the elements when a limited list is shown' if fixed as well stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 17 Sep 2010 12:34:03 +0200
branchstable
changeset 6280 e220f8b85f88
parent 6278 7bbdc3b6e9ef
child 6281 a013a68fe8ec
[navigation] move hack from page_link to page_url so '#1251858: Can't see all the elements when a limited list is shown' if fixed as well
web/component.py
--- a/web/component.py	Thu Sep 16 18:43:46 2010 +0200
+++ b/web/component.py	Fri Sep 17 12:34:03 2010 +0200
@@ -147,6 +147,10 @@
             url = self.ajax_page_url(**params)
         else:
             url = self._cw.build_url(path, **params)
+        # XXX hack to avoid opening a new page containing the evaluation of the
+        # js expression on ajax call
+        if url.startswith('javascript:'):
+            url += '; noop();'
         return url
 
     def ajax_page_url(self, **params):
@@ -157,10 +161,6 @@
 
     def page_link(self, path, params, start, stop, content):
         url = xml_escape(self.page_url(path, params, start, stop))
-        # XXX hack to avoid opening a new page containing the evaluation of the
-        # js expression on ajax call
-        if url.startswith('javascript:'):
-            url += '; noop();'
         if start == self.starting_from:
             return self.selected_page_link_templ % (url, content, content)
         return self.page_link_templ % (url, content, content)