{ "id": "roo-file-36", "name": "Pman.Dialog.XtupleShipmentNew", "parent": false, "title": "", "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleShipmentNew.bjs", "items": [ { "listeners": { "show": "function (_self)\n{\n _this.form.findField('shiphead_location_id').focus();\n}" }, "closable": false, "height": 130, "modal": true, "resizable": false, "title": "Create new Shipment", "width": 500, "xtype": "LayoutDialog", "|xns": "Roo", "items": [ { "|xns": "Roo", "xtype": "LayoutRegion", "*prop": "center" }, { "region": "center", "xtype": "ContentPanel", "|xns": "Roo", "items": [ { "listeners": { "rendered": "function (form)\n{\n _this.form = form;\n}", "actioncomplete": "function (_self, action)\n{\n if (action.type == 'setdata') {\n // see if there are multiple possilbe targets\n new Pman.Request({\n url : baseURL + '/Roo/cohead',\n method : 'GET',\n params : {\n cohead_id : _this.data.shiphead_order_id,\n _has_multiple_ship : 1\n },\n success : function(res) {\n // if there is one row returned, then assign values, and press OK\n // otherwise.. cary on..\n if (res.total === 1) {\n _this.form.setValues( {\n \n shiphead_location_id : res.data[0].coitem_location_src,\n shiphead_location_id_location_name : res.data[0].coitem_location_src_name, \n shiphead_shipto_id : res.data[0].coitem_shipto_id,\n shiphead_shipto_id_shipto_name : res.data[0].coitem_shipto_id_name\n });\n _this.okButton.fireEvent('click');\n }\n \n },\n failure : function(res) {\n\n Roo.MessageBox.alert(\"Error\", res.errorMsg);\n _this.dialog.hide();\n \n }\n });\n \n \n }\n \n}" }, "xtype": "Form", "|xns": "Roo.form", "items": [ { "allowBlank": false, "alwaysQuery": true, "displayField": "location_name", "editable": false, "emptyText": "Select location", "fieldLabel": "From Location", "forceSelection": true, "hiddenName": "shiphead_location_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "shiphead_location_id_location_name", "pageSize": 20, "qtip": "Select location", "queryParam": "", "selectOnFocus": true, "tpl": "