cockpit/themes/extended/theme.js in cpee-1.5.27 vs cockpit/themes/extended/theme.js in cpee-2.0

- old
+ new

@@ -13,15 +13,11 @@ this.source = function(base,opts) { if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") { $('#relaxngworker').empty(); var rngw = new RelaxNGui(base,$('#relaxngworker'),self.adaptor.description.context_eval); var nnew = $(rngw.save().documentElement); - nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0'); - var ntxt = nnew.serializeXML(); - ntxt = ntxt.replace(/trans-xmlns/,'xmlns'); - - return($X(ntxt)); + return(nnew); } else { if (opts && opts == 'clone') { base = base.clone(); if (base.attr('id')) { base.attr('id',self.adaptor.description.get_free_id()); @@ -67,10 +63,15 @@ } if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) { $(rng).find(' > element[name="parameters"] > element[name="method"]').remove(); } save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true); - save['details'].content(node); + var nn = $X($(node).serializeXML()); + nn.removeAttr('svg-id'); + nn.removeAttr('svg-type'); + nn.removeAttr('svg-subtype'); + nn.removeAttr('svg-label'); + save['details'].content(nn); format_visual_forms(); } }; //}}} function copyOrMove(menu,group,xml_node,mode) { //{{{