[STEP BACK] One step back in the cleaning process. Maybe for v8.

bzr revid: fme@openerp.com-20121205160536-p9dm7zdxq2qb9mqs
This commit is contained in:
Fabien Meghazi 2012-12-05 17:05:36 +01:00
parent 96d3fbe37b
commit 4c66504f78
2 changed files with 3 additions and 4 deletions

View File

@ -1190,7 +1190,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
}
},
get_arch_fragment: function() {
var doc = this.fvg.arch_doc.documentElement.cloneNode(true);
var doc = $.parseXML(instance.web.json_node_to_xml(this.fvg.arch)).documentElement;
// IE won't allow custom button@type and will revert it to spec default : 'submit'
$('button', doc).each(function() {
$(this).attr('data-button-type', $(this).attr('type')).attr('type', 'button');

View File

@ -1396,9 +1396,8 @@ instance.web.View = instance.web.Widget.extend({
*/
instance.web.fields_view_get = function(args) {
function postprocess(fvg) {
fvg.arch_string = fvg.arch;
fvg.arch_doc = $.parseXML(fvg.arch);
fvg.arch = instance.web.xml_to_json(fvg.arch_doc, true);
var doc = $.parseXML(fvg.arch).documentElement;
fvg.arch = instance.web.xml_to_json(doc, (doc.nodeName.toLowerCase() !== 'kanban'));
if ('id' in fvg.fields) {
// Special case for id's
var id_field = fvg.fields['id'];