Pman.Dialog.XtupleVendorEdit.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 19 Dec 2013 04:53:16 +0000 (12:53 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 19 Dec 2013 04:53:16 +0000 (12:53 +0800)
Pman.Dialog.XtupleVendorEdit.js

Pman.Dialog.XtupleVendorEdit.bjs
Pman.Dialog.XtupleVendorEdit.js

index 2cef1b7..1d3113d 100644 (file)
                                     "|xns": "Roo",
                                     "items": [
                                         {
+                                            "listeners": {
+                                                "|click": "function()\n{\n   \n    Pman.Dialog.XtupleSalesProductList.show({\n        exclude_itemsrc_vendor : _this.form.findField('vend_id').getValue,\n        multi_select : true\n    \n    }, function(sels) {\n       Roo.log(sels); \n    \n    });\n   \n}\n"
+                                            },
+                                            "cls": "x-btn-text-icon",
                                             "text": "Add",
                                             "xtype": "Button",
-                                            "cls": "x-btn-text-icon",
                                             "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
-                                            "listeners": {
-                                                "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
-                                            },
                                             "|xns": "Roo.Toolbar"
                                         },
                                         {
index a68eba2..8bbd309 100644 (file)
@@ -646,18 +646,24 @@ Pman.Dialog.XtupleVendorEdit = {
                                 {
                                     xtype: 'Button',
                                     xns: Roo.Toolbar,
-                                    text : "Add",
-                                    cls : 'x-btn-text-icon',
-                                    icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
                                     listeners : {
                                         click : function()
                                         {
-                                            if (!_this.dialog) return;
-                                            _this.dialog.show( { id : 0 } , function() {
-                                                _this.grid.footer.onClick('first');
-                                           }); 
+                                           
+                                            Pman.Dialog.XtupleSalesProductList.show({
+                                                exclude_itemsrc_vendor : _this.form.findField('vend_id').getValue,
+                                                multi_select : true
+                                            
+                                            }, function(sels) {
+                                               Roo.log(sels); 
+                                            
+                                            });
+                                           
                                         }
-                                    }
+                                    },
+                                    cls : 'x-btn-text-icon',
+                                    text : "Add",
+                                    icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
                                 },
                                 {
                                     xtype: 'Fill',