# HG changeset patch # User Julien Cristau # Date 1392385585 -3600 # Node ID 39b46b0b01e4f9f27b5ab81d9ab07051f7a9821d # Parent 54ead5f372bbaf8fb6826943397c5ddf68e35805 [web/data] fix treeview regression (closes #3526466) Changeset 68cde7431c2c "[js] remove 3.9 bw compat (where apparently unused)" removed the use of form.callback from loadxhtml, which treeview relied on. Update to add a callback on the loadxhtml return value instead. diff -r 54ead5f372bb -r 39b46b0b01e4 web/data/cubicweb.widgets.js --- a/web/data/cubicweb.widgets.js Fri Dec 20 08:39:03 2013 +0100 +++ b/web/data/cubicweb.widgets.js Fri Feb 14 14:46:25 2014 +0100 @@ -415,17 +415,16 @@ var url = linode.attr('cubicweb:loadurl'); if (url) { linode.find('ul.placeholder').remove(); - linode.loadxhtml(url, { - callback: function(domnode) { + var d = linode.loadxhtml(url, null, 'post', 'append'); + d.addCallback(function(domnode) { linode.removeAttr('cubicweb:loadurl'); - jQuery(domnode).treeview({ + linode.find('> ul.treeview').treeview({ toggle: toggleTree, prerendered: true }); return null; } - }, - 'post', 'append'); + ); } }