Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleLocation.bjs
1 {
2     "id": "roo-file-259",
3     "name": "Pman.Dialog.XtupleLocation",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleLocation.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 200,
12             "modal": true,
13             "resizable": false,
14             "title": "Edit / Create location",
15             "width": 500,
16             "xtype": "LayoutDialog",
17             "|xns": "Roo",
18             "items": [
19                 {
20                     "|xns": "Roo",
21                     "xtype": "LayoutRegion",
22                     "*prop": "center"
23                 },
24                 {
25                     "region": "center",
26                     "xtype": "ContentPanel",
27                     "|xns": "Roo",
28                     "items": [
29                         {
30                             "listeners": {
31                                 "|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",
32                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
33                             },
34                             "method": "POST",
35                             "style": "margin:10px;",
36                             "xtype": "Form",
37                             "|url": "baseURL + '/Roo/location.php'",
38                             "|xns": "Roo.form",
39                             "items": [
40                                 {
41                                     "fieldLabel": "Name",
42                                     "name": "location_name",
43                                     "width": 300,
44                                     "xtype": "TextField",
45                                     "|xns": "Roo.form"
46                                 },
47                                 {
48                                     "fieldLabel": "Description",
49                                     "name": "location_descrip",
50                                     "width": 300,
51                                     "xtype": "TextField",
52                                     "|xns": "Roo.form"
53                                 },
54                                 {
55                                     "allowBlank": false,
56                                     "displayField": "cust_name",
57                                     "editable": true,
58                                     "emptyText": "Select custinfo",
59                                     "fieldLabel": "Customer",
60                                     "forceSelection": true,
61                                     "hiddenName": "location_cust_id",
62                                     "listWidth": 400,
63                                     "loadingText": "Searching...",
64                                     "minChars": 2,
65                                     "name": "location_cust_id_cust_name",
66                                     "pageSize": 20,
67                                     "qtip": "Select custinfo",
68                                     "queryParam": "query[cust_name]",
69                                     "selectOnFocus": true,
70                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{cust_name}</b> ({cust_number}) </div>",
71                                     "triggerAction": "all",
72                                     "valueField": "cust_id",
73                                     "width": 300,
74                                     "xtype": "ComboBox",
75                                     "|xns": "Roo.form",
76                                     "items": [
77                                         {
78                                             "listeners": {
79                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
80                                             },
81                                             "*prop": "store",
82                                             "remoteSort": true,
83                                             "xtype": "Store",
84                                             "|sortInfo": "{ direction : 'ASC', field: 'cust_name' }",
85                                             "|xns": "Roo.data",
86                                             "items": [
87                                                 {
88                                                     "*prop": "proxy",
89                                                     "xtype": "HttpProxy",
90                                                     "method": "GET",
91                                                     "|xns": "Roo.data",
92                                                     "|url": "baseURL + '/Roo/custinfo.php'"
93                                                 },
94                                                 {
95                                                     "*prop": "reader",
96                                                     "xtype": "JsonReader",
97                                                     "|xns": "Roo.data",
98                                                     "id": "id",
99                                                     "root": "data",
100                                                     "totalProperty": "total",
101                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"cust_name\",\"type\":\"string\"}]"
102                                                 }
103                                             ]
104                                         }
105                                     ]
106                                 },
107                                 {
108                                     "name": "location_id",
109                                     "xtype": "Hidden",
110                                     "|xns": "Roo.form"
111                                 }
112                             ]
113                         }
114                     ]
115                 },
116                 {
117                     "listeners": {
118                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
119                     },
120                     "*prop": "buttons[]",
121                     "text": "Cancel",
122                     "xtype": "Button",
123                     "|xns": "Roo"
124                 },
125                 {
126                     "listeners": {
127                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n \n    _this.form.doAction(\"submit\");\n\n}"
128                     },
129                     "*prop": "buttons[]",
130                     "text": "Save",
131                     "xtype": "Button",
132                     "|xns": "Roo"
133                 }
134             ]
135         }
136     ],
137     "permname": "",
138     "modOrder": "001"
139 }