Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtuplePurchaseOrderEdit.bjs
1 {
2     "id": "roo-file-15",
3     "name": "Pman.Dialog.XtuplePurchaseOrderEdit",
4     "parent": "",
5     "title": "",
6     "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtuplePurchaseOrderEdit.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "show": "function () {\n       this.layout.getRegion('center').showPanel(0);\n}"
11             },
12             "closable": false,
13             "collapsible": false,
14             "height": 200,
15             "modal": true,
16             "resizable": false,
17             "title": "Change Location",
18             "width": 400,
19             "xtype": "LayoutDialog",
20             "|xns": "Roo",
21             "items": [
22                 {
23                     "|xns": "Roo",
24                     "xtype": "LayoutRegion",
25                     "*prop": "center"
26                 },
27                 {
28                     "region": "center",
29                     "xtype": "ContentPanel",
30                     "|xns": "Roo",
31                     "items": [
32                         {
33                             "listeners": {
34                                 "|actioncomplete": "function(_self,action)\n{\n    if (action.type == 'setdata') {\n        if(_this.data.pohead_id){\n           _this.dialog.el.mask(\"Loading\");\n           this.load({ method: 'GET', params: { '_id' : _this.data.pohead_id }});\n           return;\n       }\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\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",
35                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
36                             },
37                             "method": "POST",
38                             "style": "margin:10px;",
39                             "xtype": "Form",
40                             "|url": "baseURL + '/Roo/pohead.php'",
41                             "|xns": "Roo.form",
42                             "items": [
43                                 {
44                                     "fieldLabel": "PO#",
45                                     "name": "pohead_number",
46                                     "readOnly": true,
47                                     "width": 200,
48                                     "xtype": "TextField",
49                                     "|xns": "Roo.form"
50                                 },
51                                 {
52                                     "allowBlank": false,
53                                     "displayField": "fname",
54                                     "editable": false,
55                                     "fieldLabel": "Change Type",
56                                     "hiddenName": "change_type",
57                                     "listWidth": 400,
58                                     "mode": "local",
59                                     "name": "change_type_name",
60                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{fname}</b> </div>",
61                                     "triggerAction": "all",
62                                     "value": "A",
63                                     "valueField": "ftype",
64                                     "width": 200,
65                                     "xtype": "ComboBox",
66                                     "|xns": "Roo.form",
67                                     "items": [
68                                         {
69                                             "*prop": "store",
70                                             "xtype": "SimpleStore",
71                                             "|data": "[ \n    [ 'A', \"Change All Location\"],\n    [ 'E', \"Change The Location Of PO And un-signed Item\"]\n    \n]\n",
72                                             "|fields": "[  'ftype', 'fname']",
73                                             "|xns": "Roo.data"
74                                         }
75                                     ]
76                                 },
77                                 {
78                                     "allowBlank": false,
79                                     "displayField": "location_name",
80                                     "editable": true,
81                                     "emptyText": "Select a location",
82                                     "fieldLabel": "Location",
83                                     "forceSelection": true,
84                                     "hiddenName": "pohead_location_id",
85                                     "listWidth": 400,
86                                     "loadingText": "Searching...",
87                                     "minChars": 2,
88                                     "name": "pohead_location_id_location_name",
89                                     "pageSize": 200,
90                                     "qtip": "Select terms",
91                                     "queryParam": "query[location_name]",
92                                     "selectOnFocus": true,
93                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{location_name}</b> </div>",
94                                     "triggerAction": "all",
95                                     "typeAhead": false,
96                                     "valueField": "location_id",
97                                     "width": 200,
98                                     "xtype": "ComboBox",
99                                     "|xns": "Roo.form",
100                                     "items": [
101                                         {
102                                             "listeners": {
103                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n     o.params.location_netable = 1;\n}\n"
104                                             },
105                                             "*prop": "store",
106                                             "remoteSort": true,
107                                             "xtype": "Store",
108                                             "|sortInfo": "{ direction : 'ASC', field: 'location_name' }",
109                                             "|xns": "Roo.data",
110                                             "items": [
111                                                 {
112                                                     "*prop": "proxy",
113                                                     "method": "GET",
114                                                     "xtype": "HttpProxy",
115                                                     "|url": "baseURL + '/Roo/location.php'",
116                                                     "|xns": "Roo.data"
117                                                 },
118                                                 {
119                                                     "*prop": "reader",
120                                                     "id": "location_id",
121                                                     "root": "data",
122                                                     "totalProperty": "total",
123                                                     "xtype": "JsonReader",
124                                                     "|fields": "[{\"name\":\"location_id\",\"type\":\"int\"},\"location_name\"]",
125                                                     "|xns": "Roo.data"
126                                                 }
127                                             ]
128                                         }
129                                     ]
130                                 },
131                                 {
132                                     "name": "pohead_id",
133                                     "xtype": "Hidden",
134                                     "|xns": "Roo.form"
135                                 }
136                             ]
137                         }
138                     ]
139                 },
140                 {
141                     "listeners": {
142                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
143                     },
144                     "*prop": "buttons[]",
145                     "text": "Cancel",
146                     "xtype": "Button",
147                     "|xns": "Roo"
148                 },
149                 {
150                     "listeners": {
151                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n   // _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
152                     },
153                     "*prop": "buttons[]",
154                     "text": "Save",
155                     "xtype": "Button",
156                     "|xns": "Roo"
157                 }
158             ]
159         }
160     ],
161     "permname": "",
162     "modOrder": "001"
163 }