{
"id": "roo-file-0",
"name": "Pman.Dialog.XtupleAddress",
"parent": "Pman",
"title": "",
"path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleAddress.bjs",
"items": [
{
".builderCfg": "{\"cols\":[{\"table\":\"addr\",\"column\":\"addr_id\",\"columnshort\":\"addr_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\",\"display\":\"addr_id\"},{\"table\":\"addr\",\"column\":\"addr_active\",\"columnshort\":\"addr_active\",\"ctype\":\"bool\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_line1\",\"columnshort\":\"addr_line1\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_line2\",\"columnshort\":\"addr_line2\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_line3\",\"columnshort\":\"addr_line3\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_city\",\"columnshort\":\"addr_city\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_state\",\"columnshort\":\"addr_state\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_postalcode\",\"columnshort\":\"addr_postalcode\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_country\",\"columnshort\":\"addr_country\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_notes\",\"columnshort\":\"addr_notes\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"addr\",\"column\":\"addr_number\",\"columnshort\":\"addr_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}],\"cols_ex\":[\"addr_id\"],\"table\":\"addr\",\"xtype\":\"LayoutDialog\",\"|xns\":\"Roo\"}",
"closable": false,
"collapsible": false,
"height": 400,
"modal": true,
"resizable": false,
"title": "Edit Address",
"width": 500,
"xtype": "LayoutDialog",
"|xns": "Roo",
"items": [
{
"|xns": "Roo",
"xtype": "LayoutRegion",
"*prop": "center"
},
{
"region": "center",
"xtype": "ContentPanel",
"|xns": "Roo",
"items": [
{
"|xns": "Roo",
"xtype": "Toolbar",
"*prop": "toolbar",
"items": [
{
"|xns": "Roo.Toolbar",
"xtype": "Fill"
},
{
"listeners": {
"click": "function()\n{\n var id = _this.form.findField('addr_id').getValue() *1;\n if (!id) {\n Roo.MessageBox.alert(\"Error\", \"You can not delete this, you have not created it yet\");\n return;\n }\n \n \n Roo.MessageBox.confirm(\"Confirm\", \"You will only be able to delete this if it is not referenced anywhere
\"+\n \", are you sure you want to try that?\",\n function (res) {\n if(res!='yes') {\n return;\n \n }\n new Pman.Request({\n method: 'POST',\n url: baseURL+ '/Roo/addr',\n params : {\n _delete : id\n },\n success : function() {\n _this.callback({ addr_id : 0, addr_line1 : '' });\n _this.dialog.hide();\n }\n });\n });\n \n \n \n}\n "
},
"cls": "x-btn-text-icon",
"text": "Delete",
"xtype": "Button",
"|icon": "rootURL + '/Pman/templates/images/trash.gif'",
"|xns": "Roo.Toolbar"
}
]
},
{
"listeners": {
"|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n if (_this.data.addr_id) { \n this.load({ method: 'GET', params: { '_id' : _this.data.addr_id }});\n }\n return;\n }\n if (action.type == 'load') {\n return;\n }\n if (action.type =='submit') {\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.form.setValues(action.result.data);\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/addr.php'",
"|xns": "Roo.form",
"items": [
{
"listeners": {
"keyup": "function (_self, e)\n{\n _this.form.findField('addr_number').sync();\n}"
},
"allowBlank": false,
"fieldLabel": "Line 1",
"name": "addr_line1",
"width": 300,
"xtype": "TextField",
"|xns": "Roo.form"
},
{
"fieldLabel": "Line 2",
"name": "addr_line2",
"width": 300,
"xtype": "TextField",
"|xns": "Roo.form"
},
{
"fieldLabel": "Line 3",
"name": "addr_line3",
"width": 300,
"xtype": "TextField",
"|xns": "Roo.form"
},
{
"fieldLabel": "City",
"name": "addr_city",
"width": 300,
"xtype": "TextField",
"|xns": "Roo.form"
},
{
"allowBlank": true,
"displayField": "addr_state",
"editable": true,
"emptyText": "State",
"fieldLabel": "State",
"listWidth": 400,
"loadingText": "Searching...",
"minChars": 2,
"name": "addr_state",
"qtip": "Select State",
"queryParam": "query[addr_state]",
"selectOnFocus": true,
"tpl": "