Builder4/DialogNewComponent.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 10 Jun 2014 11:10:33 +0000 (19:10 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 10 Jun 2014 11:10:33 +0000 (19:10 +0800)
Builder4/DialogNewComponent.js
Builder4/DialogNewComponent.vala

Builder4/DialogNewComponent.bjs
Builder4/DialogNewComponent.js
Builder4/DialogNewComponent.vala

index ff29c1f..8725996 100644 (file)
@@ -20,7 +20,7 @@
             "xtype": "Dialog",
             "|deletable": "false",
             "|modal": "true",
-            "|void:show": "(JsRender.JsRender c) \n{\n    this.project = c.project;\n    \n    if (!this.el) {\n        //this.init();\n    }\n    \n    this.def =  { \n        name : '' , \n        title : '' ,\n        region : '' ,\n        parent: '',\n      //  disable: '',\n        modOrder : '0',\n        permname : ''\n    };\n    \n    \n    for (var i in this.def) {\n        c[i] = c[i] || this.def[i];\n        this.get(i).el.set_text(c[i]);\n    }\n    \n    if (c.path.length > 0) {\n        this.el.set_title(\"Edit File Details - \" + c.name);\n    } else {\n        this.el.set_title(\"Create New File\");\n    }\n     \n    this.file = c;\n    console.log('show all');\n    this.el.show_all();\n    this.success = c.success;\n    \n    \n}",
+            "|void:show": "(JsRender.JsRender c) \n{\n    this.project = c.project;\n    \n    if (!this.el) {\n        //this.init();\n    }\n    \n    this.def =  { \n        name : '' , \n        title : '' ,\n        region : '' ,\n        parent: '',\n      //  disable: '',\n        modOrder : '0',\n        permname : ''\n    };\n    _this.name.el.set_text(c.name);\n    _this.title.el.set_text(c.title);\n    _this.parent.el.set_text(c.parent);    \n    _this.region.el.set_text(c.region);\n    _this.modOrder.el.set_text(c.modOrder);\n     _this.permname.el.set_text(c.permname);\n    \n    if (c.path.length > 0) {\n        this.el.set_title(\"Edit File Details - \" + c.name);\n    } else {\n        this.el.set_title(\"Create New File\");\n    }\n     \n    _this.file = c;\n    //console.log('show all');\n    this.el.show_all();\n    \n    //this.success = c.success;\n    \n    \n}",
             "|xns": "Gtk",
             "items": [
                 {
index bbb0130..8e7c351 100644 (file)
@@ -113,12 +113,12 @@ DialogNewComponent=new XObject({
             modOrder : '0',
             permname : ''
         };
-        
-        
-        for (var i in this.def) {
-            c[i] = c[i] || this.def[i];
-            this.get(i).el.set_text(c[i]);
-        }
+        _this.name.el.set_text(c.name);
+        _this.title.el.set_text(c.title);
+        _this.parent.el.set_text(c.parent);    
+        _this.region.el.set_text(c.region);
+        _this.modOrder.el.set_text(c.modOrder);
+         _this.permname.el.set_text(c.permname);
         
         if (c.path.length > 0) {
             this.el.set_title("Edit File Details - " + c.name);
@@ -126,10 +126,11 @@ DialogNewComponent=new XObject({
             this.el.set_title("Create New File");
         }
          
-        this.file = c;
-        console.log('show all');
+        _this.file = c;
+        //console.log('show all');
         this.el.show_all();
-        this.success = c.success;
+        
+        //this.success = c.success;
         
         
     },
index 5d75424..41b868b 100644 (file)
@@ -175,12 +175,12 @@ public class Xcls_DialogNewComponent
                 modOrder : '0',
                 permname : ''
             };
-            
-            
-            for (var i in this.def) {
-                c[i] = c[i] || this.def[i];
-                this.get(i).el.set_text(c[i]);
-            }
+            _this.name.el.set_text(c.name);
+            _this.title.el.set_text(c.title);
+            _this.parent.el.set_text(c.parent);    
+            _this.region.el.set_text(c.region);
+            _this.modOrder.el.set_text(c.modOrder);
+             _this.permname.el.set_text(c.permname);
             
             if (c.path.length > 0) {
                 this.el.set_title("Edit File Details - " + c.name);
@@ -188,10 +188,11 @@ public class Xcls_DialogNewComponent
                 this.el.set_title("Create New File");
             }
              
-            this.file = c;
-            console.log('show all');
+            _this.file = c;
+            //console.log('show all');
             this.el.show_all();
-            this.success = c.success;
+            
+            //this.success = c.success;
             
             
         }