2 "name" : "Pman.Tab.AdminGeoLocations",
3 "parent" : "Pman.Tab.Admin",
5 "path" : "/home/edward/gitlive/Pman.Admin/Pman.Tab.AdminGeoLocations.bjs",
9 "f2b734f9d29a7b036a5f26b229f1e918" : "Geographic Locations",
10 "59716c97497eb9694541f7c3d37b1a4d" : "Country",
11 "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
12 "fc6f97505d89fe9277965c126744647a" : "No Companies found",
13 "7dce122004969d56ae2e0245cb754d35" : "Edit",
14 "646f95b46cdc6ae59dd9f2e86bf3b598" : "Displaying Country {0} - {1} of {2}",
15 "7faaef9675ee0e8280a243a290569359" : "No. Provinces",
16 "bbf2182dd4040fabc2b5433c32fd60f4" : "Province / District",
17 "05a43538cbc752df5428fe0a71192d09" : "No. Cities",
18 "155ca6a755e25c15ad7ce45e2f638f10" : "Displaying Companies{0} - {1} of {2}",
19 "57d056ed0984166336b7879c2af3657f" : "City",
20 "c6b5d0bb9a0c3f077863fdaef9773f7c" : "Province",
21 "31311feefd4f3253ed255d109da1480b" : "No Country found",
22 "42e3bd04a7339573df51e33a0e4e8969" : "Search Province",
23 "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
24 "49ee3087348e8d44e1feda1917443987" : "Name",
25 "90fd8a29b37d805cf75af6a3809bca87" : "Search City",
26 "08b523137281088adf3cb1883c8e5627" : "Search Country",
27 "36dc0beb80c36193ac81b4f94e915e36" : "Country Name"
33 "title" : "Geographic Locations",
34 "xtype" : "NestedLayoutPanel",
38 "xtype" : "BorderLayout",
43 "xtype" : "LayoutRegion",
49 "xtype" : "LayoutRegion",
55 "xtype" : "LayoutRegion",
63 "|activate" : "function() {\n \n _this.country_panel = this;\n if (_this.country_grid) {\n _this.country_grid.footer.onClick('first');\n }\n}"
68 "xtype" : "GridPanel",
69 "fitContainer" : true,
75 "|render" : "function() \n{\n _this.country_grid = this; \n \n if (_this.country_panel.active) {\n this.footer.onClick('first');\n }\n}"
77 "autoExpandColumn" : "lval",
85 "afterselectionchange" : "function (_self)\n{\n _this.province_grid.footer.onClick('first');\n}"
87 "Boolean singleSelect" : true,
88 "xtype" : "RowSelectionModel",
94 "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n options.params.ltype = 'c',\n options.params.inlang = 'en';\n options.is_active = 1;\n \n options.params['query[name]'] = _this.country_searchBox.getValue();\n \n options.params._with_geoip_count = 1;\n}",
95 "load" : "function (_self, records, options)\n{\n _this.province_grid.footer.onClick('first');\n}"
99 "$ sortInfo" : "{ field: 'lval', direction: 'ASC' }",
100 "$ xns" : "Roo.data",
101 "* prop" : "dataSource",
104 "$ url" : "baseURL + '/Roo/i18n.php'",
106 "xtype" : "HttpProxy",
107 "$ xns" : "Roo.data",
113 "xtype" : "JsonReader",
114 "$ xns" : "Roo.data",
115 "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'lkey',\n 'type': 'string'\n },\n {\n 'name': 'inlang',\n 'type': 'string'\n },\n {\n 'name': 'lval',\n 'type': 'string'\n },\n {\n 'name': 'is_active',\n 'type': 'int'\n },\n {\n 'name': 'is_prefer',\n 'type': 'int'\n },\n {\n 'name': 'no_of_division',\n 'type': 'int'\n },\n {\n 'name': 'no_of_city',\n 'type': 'int'\n }\n]",
117 "totalProperty" : "total"
123 "xtype" : "PagingToolbar",
124 "emptyMsg" : "No Country found",
126 "displayInfo" : true,
127 "displayMsg" : "Displaying Country {0} - {1} of {2}",
133 "* prop" : "toolbar",
137 "specialkey" : "function (_self, e)\n{\n if (e.getKey() == 13) {\n _this.country_grid.footer.onClick('first');\n }\n}",
138 "render" : "function (_self)\n{\n _this.country_searchBox = _self;\n}"
140 "emptyText" : "Search Country",
141 "xtype" : "TextField",
146 "|click" : "function (_self, e)\n{\n _this.country_grid.footer.onClick('first');\n}"
149 "cls" : "x-btn-icon",
150 "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
151 "$ xns" : "Roo.Toolbar"
155 "|click" : "function (_self, e)\n{\n _this.country_searchBox.setValue('');\n _this.country_grid.footer.onClick('first');\n}"
158 "cls" : "x-btn-icon",
159 "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'",
160 "$ xns" : "Roo.Toolbar"
165 "xtype" : "ColumnModel",
167 "header" : "Country Name",
169 "$ renderer" : "function(v) \n{ \n return String.format('{0}', v ? v : ''); \n}",
170 "$ xns" : "Roo.grid",
175 "xtype" : "ColumnModel",
176 "String align" : "right",
178 "header" : "No. Provinces",
180 "$ renderer" : "function(v) \n{ \n return String.format('{0}', v ? v : ''); \n}",
181 "$ xns" : "Roo.grid",
183 "dataIndex" : "no_of_division"
186 "xtype" : "ColumnModel",
187 "String align" : "right",
189 "header" : "No. Cities",
191 "$ renderer" : "function(v) \n{ \n return String.format('{0}', v ? v : ''); \n}",
192 "$ xns" : "Roo.grid",
194 "dataIndex" : "no_of_city"
202 "|activate" : "function() {\n _this.province_panel = this;\n if (_this.province_grid) {\n _this.province_grid.footer.onClick('first');\n }\n}"
206 "title" : "Province",
207 "xtype" : "GridPanel",
208 "fitContainer" : true,
210 "tableName" : "geoip_division",
214 "rowdblclick" : "function (_self, rowIndex, e)\n{\n var s = _this.province_grid.getDataSource().getAt(rowIndex);\n \n Pman.Dialog.AdminGeoDivisionEdit.show({\n id : s.data.id\n }, function(){\n _this.province_grid.footer.onClick('refresh');\n });\n}",
215 "|render" : "function() \n{\n _this.province_grid = this; \n \n if (_this.province_panel.active) {\n this.footer.onClick('first');\n }\n}"
217 "autoExpandColumn" : "name",
220 "$ xns" : "Roo.grid",
225 "afterselectionchange" : "function (_self)\n{\n _this.city_grid.footer.onClick('first');\n}"
227 "Boolean singleSelect" : true,
228 "xtype" : "RowSelectionModel",
229 "$ xns" : "Roo.grid",
234 "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n var country = _this.country_grid.getSelectionModel().getSelected();\n \n if(!country) {\n this.removeAll();\n return false;\n }\n \n options.params.country = country.data.lkey;\n \n options.params['query[name]'] = _this.province_searchBox.getValue();\n \n options.params._with_geoip_count = 1;\n}",
235 "load" : "function (_self, records, options)\n{\n _this.city_grid.footer.onClick('first');\n}"
239 "$ sortInfo" : "{ field: 'name', direction: 'ASC' }",
240 "$ xns" : "Roo.data",
241 "* prop" : "dataSource",
244 "$ url" : "baseURL + '/Roo/geoip_division.php'",
245 "xtype" : "HttpProxy",
247 "$ xns" : "Roo.data",
253 "xtype" : "JsonReader",
254 "$ xns" : "Roo.data",
255 "$ 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 {\n 'name': 'no_of_city',\n 'type': 'string'\n }\n]",
257 "totalProperty" : "total"
263 "xtype" : "PagingToolbar",
264 "emptyMsg" : "No Companies found",
266 "displayInfo" : true,
267 "displayMsg" : "Displaying Companies{0} - {1} of {2}",
273 "* prop" : "toolbar",
277 "specialkey" : "function (_self, e)\n{\n if (e.getKey() == 13) {\n _this.province_grid.footer.onClick('first');\n }\n}",
278 "render" : "function (_self)\n{\n _this.province_searchBox = _self;\n}"
280 "emptyText" : "Search Province",
281 "xtype" : "TextField",
286 "|click" : "function (_self, e)\n{\n _this.provincegrid.footer.onClick('first');\n}"
289 "cls" : "x-btn-icon",
290 "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
291 "$ xns" : "Roo.Toolbar"
295 "|click" : "function (_self, e)\n{\n _this.province_searchBox.setValue('');\n _this.province_grid.footer.onClick('first');\n}"
298 "cls" : "x-btn-icon",
299 "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'",
300 "$ xns" : "Roo.Toolbar"
304 "$ xns" : "Roo.Toolbar"
308 "|click" : "function()\n{\n var country = _this.country_grid.getSelectionModel().getSelected();\n \n Pman.Dialog.AdminGeoDivisionEdit.show({\n id : 0,\n country : (country) ? country.data.lkey : '',\n country_name : (country) ? country.data.lval : ''\n }, function(){\n _this.country_grid.footer.onClick('refresh');\n });\n \n}\n"
312 "cls" : "x-btn-text-icon",
313 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
314 "$ xns" : "Roo.Toolbar"
318 "|click" : "function()\n{\n var s = _this.province_grid.getSelectionModel().getSelected();\n \n if (!s) {\n Roo.MessageBox.alert(\"Error\", \"Select a Row\");\n return;\n }\n \n Pman.Dialog.AdminGeoDivisionEdit.show({\n id : s.data.id\n }, function(){\n _this.province_grid.footer.onClick('refresh');\n });\n \n}"
322 "cls" : "x-btn-text-icon",
323 "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
324 "$ xns" : "Roo.Toolbar"
328 "|click" : "function()\n{\n var s = _this.province_grid.getSelectionModel().getSelected();\n \n if (!s) {\n Roo.MessageBox.alert(\"Error\", \"Select a Row\");\n return;\n }\n \n Roo.MessageBox.confirm(\n \"Confirm\", \n \"Are you sure want to delete this division\", \n function(res) {\n if(res != 'yes') {\n return;\n }\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/geoip_division',\n params : {\n _delete : s.data.id\n },\n success : function() {\n _this.country_grid.footer.onClick('refresh');\n }\n });\n }\n );\n}"
332 "cls" : "x-btn-text-icon",
333 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
334 "$ xns" : "Roo.Toolbar"
339 "xtype" : "ColumnModel",
343 "$ renderer" : "function(v) \n{ \n return String.format('{0}', v ? v : ''); \n}",
344 "$ xns" : "Roo.grid",
349 "xtype" : "ColumnModel",
350 "String align" : "right",
352 "header" : "No. Cities",
354 "$ renderer" : "function(v) \n{ \n return String.format('{0}', v ? v : ''); \n}",
355 "$ xns" : "Roo.grid",
357 "dataIndex" : "no_of_city"
365 "|activate" : "function() {\n \n _this.city_panel = this;\n if (_this.city_grid) {\n _this.city_grid.footer.onClick('first');\n }\n}"
370 "xtype" : "GridPanel",
371 "fitContainer" : true,
373 "tableName" : "geoip_city",
377 "rowdblclick" : "function (_self, rowIndex, e)\n{\n var s = _this.city_grid.getDataSource().getAt(rowIndex);\n \n Pman.Dialog.AdminGeoCityEdit.show({\n id : s.data.id\n }, function(){\n _this.city_grid.footer.onClick('refresh');\n });\n \n}",
378 "|render" : "function() \n{\n _this.city_grid = this; \n \n if (_this.city_panel.active) {\n this.footer.onClick('first');\n }\n}"
380 "autoExpandColumn" : "name",
383 "$ xns" : "Roo.grid",
388 "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n var country = _this.country_grid.getSelectionModel().getSelected();\n \n if(!country) {\n this.removeAll();\n return false;\n }\n \n options.params.country = country.data.lkey;\n \n var province = _this.province_grid.getSelectionModel().getSelected();\n \n if(province) {\n options.params.division_id = province.data.id\n }\n \n options.params['query[name]'] = _this.city_searchBox.getValue();\n}"
392 "$ sortInfo" : "{ field: 'name', direction: 'ASC' }",
393 "$ xns" : "Roo.data",
394 "* prop" : "dataSource",
397 "$ url" : "baseURL + '/Roo/geoip_city.php'",
398 "xtype" : "HttpProxy",
400 "$ xns" : "Roo.data",
406 "xtype" : "JsonReader",
407 "$ xns" : "Roo.data",
408 "$ 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 {\n 'name': 'division_id',\n 'type': 'int'\n },\n {\n 'name': 'division_id_name',\n 'type': 'string'\n },\n {\n 'name': 'postal_code',\n 'type': 'string'\n },\n {\n 'name': 'time_zone',\n 'type': 'string'\n }\n]",
410 "totalProperty" : "total"
416 "xtype" : "PagingToolbar",
417 "emptyMsg" : "No Country found",
419 "displayInfo" : true,
420 "displayMsg" : "Displaying Country {0} - {1} of {2}",
426 "* prop" : "toolbar",
430 "specialkey" : "function (_self, e)\n{\n if (e.getKey() == 13) {\n _this.city_grid.footer.onClick('first');\n }\n}",
431 "render" : "function (_self)\n{\n _this.city_searchBox = _self;\n}"
433 "emptyText" : "Search City",
434 "xtype" : "TextField",
439 "|click" : "function (_self, e)\n{\n _this.country_grid.footer.onClick('first');\n}"
442 "cls" : "x-btn-icon",
443 "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
444 "$ xns" : "Roo.Toolbar"
448 "|click" : "function (_self, e)\n{\n _this.country_searchBox.setValue('');\n _this.country_grid.footer.onClick('first');\n}"
451 "cls" : "x-btn-icon",
452 "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'",
453 "$ xns" : "Roo.Toolbar"
457 "$ xns" : "Roo.Toolbar"
461 "|click" : "function()\n{\n var country = _this.country_grid.getSelectionModel().getSelected();\n \n var province = _this.province_grid.getSelectionModel().getSelected();\n \n Pman.Dialog.AdminGeoCityEdit.show({\n id : 0,\n country : (country) ? country.data.lkey : '',\n country_name : (country) ? country.data.lval : '',\n division_id : (province) ? province.data.id : '',\n division_id_name : (province) ? province.data.name : ''\n }, function(){\n _this.country_grid.footer.onClick('refresh');\n });\n \n}\n"
465 "cls" : "x-btn-text-icon",
466 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
467 "$ xns" : "Roo.Toolbar"
471 "|click" : "function()\n{\n var s = _this.city_grid.getSelectionModel().getSelections();\n \n if (!s.length || s.length > 1) {\n Roo.MessageBox.alert(\"Error\", \"Select a single city\");\n return;\n }\n \n Pman.Dialog.AdminGeoCityEdit.show({\n id : s[0].data.id\n }, function(){\n _this.city_grid.footer.onClick('refresh');\n });\n \n}"
475 "cls" : "x-btn-text-icon",
476 "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
477 "$ xns" : "Roo.Toolbar"
481 "|click" : "function()\n{\n var s = _this.city_grid.getSelectionModel().getSelections();\n \n if (!s.length) {\n Roo.MessageBox.alert(\"Error\", \"Select city to delete\");\n return;\n }\n \n var ids = [];\n \n Roo.each(s, function(v, k){\n ids.push(v.data.id);\n });\n \n Roo.MessageBox.confirm(\n \"Confirm\", \n \"Are you sure want to delete the selected city\", \n function(res) {\n if(res != 'yes') {\n return;\n }\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/geoip_city',\n params : {\n _delete : ids.join(',')\n },\n success : function() {\n _this.country_grid.footer.onClick('refresh');\n }\n });\n }\n );\n}"
485 "cls" : "x-btn-text-icon",
486 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
487 "$ xns" : "Roo.Toolbar"
492 "xtype" : "ColumnModel",
496 "$ renderer" : "function(v) \n{ \n return String.format('{0}', v ? v : ''); \n}",
497 "$ xns" : "Roo.grid",
502 "xtype" : "ColumnModel",
504 "header" : "Province / District",
506 "$ renderer" : "function(v) \n{ \n return String.format('{0}', v ? v : ''); \n}",
507 "$ xns" : "Roo.grid",
509 "dataIndex" : "division_id_name"