Pman.Dialog.AdminWatch.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 28 Sep 2011 08:34:47 +0000 (16:34 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 28 Sep 2011 08:34:47 +0000 (16:34 +0800)
Pman.Dialog.AdminWatch.bjs
Pman.Dialog.AdminWatch.js
Pman.Dialog.AdminWatch.js

Pman.Dialog.AdminWatch.bjs
Pman.Dialog.AdminWatch.js

index f374cbc..676c103 100644 (file)
                                         }
                                     ]
                                 },
+                                {
+                                    "allowBlank": false,
+                                    "alwaysQuery": true,
+                                    "displayField": "title",
+                                    "editable": false,
+                                    "fieldLabel": "Country",
+                                    "hiddenName": "country",
+                                    "listWidth": 200,
+                                    "name": "country_name",
+                                    "triggerAction": "all",
+                                    "valueField": "code",
+                                    "width": 200,
+                                    "xtype": "ComboBox",
+                                    "|xns": "Roo.form",
+                                    "listeners": {},
+                                    "items": [
+                                        {
+                                            "|xns": "Roo.data",
+                                            "xtype": "Store",
+                                            "*prop": "store",
+                                            "items": [
+                                                {
+                                                    "*prop": "proxy",
+                                                    "method": "GET",
+                                                    "xtype": "HttpProxy",
+                                                    "|url": "baseURL + '/I18N/Country.php'",
+                                                    "|xns": "Roo.data"
+                                                },
+                                                {
+                                                    "*prop": "reader",
+                                                    "id": "code",
+                                                    "root": "data",
+                                                    "totalProperty": "total",
+                                                    "xtype": "JsonReader",
+                                                    "|fields": "[\n    {\n        'name': 'code',\n        'type': 'string'\n    },\n    {\n        'name': 'title',\n        'type': 'string'\n    }\n]",
+                                                    "|xns": "Roo.data"
+                                                }
+                                            ]
+                                        }
+                                    ]
+                                },
                                 {
                                     "fieldLabel": "Action",
                                     "name": "medium",
index 36e6fc4..6d24a28 100644 (file)
@@ -485,6 +485,48 @@ Pman.Dialog.AdminWatch = {
                                         }
                                     }
                                 },
+                                {
+                                    xtype: 'ComboBox',
+                                    xns: Roo.form,
+                                    allowBlank : false,
+                                    alwaysQuery : true,
+                                    displayField : 'title',
+                                    editable : false,
+                                    fieldLabel : 'Country',
+                                    hiddenName : 'country',
+                                    listWidth : 200,
+                                    name : 'country_name',
+                                    triggerAction : 'all',
+                                    valueField : 'code',
+                                    width : 200,
+                                    store : {
+                                        xtype: 'Store',
+                                        xns: Roo.data,
+                                        proxy : {
+                                            xtype: 'HttpProxy',
+                                            xns: Roo.data,
+                                            method : 'GET',
+                                            url : baseURL + '/I18N/Country.php'
+                                        },
+                                        reader : {
+                                            xtype: 'JsonReader',
+                                            xns: Roo.data,
+                                            id : 'code',
+                                            root : 'data',
+                                            totalProperty : 'total',
+                                            fields : [
+                                                {
+                                                    'name': 'code',
+                                                    'type': 'string'
+                                                },
+                                                {
+                                                    'name': 'title',
+                                                    'type': 'string'
+                                                }
+                                            ]
+                                        }
+                                    }
+                                },
                                 {
                                     xtype: 'TextField',
                                     xns: Roo.form,