{ "id": "roo-file-259", "name": "Pman.Dialog.XtupleLocation", "parent": "", "title": "", "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleLocation.bjs", "items": [ { "closable": false, "collapsible": false, "height": 200, "modal": true, "resizable": false, "title": "Edit / Create location", "width": 500, "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 \n if (_this.data.location_id) {\n this.load({ method: 'GET', params: { '_id' : _this.data.location_id }});\n }\n \n return;\n }\n if (action.type == 'load') {\n \n return;\n }\n if (action.type =='submit') {\n \n \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" }, "method": "POST", "style": "margin:10px;", "xtype": "Form", "|url": "baseURL + '/Roo/location.php'", "|xns": "Roo.form", "items": [ { "fieldLabel": "Name", "name": "location_name", "width": 300, "xtype": "TextField", "|xns": "Roo.form" }, { "fieldLabel": "Description", "name": "location_descrip", "width": 300, "xtype": "TextField", "|xns": "Roo.form" }, { "allowBlank": false, "displayField": "cust_name", "editable": true, "emptyText": "Select custinfo", "fieldLabel": "Customer", "forceSelection": true, "hiddenName": "location_cust_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "location_cust_id_cust_name", "pageSize": 20, "qtip": "Select custinfo", "queryParam": "query[cust_name]", "selectOnFocus": true, "tpl": "
{cust_name} ({cust_number})
", "triggerAction": "all", "valueField": "cust_id", "width": 300, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'cust_name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|xns": "Roo.data", "|url": "baseURL + '/Roo/custinfo.php'" }, { "*prop": "reader", "xtype": "JsonReader", "|xns": "Roo.data", "id": "id", "root": "data", "totalProperty": "total", "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"cust_name\",\"type\":\"string\"}]" } ] } ] }, { "name": "location_id", "xtype": "Hidden", "|xns": "Roo.form" } ] } ] }, { "listeners": { "click": "function (_self, e)\n{\n _this.dialog.hide();\n}" }, "*prop": "buttons[]", "text": "Cancel", "xtype": "Button", "|xns": "Roo" }, { "listeners": { "click": "function (_self, e)\n{\n // do some checks?\n \n \n \n _this.form.doAction(\"submit\");\n\n}" }, "*prop": "buttons[]", "text": "Save", "xtype": "Button", "|xns": "Roo" } ] } ], "permname": "", "modOrder": "001" }