1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.AdminGeoCityEdit = {
10 '59716c97497eb9694541f7c3d37b1a4d' :"Country",
11 '3c1df4260ce594cb5594696461087f2f' :"Select Country",
12 '43ccafccb532cc57c20bc05a36aad7b7' :"Add / Edit City",
13 '4a39a1ff7adda1ac731be5bf500d0812' :"Select Division",
14 '45c10605e0a492fbe7a3eac258cd1e81' :"Time Zone",
15 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
16 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
17 '25f75488c91cb6c3bab92672e479619f' :"Postal Code",
18 '49ee3087348e8d44e1feda1917443987' :"Name",
19 'c9cc8cce247e49bae79f15173ce97354' :"Save",
20 '3025cdaab2deb0bb2cd642449e570833' :"Division"
23 'country_name_qtip' : '3c1df4260ce594cb5594696461087f2f' /* Select Country */ ,
24 'division_id_name_qtip' : '4a39a1ff7adda1ac731be5bf500d0812' /* Select Division */ ,
25 'time_zone_fieldLabel' : '45c10605e0a492fbe7a3eac258cd1e81' /* Time Zone */ ,
26 'country_name_emptyText' : '3c1df4260ce594cb5594696461087f2f' /* Select Country */ ,
27 'postal_code_fieldLabel' : '25f75488c91cb6c3bab92672e479619f' /* Postal Code */ ,
28 'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
29 'country_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
30 'division_id_name_emptyText' : '4a39a1ff7adda1ac731be5bf500d0812' /* Select Division */ ,
31 'division_id_name_fieldLabel' : '3025cdaab2deb0bb2cd642449e570833' /* Division */ ,
32 'division_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
33 'country_name_fieldLabel' : '59716c97497eb9694541f7c3d37b1a4d' /* Country */
39 show : function(data, cb)
47 this.dialog.show(this.data._el);
50 this.form.setValues(data);
51 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
59 this.dialog = Roo.factory({
60 xtype : 'LayoutDialog',
66 title : _this._strings['43ccafccb532cc57c20bc05a36aad7b7'] /* Add / Edit City */,
71 xtype : 'LayoutRegion',
78 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
80 click : function (_self, e)
90 text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
92 click : function (_self, e)
94 _this.form.doAction("submit");
103 xtype : 'ContentPanel',
112 style : 'margin:10px;',
113 url : baseURL + '/Roo/geoip_city.php',
115 actioncomplete : function(_self, action)
117 if (action.type == 'setdata') {
120 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
124 if (action.type == 'load') {
126 _this.dialog.el.unmask();
128 _this.data = action.result.data;
132 if (action.type =='submit') {
134 _this.dialog.el.unmask();
137 if (_this.callback) {
138 _this.callback.call(_this, _this.form.getValues());
144 rendered : function (form)
155 fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
163 fieldLabel : _this._strings['25f75488c91cb6c3bab92672e479619f'] /* Postal Code */,
164 name : 'postal_code',
171 fieldLabel : _this._strings['45c10605e0a492fbe7a3eac258cd1e81'] /* Time Zone */,
181 displayField : 'lval',
183 emptyText : _this._strings['3c1df4260ce594cb5594696461087f2f'] /* Select Country */,
184 fieldLabel : _this._strings['59716c97497eb9694541f7c3d37b1a4d'] /* Country */,
185 forceSelection : true,
186 hiddenName : 'country',
188 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
190 name : 'country_name',
192 qtip : _this._strings['3c1df4260ce594cb5594696461087f2f'] /* Select Country */,
193 queryParam : 'query[name]',
194 selectOnFocus : true,
195 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{lval}</b> </div>',
196 triggerAction : 'all',
205 sortInfo : { direction : 'ASC', field: 'lval' },
207 beforeload : function (_self, o){
208 o.params = o.params || {};
210 o.params.ltype = 'c',
211 o.params.inlang = 'en';
220 url : baseURL + '/Roo/i18n.php',
225 xtype : 'JsonReader',
244 "name":"country_name",
250 totalProperty : 'total',
259 displayField : 'name',
261 emptyText : _this._strings['4a39a1ff7adda1ac731be5bf500d0812'] /* Select Division */,
262 fieldLabel : _this._strings['3025cdaab2deb0bb2cd642449e570833'] /* Division */,
263 forceSelection : true,
264 hiddenName : 'division_id',
266 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
268 name : 'division_id_name',
270 qtip : _this._strings['4a39a1ff7adda1ac731be5bf500d0812'] /* Select Division */,
271 queryParam : 'query[name]',
272 selectOnFocus : true,
273 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
274 triggerAction : 'all',
279 beforequery : function (combo, query, forceAll, cancel, e)
281 var country = _this.form.findField('country').getValue();
283 if(!country.length) {
284 Roo.MessageBox.alert('Error', 'Please select a country');
294 sortInfo : { direction : 'ASC', field: 'name' },
296 beforeload : function (_self, o){
297 o.params = o.params || {};
299 var country = _this.form.findField('country').getValue();
301 if(!country.length) {
305 o.params.country = country;
313 url : baseURL + '/Roo/geoip_division.php',
318 xtype : 'JsonReader',
333 "name":"country_name",
339 totalProperty : 'total',