[FIX] Use childnodes and not the whole extend node
bzr revid: fme@openerp.com-20120201124822-xo1msj0ou09o73uh
This commit is contained in:
parent
0839b0e4ee
commit
ab447a4f13
|
@ -402,17 +402,16 @@ QWeb2.Engine = (function() {
|
|||
this.tools.exception(error_msg + "No expression given");
|
||||
}
|
||||
error_msg += "' (expression='" + (jquery || xpath) + "') : ";
|
||||
var inner = this.tools.xml_node_to_string(child, true);
|
||||
if (operation) {
|
||||
var allowed_operations = "append,prepend,before,after,replace,inner".split(',');
|
||||
if (this.tools.arrayIndexOf(allowed_operations, operation) == -1) {
|
||||
this.tools.exception(error_msg + "Invalid operation : '" + operation + "'");
|
||||
}
|
||||
operation = {'replace' : 'replaceWith', 'inner' : 'html'}[operation] || operation;
|
||||
target[operation](child.cloneNode(true));
|
||||
target[operation](child.cloneNode(true).childNodes);
|
||||
} else {
|
||||
try {
|
||||
var f = new Function(['$', 'document'], inner);
|
||||
var f = new Function(['$', 'document'], this.tools.xml_node_to_string(child, true));
|
||||
} catch(error) {
|
||||
return this.tools.exception("Parse " + error_msg + error);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue