Pman.Dialog.XtupleVendorEdit.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 19 Dec 2013 05:07:51 +0000 (13:07 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 19 Dec 2013 05:07:51 +0000 (13:07 +0800)
Pman.Dialog.XtupleVendorEdit.js

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

index fb10ea8..834d671 100644 (file)
                                     "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       var ids = [];\n       sels.each(function(rec) {\n            ids.push(rec.data.item_id);\n        });\n        new Pman.Request({\n            mask: \"Adding\",\n            url : baseURL + '/Roo/Itemsrc',\n            method: 'POST',\n            params : {\n                add_multiple : ids.join(','),\n                itemsrc_vend_id : _this.form.findField('vend_id').getValue()\n            },\n            success : function() { \n                \n            \n                  _this.grid.footer.onClick('first');\n          }\n      });\n              \n    \n    });\n   \n}\n"
+                                                "|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       var ids = [];\n       Roo.each(sels,function(rec) {\n            ids.push(rec.data.item_id);\n        });\n        new Pman.Request({\n            mask: \"Adding\",\n            url : baseURL + '/Roo/Itemsrc',\n            method: 'POST',\n            params : {\n                add_multiple : ids.join(','),\n                itemsrc_vend_id : _this.form.findField('vend_id').getValue()\n            },\n            success : function() { \n                \n            \n                  _this.grid.footer.onClick('first');\n          }\n      });\n              \n    \n    });\n   \n}\n"
                                             },
                                             "cls": "x-btn-text-icon",
                                             "text": "Add",
index 8eaa6de..321677e 100644 (file)
@@ -658,7 +658,7 @@ Pman.Dialog.XtupleVendorEdit = {
                                                Roo.log(sels); 
                                         
                                                var ids = [];
-                                               sels.each(function(rec) {
+                                               Roo.each(sels,function(rec) {
                                                     ids.push(rec.data.item_id);
                                                 });
                                                 new Pman.Request({