Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleSalesProductList.bjs
index 0d8d132..1fe0d8f 100644 (file)
@@ -1,9 +1,9 @@
 {
-    "id": "roo-file-30",
+    "id": "roo-file-352",
     "name": "Pman.Dialog.XtupleSalesProductList",
     "parent": "",
     "title": "",
-    "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleSalesProductList.bjs",
+    "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleSalesProductList.bjs",
     "items": [
         {
             "listeners": {
                             "items": [
                                 {
                                     "*prop": "sm",
-                                    "singleSelect": true,
+                                    "singleSelect": false,
                                     "xtype": "RowSelectionModel",
                                     "|xns": "Roo.grid"
                                 },
                                 {
                                     "listeners": {
-                                        "beforeload": "function (_self, o)\n{\n      o.params._with_prodcat = 1;\n      o.params._with_char = 1;\n      o.params._with_itemsrc_active = 1;\n      o.params._with_last_purchase_price = 1;\n      o.params._with_itemsite = 1;\n      o.params._with_image = 1;\n\n      if(typeof(_this.data.cohead_cust_id) != 'undefined'){\n        o.params.cohead_cust_id = _this.data.cohead_cust_id;\n      }\n      \n      if(typeof(_this.data.cohead_id) != 'undefined'){\n        o.params.cohead_id = _this.data.cohead_id;\n      }\n      \n      var s = _this.searchBox.getValue();\n      if (!s.length) {\n            return false;\n        }\n        o.params['query[number_or_name]'] = s;\n      \n}"
+                                        "beforeload": "function (_self, o)\n{\n      o.params._with_prodcat = 1;\n      o.params._with_char = 1;\n      if (!_this.data.exclude_itemsrc_vendor) {\n      \n          o.params._with_itemsrc_active = 1;\n      }\n      o.params._with_last_purchase_price = 1;\n      o.params._with_itemsite = 1;\n      o.params._with_image = 1;\n\n      if(typeof(_this.data.cohead_cust_id) != 'undefined'){\n        o.params.cohead_cust_id = _this.data.cohead_cust_id;\n      }\n      \n      if(typeof(_this.data.cohead_id) != 'undefined'){\n        o.params.cohead_id = _this.data.cohead_id;\n      }\n      \n      var s = _this.searchBox.getValue();\n      if (s.length) {\n            o.params['query[number_or_name]'] = s;\n       }\n       if (_this.data.exclude_itemsrc_vendor) {\n            o.params._exclude_itemsrc_vendor = _this.data.exclude_itemsrc_vendor;\n       } \n        \n      _this.addSelected.show();\n      if (!_this.data.multi_select) {\n            _this.addSelected.hide();\n      }\n      \n}"
                                     },
                                     "*prop": "dataSource",
                                     "remoteSort": true,
                         }
                     ]
                 },
+                {
+                    "listeners": {
+                        "click": "function (_self, e)\n{\n\n    if(!_this.callback){\n         _this.dialog.hide();\n        return;\n    }\n    var sels = _this.grid.selModel.getSelections();\n    if (!sels.length) {\n        Roo.MessageBox.alert(\"Error\", \"Select some items\");\n    }\n      _this.dialog.hide();\n    _this.callback.call(_this,sels);\n}",
+                        "render": "function (_self)\n{\n    _this.addSelected = _self;\n}"
+                    },
+                    "*prop": "buttons[]",
+                    "text": "Add Selected",
+                    "xtype": "Button",
+                    "|xns": "Roo"
+                },
                 {
                     "listeners": {
                         "click": "function (_self, e)\n{\n    Pman.Dialog.XtupleItem.show({item_id : 0}, function(){\n        _this.grid.footer.onClick('first');\n    });\n}"