Common.js 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  2. MWF.xApplication.process.Xform.Common = MWF.APPCommon = new Class({
  3. Extends: MWF.APP$Module,
  4. _loadUserInterface: function(){
  5. if (this.json.innerHTML){
  6. var nodes = this.node.childNodes;
  7. for (var i=0; i<nodes.length; i++){
  8. if (nodes[i].nodeType===Node.ELEMENT_NODE){
  9. if (!nodes[i].get("MWFtype")){
  10. nodes[i].destroy();
  11. i--;
  12. }
  13. }else{
  14. if (nodes[i].removeNode){
  15. nodes[i].removeNode();
  16. }else{
  17. nodes[i].parentNode.removeChild(nodes[i]);
  18. }
  19. i--;
  20. //nodes[i]
  21. }
  22. }
  23. this.node.appendHTML(this.json.innerHTML);
  24. // if (this.node.get("html") !== this.json.innerHTML){
  25. //this.node.appendHTML(this.json.innerHTML);
  26. // }
  27. }
  28. this.node.setProperties(this.json.properties);
  29. }
  30. });