[web/data] Fix userCallbackThenUpdateUI to completely replace old DOM elements
Without the 'swap' parameter, userCallbackThenUpdateUI() would replace
the _children_ of the component with a new version of the componenent,
thus creating nested divs/spans/buttons/etc.
Closes #4881299
--- a/web/data/cubicweb.ajax.js Fri Jan 30 15:53:32 2015 +0100
+++ b/web/data/cubicweb.ajax.js Wed Jan 28 11:51:16 2015 +0100
@@ -538,7 +538,7 @@
var d = userCallback(cbname);
d.addCallback(function() {
$('#' + nodeid).loadxhtml(AJAX_BASE_URL, ajaxFuncArgs('render', {'rql': rql},
- registry, compid));
+ registry, compid), null, 'swap');
if (msg) {
updateMessage(msg);
}