Merge lp:~vaab/openerp-web/fix-view-editor-eating-form-elements into lp:openerp-web/6.1

Proposed by Valentin Lab
Status: Rejected
Rejected by: Nicolas Vanhoren (OpenERP)
Proposed branch: lp:~vaab/openerp-web/fix-view-editor-eating-form-elements
Merge into: lp:openerp-web/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web/static/src/js/view_editor.js (+1/-1)
To merge this branch: bzr merge lp:~vaab/openerp-web/fix-view-editor-eating-form-elements
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+99878@code.launchpad.net

Description of the change

This small changes avoid using jQuery as a XML tokenizer as it's not an XML tokenizer (it'll remove a lot of HTML elements to simplify the code).

Please check the bug report to get more info.

To post a comment you must log in.
Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

Thanks for contributing to OpenERP

Unfortunately, by the time I checked this bug, another fix was already provided by someone of our team. Since I have to make a choice between your code and his, I just prefer to merge his because I know he is one of the persons that worked on this part and I assume he know it better, plus I know he conform to our testing guidelines.

Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

Ha yes, the patch from Vidhin also does the same thing than yours :)

Unmerged revisions

2292. By Valentin Lab

[FIX] view_editor could dangerously trim the XML view.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web/static/src/js/view_editor.js'
--- addons/web/static/src/js/view_editor.js 2012-02-13 10:53:41 +0000
+++ addons/web/static/src/js/view_editor.js 2012-03-29 06:16:20 +0000
@@ -631,7 +631,7 @@
631 if (insert.length == _.uniq(check_list).length ) {return xml_child;}631 if (insert.length == _.uniq(check_list).length ) {return xml_child;}
632 });632 });
633 }633 }
634 arch_to_pass = _.filter($(arch.arch), function (child) {634 arch_to_pass = _.filter(xml_arch.childNodes, function (child) {
635 return child.nodeType == 1;635 return child.nodeType == 1;
636 });636 });
637 return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0],obj[0].child_id, move_direct, update_values,arch);637 return self.do_save_xml(arch_to_pass[0], obj[0].child_id[0],obj[0].child_id, move_direct, update_values,arch);