Fix #5702 - Supplier contact details - extra fields
[Pman.Admin] / Pman.Dialog.AdminGeoCityEdit.bjs
1 {
2  "name" : "Pman.Dialog.AdminGeoCityEdit",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/edward/gitlive/Pman.Admin/Pman.Dialog.AdminGeoCityEdit.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "59716c97497eb9694541f7c3d37b1a4d" : "Country",
10   "3c1df4260ce594cb5594696461087f2f" : "Select Country",
11   "43ccafccb532cc57c20bc05a36aad7b7" : "Add / Edit City",
12   "4a39a1ff7adda1ac731be5bf500d0812" : "Select Division",
13   "45c10605e0a492fbe7a3eac258cd1e81" : "Time Zone",
14   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
15   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
16   "25f75488c91cb6c3bab92672e479619f" : "Postal Code",
17   "49ee3087348e8d44e1feda1917443987" : "Name",
18   "c9cc8cce247e49bae79f15173ce97354" : "Save",
19   "3025cdaab2deb0bb2cd642449e570833" : "Division"
20  },
21  "named_strings" : {
22   "country_name_qtip" : "3c1df4260ce594cb5594696461087f2f",
23   "division_id_name_qtip" : "4a39a1ff7adda1ac731be5bf500d0812",
24   "time_zone_fieldLabel" : "45c10605e0a492fbe7a3eac258cd1e81",
25   "country_name_emptyText" : "3c1df4260ce594cb5594696461087f2f",
26   "postal_code_fieldLabel" : "25f75488c91cb6c3bab92672e479619f",
27   "name_fieldLabel" : "49ee3087348e8d44e1feda1917443987",
28   "country_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
29   "division_id_name_emptyText" : "4a39a1ff7adda1ac731be5bf500d0812",
30   "division_id_name_fieldLabel" : "3025cdaab2deb0bb2cd642449e570833",
31   "division_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
32   "country_name_fieldLabel" : "59716c97497eb9694541f7c3d37b1a4d"
33  },
34  "items" : [
35   {
36    "modal" : true,
37    "collapsible" : false,
38    "title" : "Add / Edit City",
39    "xtype" : "LayoutDialog",
40    "width" : 400,
41    "$ xns" : "Roo",
42    "closable" : false,
43    "resizable" : false,
44    "height" : 250,
45    "items" : [
46     {
47      "xtype" : "LayoutRegion",
48      "$ xns" : "Roo",
49      "* prop" : "center"
50     },
51     {
52      "region" : "center",
53      "xtype" : "ContentPanel",
54      "$ xns" : "Roo",
55      "items" : [
56       {
57        "listeners" : {
58         "|actioncomplete" : "function(_self, action)\n{\n    if (action.type == 'setdata') {\n        \n        if(_this.data.id) {\n            this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n        }\n        return;\n    }\n    if (action.type == 'load') {\n        \n        _this.dialog.el.unmask();\n        \n        _this.data = action.result.data;\n        \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",
59         "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
60        },
61        "$ url" : "baseURL + '/Roo/geoip_city.php'",
62        "style" : "margin:10px;",
63        "method" : "POST",
64        "xtype" : "Form",
65        "labelWidth" : 100,
66        "$ xns" : "Roo.form",
67        "items" : [
68         {
69          "Boolean allowBlank" : false,
70          "fieldLabel" : "Name",
71          "xtype" : "TextField",
72          "width" : 200,
73          "$ xns" : "Roo.form",
74          "name" : "name"
75         },
76         {
77          "fieldLabel" : "Postal Code",
78          "xtype" : "TextField",
79          "width" : 200,
80          "$ xns" : "Roo.form",
81          "name" : "postal_code"
82         },
83         {
84          "fieldLabel" : "Time Zone",
85          "xtype" : "TextField",
86          "width" : 200,
87          "$ xns" : "Roo.form",
88          "name" : "time_zone"
89         },
90         {
91          "alwaysQuery" : true,
92          "listWidth" : 400,
93          "triggerAction" : "all",
94          "fieldLabel" : "Country",
95          "forceSelection" : true,
96          "selectOnFocus" : true,
97          "pageSize" : 20,
98          "displayField" : "lval",
99          "emptyText" : "Select Country",
100          "hiddenName" : "country",
101          "minChars" : 2,
102          "valueField" : "lkey",
103          "xtype" : "ComboBox",
104          "allowBlank" : false,
105          "typeAhead" : true,
106          "editable" : true,
107          "width" : 200,
108          "$ xns" : "Roo.form",
109          "name" : "country_name",
110          "qtip" : "Select Country",
111          "queryParam" : "query[name]",
112          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{lval}</b> </div>",
113          "loadingText" : "Searching...",
114          "items" : [
115           {
116            "listeners" : {
117             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    o.params.ltype = 'c',\n    o.params.inlang = 'en';\n    o.is_active = 1;\n}\n"
118            },
119            "xtype" : "Store",
120            "remoteSort" : true,
121            "$ sortInfo" : "{ direction : 'ASC', field: 'lval' }",
122            "$ xns" : "Roo.data",
123            "* prop" : "store",
124            "items" : [
125             {
126              "$ url" : "baseURL + '/Roo/i18n.php'",
127              "xtype" : "HttpProxy",
128              "method" : "GET",
129              "$ xns" : "Roo.data",
130              "* prop" : "proxy"
131             },
132             {
133              "id" : "id",
134              "root" : "data",
135              "xtype" : "JsonReader",
136              "$ xns" : "Roo.data",
137              "$ fields" : "[\n    {\n        \"name\":\"id\",\n        \"type\":\"int\"\n    },\n    {\n        \"name\":\"code\",\n        \"type\":\"string\"\n    },\n    {\n        \"name\":\"name\",\n        \"type\":\"string\"\n    },\n    {\n        \"name\":\"country\",\n        \"type\":\"string\"\n    },\n    {\n        \"name\":\"country_name\",\n        \"type\":\"string\"\n    }\n]",
138              "* prop" : "reader",
139              "totalProperty" : "total"
140             }
141            ]
142           }
143          ]
144         },
145         {
146          "listeners" : {
147           "beforequery" : "function (combo, query, forceAll, cancel, e)\n{\n    var country = _this.form.findField('country').getValue();\n    \n    if(!country.length) {\n        Roo.MessageBox.alert('Error', 'Please select a country');\n        return false;\n    }\n}"
148          },
149          "alwaysQuery" : true,
150          "listWidth" : 400,
151          "triggerAction" : "all",
152          "fieldLabel" : "Division",
153          "forceSelection" : true,
154          "selectOnFocus" : true,
155          "pageSize" : 20,
156          "displayField" : "name",
157          "emptyText" : "Select Division",
158          "hiddenName" : "division_id",
159          "minChars" : 2,
160          "valueField" : "id",
161          "xtype" : "ComboBox",
162          "typeAhead" : true,
163          "editable" : true,
164          "width" : 200,
165          "$ xns" : "Roo.form",
166          "name" : "division_id_name",
167          "qtip" : "Select Division",
168          "queryParam" : "query[name]",
169          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
170          "loadingText" : "Searching...",
171          "items" : [
172           {
173            "listeners" : {
174             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n    var country = _this.form.findField('country').getValue();\n    \n    if(!country.length) {\n        return false;\n    }\n    \n    o.params.country = country;\n}\n"
175            },
176            "xtype" : "Store",
177            "remoteSort" : true,
178            "$ sortInfo" : "{ direction : 'ASC', field: 'name' }",
179            "$ xns" : "Roo.data",
180            "* prop" : "store",
181            "items" : [
182             {
183              "$ url" : "baseURL + '/Roo/geoip_division.php'",
184              "method" : "GET",
185              "xtype" : "HttpProxy",
186              "$ xns" : "Roo.data",
187              "* prop" : "proxy"
188             },
189             {
190              "id" : "id",
191              "root" : "data",
192              "xtype" : "JsonReader",
193              "$ xns" : "Roo.data",
194              "$ fields" : "[\n    {\n        \"name\":\"id\",\n        \"type\":\"int\"\n    },\n    {\n        \"name\":\"name\",\n        \"type\":\"string\"\n    },\n    {\n        \"name\":\"country\",\n        \"type\":\"string\"\n    },\n    {\n        \"name\":\"country_name\",\n        \"type\":\"string\"\n    }\n]",
195              "* prop" : "reader",
196              "totalProperty" : "total"
197             }
198            ]
199           }
200          ]
201         },
202         {
203          "xtype" : "Hidden",
204          "$ xns" : "Roo.form",
205          "name" : "id"
206         }
207        ]
208       }
209      ]
210     },
211     {
212      "listeners" : {
213       "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
214      },
215      "text" : "Cancel",
216      "xtype" : "Button",
217      "$ xns" : "Roo",
218      "* prop" : "buttons[]"
219     },
220     {
221      "listeners" : {
222       "click" : "function (_self, e)\n{\n    _this.form.doAction(\"submit\");\n}"
223      },
224      "text" : "Save",
225      "xtype" : "Button",
226      "$ xns" : "Roo",
227      "* prop" : "buttons[]"
228     }
229    ]
230   }
231  ]
232 }