}
]
},
- {
- "*prop": "colModel[]",
- "dataIndex": "freq",
- "header": "Frequency",
- "width": 70,
- "xtype": "ColumnModel",
- "|renderer": "function(v,x,r) { \n\n Roo.log(this);\n var cm = _this.grid.colModel;\n var ix = cm.findColumnIndex('freq');\n var ce = cm.getCellEditor(ix)\n var matches = ce.field.store.query('code',v);\n if (!matches.length) {\n return '';\n }\n return String.format('{0}', matches.first().data.title);\n }",
- "|xns": "Roo.grid",
- "items": [
- {
- "|xns": "Roo.grid",
- "xtype": "GridEditor",
- "*prop": "editor",
- "items": [
- {
- "*prop": "field",
- "allowBlank": false,
- "displayField": "title",
- "editable": false,
- "fieldLabel": "Country",
- "hiddenName": "freq",
- "listWidth": 200,
- "mode": "local",
- "name": "freq_name",
- "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b> </div>",
- "triggerAction": "all",
- "valueField": "code",
- "width": 200,
- "xtype": "ComboBox",
- "|xns": "Roo.form",
- "items": [
- {
- "*prop": "store",
- "xtype": "SimpleStore",
- "|data": "[ \n [ 'HOURLY' , 'Hourly at' ] ,\n [ 'DAILY' , 'Daily at'] ,\n [ 'WEEKLY' , 'Weekly at'] ,\n [ 'Montly' , 'Montly at'] \n]",
- "|fields": "['code', 'title']",
- "|sortInfo": "{ field : 'title', direction: 'ASC' }",
- "|xns": "Roo.data"
- }
- ]
- }
- ]
- }
- ]
- },
{
"*prop": "colModel[]",
"dataIndex": "freq_day",
"items": [
{
"*prop": "field",
- "allowBlank": false,
- "displayField": "title",
- "editable": false,
- "fieldLabel": "Country",
- "hiddenName": "freq",
- "listWidth": 200,
- "mode": "local",
- "name": "freq_name",
- "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b> </div>",
- "triggerAction": "all",
- "valueField": "code",
- "width": 200,
- "xtype": "ComboBox",
- "|xns": "Roo.form",
- "items": [
- {
- "*prop": "store",
- "xtype": "SimpleStore",
- "|data": "[ \n [ 'HOURLY' , 'Hourly at' ] ,\n [ 'DAILY' , 'Daily at'] ,\n [ 'WEEKLY' , 'Weekly at'] ,\n [ 'Montly' , 'Montly at'] \n]",
- "|fields": "['code', 'title']",
- "|sortInfo": "{ field : 'title', direction: 'ASC' }",
- "|xns": "Roo.data"
- }
- ]
- },
- {
"allowBlank": "false",
"displayField": "tz",
- "editable": "false",
- "emptyText": "Select core_enum",
+ "editable": true,
+ "emptyText": "Select timezone",
"fieldLabel": "core_enum",
"forceSelection": true,
"hiddenName": "tz",
"loadingText": "Searching...",
"minChars": 2,
"name": "tz_name",
- "pageSize": 20,
- "qtip": "Select core_enum",
- "queryParam": "",
+ "pageSize": 999,
+ "qtip": "Select timezone",
+ "queryParam": "q",
"selectOnFocus": true,
- "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
+ "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{tz}</b> </div>",
"triggerAction": "all",
"typeAhead": true,
- "valueField": "id",
+ "valueField": "tz",
"width": 300,
"xtype": "ComboBox",
"|xns": "Roo.form",
"items": [
{
- "*prop": "store",
- "xtype": "Store",
- "|xns": "Roo.data",
- "remoteSort": true,
- "|sortInfo": "{ direction : 'ASC', field: 'id' }",
"listeners": {
"|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
},
+ "*prop": "store",
+ "remoteSort": true,
+ "xtype": "Store",
+ "|sortInfo": "{ direction : 'ASC', field: 'tz' }",
+ "|xns": "Roo.data",
"items": [
{
"*prop": "proxy",
- "xtype": "HttpProxy",
"method": "GET",
- "|xns": "Roo.data",
- "|url": "baseURL + '/Roo/core_enum.php'"
+ "xtype": "HttpProxy",
+ "|url": "baseURL + '/Core/I18n/Timezone.php'\n",
+ "|xns": "Roo.data"
},
{
"*prop": "reader",
- "xtype": "JsonReader",
- "|xns": "Roo.data",
"id": "id",
"root": "data",
"totalProperty": "total",
- "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]"
+ "xtype": "JsonReader",
+ "|fields": "[{\"name\":\"tz\",\"type\":\"string\"}]",
+ "|xns": "Roo.data"
}
]
}