Pman.Tab.XtuplePurchasesVendors.bjs
authorEdward <edward@roojs.com>
Tue, 3 Dec 2013 05:57:47 +0000 (13:57 +0800)
committerEdward <edward@roojs.com>
Tue, 3 Dec 2013 05:57:47 +0000 (13:57 +0800)
Pman.Tab.XtuplePurchasesVendors.js

Pman.Tab.XtuplePurchasesVendors.bjs
Pman.Tab.XtuplePurchasesVendors.js

index 25f4ec2..401d276 100644 (file)
@@ -39,7 +39,8 @@
                             "items": [
                                 {
                                     "listeners": {
-                                        "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
+                                        "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
+                                        "rowdblclick": "function (_self, rowIndex, e)\n{\n    var s = _this.grid.ds.getAt(rowIndex);\n    if(s.data.vend_id * 1 < 1){\n        Roo.MessageBox.alert(\"Error\", \"Select a row\");\n    }\n    \n    Pman.Dialog.XtupleVendorEdit.show(s.data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n}"
                                     },
                                     "*prop": "grid",
                                     "autoExpandColumn": "vend_name",
index b71009b..53b77bc 100644 (file)
@@ -54,6 +54,17 @@ Pman.Tab.XtuplePurchasesVendors = new Roo.XComponent({
                                     if (_this.panel.active) {
                                        this.footer.onClick('first');
                                     }
+                                },
+                                rowdblclick : function (_self, rowIndex, e)
+                                {
+                                    var s = _this.grid.ds.getAt(rowIndex);
+                                    if(s.data.vend_id * 1 < 1){
+                                        Roo.MessageBox.alert("Error", "Select a row");
+                                    }
+                                    
+                                    Pman.Dialog.XtupleVendorEdit.show(s.data, function() {
+                                        _this.grid.footer.onClick('first');
+                                    }); 
                                 }
                             },
                             autoExpandColumn : 'vend_name',