{
"name" : "Pman.Dialog.XtupleAddress",
"parent" : "Pman",
"title" : "",
"path" : "/home/alan/gitlive/Pman.Xtuple/Pman.Dialog.XtupleAddress.bjs",
"permname" : "",
"modOrder" : "001",
"strings" : {
"59716c97497eb9694541f7c3d37b1a4d" : "Country",
"3c1df4260ce594cb5594696461087f2f" : "Select Country",
"0dbd2559b7f2c43a6e5f0a649c4b172a" : "Edit Address",
"46a2a41cc6e552044816a2d04634545d" : "State",
"1243daf593fa297e07ab03bf06d925af" : "Searching...",
"ea4788705e6873b424c65e91c2846b19" : "Cancel",
"f2a6c498fb90ee345d997f888fce3b18" : "Delete",
"c9cc8cce247e49bae79f15173ce97354" : "Save",
"be2933038f93e25262400220080c111f" : "Select State"
},
"items" : [
{
"modal" : true,
"collapsible" : false,
"title" : "Edit Address",
"xtype" : "LayoutDialog",
"width" : 500,
"$ xns" : "Roo",
"closable" : false,
"resizable" : false,
"height" : 400,
"# 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\"}",
"items" : [
{
"xtype" : "LayoutRegion",
"$ xns" : "Roo",
"* prop" : "center"
},
{
"region" : "center",
"xtype" : "ContentPanel",
"$ xns" : "Roo",
"items" : [
{
"xtype" : "Toolbar",
"$ xns" : "Roo",
"* prop" : "toolbar",
"items" : [
{
"xtype" : "Fill",
"$ xns" : "Roo.Toolbar"
},
{
"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 "
},
"text" : "Delete",
"xtype" : "Button",
"cls" : "x-btn-text-icon",
"$ 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"
},
"$ url" : "baseURL + '/Roo/addr.php'",
"xtype" : "Form",
"method" : "POST",
"style" : "margin:10px;",
"$ xns" : "Roo.form",
"items" : [
{
"listeners" : {
"keyup" : "function (_self, e)\n{\n _this.form.findField('addr_number').sync();\n}"
},
"fieldLabel" : "Line 1",
"xtype" : "TextField",
"allowBlank" : false,
"width" : 300,
"$ xns" : "Roo.form",
"name" : "addr_line1"
},
{
"fieldLabel" : "Line 2",
"xtype" : "TextField",
"width" : 300,
"$ xns" : "Roo.form",
"name" : "addr_line2"
},
{
"fieldLabel" : "Line 3",
"xtype" : "TextField",
"width" : 300,
"$ xns" : "Roo.form",
"name" : "addr_line3"
},
{
"fieldLabel" : "City",
"xtype" : "TextField",
"width" : 300,
"$ xns" : "Roo.form",
"name" : "addr_city"
},
{
"listWidth" : 400,
"triggerAction" : "all",
"fieldLabel" : "State",
"selectOnFocus" : true,
"displayField" : "addr_state",
"emptyText" : "State",
"minChars" : 2,
"valueField" : "addr_state",
"xtype" : "ComboBox",
"allowBlank" : true,
"typeAhead" : false,
"editable" : true,
"width" : 200,
"$ xns" : "Roo.form",
"name" : "addr_state",
"qtip" : "Select State",
"queryParam" : "query[addr_state]",
"tpl" : "