remove deprecation warning introduced by add_onload api change
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 09 Mar 2010 12:07:34 +0100
changeset 4851 e55bdd10421e
parent 4850 bd640b137f50
child 4853 5dd4a9a46266
remove deprecation warning introduced by add_onload api change
web/request.py
web/views/treeview.py
--- a/web/request.py	Tue Mar 09 12:07:16 2010 +0100
+++ b/web/request.py	Tue Mar 09 12:07:34 2010 +0100
@@ -477,7 +477,7 @@
     # high level methods for HTML headers management ##########################
 
     def add_onload(self, jscode):
-        self.html_headers.add_onload(jscode, self.json_request)
+        self.html_headers.add_onload(jscode)
 
     def add_js(self, jsfiles, localfile=True):
         """specify a list of JS files to include in the HTML headers
--- a/web/views/treeview.py	Tue Mar 09 12:07:16 2010 +0100
+++ b/web/views/treeview.py	Tue Mar 09 12:07:34 2010 +0100
@@ -46,8 +46,7 @@
         self._cw.add_css('jquery.treeview.css')
         self._cw.add_js(('cubicweb.ajax.js', 'cubicweb.widgets.js', 'jquery.treeview.js'))
         self._cw.html_headers.add_onload(u"""
-jQuery("#tree-%s").treeview({toggle: toggleTree, prerendered: true});""" % treeid,
-                                         jsoncall=toplevel_thru_ajax)
+jQuery("#tree-%s").treeview({toggle: toggleTree, prerendered: true});""" % treeid)
 
     def call(self, subvid=None, treeid=None,
              initial_load=True, initial_thru_ajax=False, **morekwargs):