src/JsRender/NodeToJs.vala
[app.Builder.js] / src / JsRender / NodeToJs.vala
index e8266c7..32f07db 100644 (file)
@@ -176,6 +176,12 @@ public class JsRender.NodeToJs : Object {
                // output the items...
                // work out remaining items...
         
+               // output xns / xtype first..
+               if (this.out_props.has_key("xtype")) {
+                       var v = this.out_props.get("xtype");
+                       this.node.setLine(this.cur_line, "p","xtype"); 
+                       this.addLine(this.pad + "xtype" + " : " + v + suffix, ',');
+               }
                
                // plain properties.
                var iter = this.orderedPropKeys().list_iterator();
@@ -183,9 +189,15 @@ public class JsRender.NodeToJs : Object {
  
                         
                        var k = iter.get();
+                       if (k == "xns" || k == "xtype") {
+                               continue;
+                       }
+
                        var v = this.out_props.get(k);
-                       this.node.setLine(this.cur_line, "p",k); //listener
+                       this.node.setLine(this.cur_line, "p",k); 
                        this.addLine(this.pad + k + " : " + v + suffix, ',');
+                       this.node.setLine(this.cur_line, "p","| xns" ); 
+                       
                        this.node.setLine(this.cur_line, "e", "");
                        
                }
@@ -213,7 +225,13 @@ public class JsRender.NodeToJs : Object {
                
                //------- at this point it is the end of the code relating directly to the object..
                
-               
+               if (this.out_props.has_key("xns")) {
+                       var v = this.out_props.get("xns");
+                       this.node.setLine(this.cur_line, "p","xns"); 
+                       this.addLine(this.pad + "xns" + " : " + v + suffix, ',');
+                       this.node.setLine(this.cur_line, "p","| xns"); 
+                       this.addLine(this.pad + "'|xns' : '" + v + "'", ',');
+               }
                
                this.node.line_end = this.cur_line;
                
@@ -225,10 +243,7 @@ public class JsRender.NodeToJs : Object {
                        var addstr = this.mungeChildNew(this.pad + indent_str, niter.get_value());
                        this.node.setLine(this.cur_line, "p",niter.get_key());
                        this.addLine(this.pad + niter.get_key() + " : " + addstr, ',');
-                       if (niter.get_key() == "xns") {
-                               this.addLine(this.pad + "'|xns' : '" + addstr + "'", ',');
-
-                       }
+                       
                        this.node.setLine(this.cur_line, "e", "");
                }                        
                // prop arrays...