Pman.Tab.XtupleMetric.bjs
authorEdward <edward@roojs.com>
Tue, 5 Aug 2014 07:00:22 +0000 (15:00 +0800)
committerEdward <edward@roojs.com>
Tue, 5 Aug 2014 07:00:22 +0000 (15:00 +0800)
Pman.Tab.XtupleMetric.js

Pman.Tab.XtupleMetric.bjs
Pman.Tab.XtupleMetric.js

index 096b1c8..63f1a0d 100644 (file)
@@ -97,7 +97,7 @@
                                 },
                                 {
                                     "listeners": {
-                                        "|click": "function()\n{\n\n   Pman.Dialog.XtupleSalesOrderNew.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
+                                        "|click": "function()\n{\n    \n    var nr = _this.grid.ds.reader.newRow({\n        metric_id : 0,\n        metric_name : '',\n        metric_value : '',\n        metric_module : ''\n    });\n    \n    _this.grid.stopEditing();\n    _this.grid.ds.insert(0, nr); \n    _this.grid.startEditing(0, 0);\n}\n"
                                     },
                                     "cls": "x-btn-text-icon",
                                     "text": "Add",
index c2db6c6..40cde54 100644 (file)
@@ -178,10 +178,17 @@ Pman.Tab.XtupleMetric = new Roo.XComponent({
                             listeners : {
                                 click : function()
                                 {
-                                
-                                   Pman.Dialog.XtupleSalesOrderNew.show( { id : 0 } , function() {
-                                        _this.grid.footer.onClick('first');
-                                   }); 
+                                    
+                                    var nr = _this.grid.ds.reader.newRow({
+                                        metric_id : 0,
+                                        metric_name : '',
+                                        metric_value : '',
+                                        metric_module : ''
+                                    });
+                                    
+                                    _this.grid.stopEditing();
+                                    _this.grid.ds.insert(0, nr); 
+                                    _this.grid.startEditing(0, 0);
                                 }
                             },
                             cls : 'x-btn-text-icon',