{ "id": "roo-file-18", "name": "Pman.Dialog.XtupleProdcat", "parent": "", "title": "", "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleProdcat.bjs", "items": [ { "closable": false, "collapsible": false, "height": 400, "modal": true, "resizable": false, "title": "Edit / Create Product Category", "width": 450, "xtype": "LayoutDialog", "|xns": "Roo", "items": [ { "|xns": "Roo", "xtype": "LayoutRegion", "*prop": "center" }, { "region": "center", "xtype": "ContentPanel", "|xns": "Roo", "items": [ { "listeners": { "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n if(_this.data.prodcat_id){\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.prodcat_id, '_with_salesaccnt' : 1 }}); \n }\n \n _this.form.findField('salesaccnt_sales_accnt_id_descrip').setValue('');\n _this.form.findField('salesaccnt_credit_accnt_id_descrip').setValue('');\n _this.form.findField('salesaccnt_cos_accnt_id_descrip').setValue('');\n return;\n }\n if (action.type == 'load') {\n _this.dialog.el.unmask();\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n", "|rendered": "function (form)\n{\n _this.form= form;\n}\n" }, "labelWidth": 150, "method": "POST", "style": "margin:10px;", "xtype": "Form", "|url": "baseURL + '/Roo/Prodcat.php'", "|xns": "Roo.form", "items": [ { "legend": "Product Category Detail", "style": "width:380px", "xtype": "FieldSet", "|xns": "Roo.form", "items": [ { "allowBlank": false, "fieldLabel": "Category Code", "name": "prodcat_code", "width": 200, "xtype": "TextField", "|xns": "Roo.form" }, { "allowBlank": false, "fieldLabel": "Category Description", "name": "prodcat_descrip", "width": 200, "xtype": "TextField", "|xns": "Roo.form" } ] }, { "legend": "Account Setting", "style": "width:380px", "xtype": "FieldSet", "|xns": "Roo.form", "items": [ { "labelWidth": 150, "xtype": "Row", "|xns": "Roo.form", "items": [ { "listeners": { "beforeselect": "function (combo, record, index)\n{\n _this.form.findField('salesaccnt_sales_accnt_id_descrip').setValue(record.data.accnt_descrip);\n}" }, "allowBlank": false, "displayField": "accnt_name", "editable": true, "emptyText": "Select Account", "fieldLabel": "Inventory Sales Account", "forceSelection": true, "hiddenName": "salesaccnt_sales_accnt_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "salesaccnt_sales_accnt_id_name", "pageSize": 20, "qtip": "Select Account", "queryParam": "search[name]", "selectOnFocus": true, "tpl": "