3 Roo.example = Roo.example || {};
5 Roo.example.combobox = new Roo.XComponent({
6 part : ["layout","viewpanel"],
7 order : '001-viewpanel',
10 name : "unnamed module",
17 el : new Roo.bootstrap.Body()
19 this.parent.el.layout = false;
20 this.parent.el.render(document.body);
24 var baseURL = '/web.eventmanager/demo.local.php';
31 '|xns' : 'Roo.bootstrap',
35 style : 'margin-top:100px',
38 '|xns' : 'Roo.bootstrap',
44 '|xns' : 'Roo.bootstrap',
46 cls : 'container alpha',
50 '|xns' : 'Roo.bootstrap',
55 '|xns' : 'Roo.bootstrap',
56 xtype : 'NavSimplebar',
60 '|xns' : 'Roo.bootstrap',
66 render : function (_self)
68 _this.navGroup = this;
73 '|xns' : 'Roo.bootstrap',
76 preventDefault : true,
81 render : function (_self)
89 '|xns' : 'Roo.bootstrap',
92 preventDefault : true,
97 render : function (_self)
111 '|xns' : 'Roo.bootstrap',
113 style : 'margin-top:20px;',
119 '|xns' : 'Roo.bootstrap',
127 '|xns' : 'Roo.bootstrap',
130 html : 'First TabPanel With ComboBox',
134 '|xns' : 'Roo.bootstrap',
140 '|xns' : 'Roo.bootstrap',
145 '|xns' : 'Roo.bootstrap',
151 '|xns' : 'Roo.bootstrap',
153 fieldLabel : 'Family Name',
172 '|xns' : 'Roo.bootstrap',
180 '|xns' : 'Roo.bootstrap',
183 html : 'Country and Languages',
187 '|xns' : 'Roo.bootstrap',
193 '|xns' : 'Roo.bootstrap',
198 '|xns' : 'Roo.bootstrap',
210 url : baseURL+'/Geoip/Country'
214 xtype : 'JsonReader',
230 sortInfo : {field:"name",direction:"ASC"},
232 beforeload : function (_self, options)
242 '|xns' : 'Roo.bootstrap',
246 queryParam : 'query[name]',
249 triggerAction : 'all',
254 tpl : '<div class=\"select2-result\"><b>{name}</b></div>',
255 fieldLabel : 'Country of Residence',
256 hiddenName : 'country',
257 displayField : 'name',
260 render : function (_self)
262 this.el.select('span').removeClass('btn');
264 select : function (combo, record, index)
266 this.opt_id = record.data.id;
267 _this.country = this;
279 '|xns' : 'Roo.bootstrap',
291 url : baseURL+'/Geoip/City'
295 xtype : 'JsonReader',
312 sortInfo : {field:"name",direction:"ASC"},
314 beforeload : function (_self, options)
316 options.params.country_id = _this.country.opt_id;
324 '|xns' : 'Roo.bootstrap',
328 queryParam : 'query[name]',
331 triggerAction : 'all',
336 tpl : '<div class=\"select2-result\"><b>{name}</b></div>',
339 displayField : 'name',
342 render : function (_self)
344 this.el.select('span').removeClass('btn');
359 '|xns' : 'Roo.bootstrap',
364 '|xns' : 'Roo.bootstrap',
376 url : baseURL+'/Roo/Core_enum'
380 xtype : 'JsonReader',
392 'name': 'display_name',
399 sortInfo : {field:"display_name",direction:"ASC"},
402 beforeload : function (_self, options)
404 options.params.etype='Hydra.LanguageSpoken';
406 var selected = _this.lang.getValue();
408 options.params._skip = selected;
417 '|xns' : 'Roo.bootstrap',
421 queryParam : 'query[search]',
423 triggerAction : 'all',
428 tpl : '<div class=\"select2-result\"><b>{display_name}</b></div>',
429 fieldLabel : 'First (Native) Language',
431 displayField : 'display_name',
432 forceSelection : true,
434 render : function (_self)
436 this.el.select('span').removeClass('btn');
448 '|xns' : 'Roo.bootstrap',
460 url : baseURL+'/Roo/Core_enum'
464 xtype : 'JsonReader',
471 'name': 'display_name',
480 sortInfo : {field:"display_name",direction:"ASC"},
482 beforeload : function (_self, options)
484 options.params.etype='Hydra.LanguageSpoken';
486 /*var selected = _this.lang.getValue();
488 options.params._skip = selected;
497 '|xns' : 'Roo.bootstrap',
503 queryParam : 'query[search]',
505 triggerAction : 'all',
510 fieldLabel : 'Other Languages Spoken',
511 hiddenName : 'lang_multi',
514 displayField : 'display_name',
515 forceSelection : true,
517 render : function (_self)