{
- "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_image = 1;\n o.params._with_itemsite = 1;\n \n if(typeof(_this.data.cohead_cust_id) != 'undefind'){\n o.params.cohead_cust_id = _this.data.cohead_cust_id;\n }\n \n if(typeof(_this.data.cohead_id) != 'undefind'){\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,
},
{
"*prop": "colModel[]",
- "dataIndex": "item_image_filename",
+ "dataIndex": "item_image_id",
"header": "Image",
- "width": 150,
+ "width": 100,
"xtype": "ColumnModel",
- "|renderer": "function(v,x,r)\r\n{\n if(!v){\n return '';\n }\n if(r.data.item_image_from_hk){\n var url = baseURL.split('/');\n url.pop();\n url = url.join('/');\n return '<img src=\"' + url + '/hk.php/Images/Thumb/150x150/' + r.data.item_image_id + '/' + v + '\" width=\"150\" height=\"100\" />'; \n }\r\n return '<img src=\"' + baseURL + '/Images/Thumb/150x150/' + r.data.item_image_id + '/' + v + '\" width=\"150\" height=\"100\" />';\r\n}",
+ "|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/50/{1}/{2}\" height=\"50\">', baseURL, v, r.data.item_image_filename); }",
"|xns": "Roo.grid"
},
{
},
{
"listeners": {
- "click": "function (_self, e)\n{\n //_this.dialog.hide();\n}"
+ "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}"
},
"*prop": "buttons[]",
"text": "Create New",