',
- '
{lastPost:date("M j, Y")}
by {author}{title}
',
- '{excerpt}',
- ''
- );
-
- var search = new Ext.form.ComboBox({
- store: ds,
- displayField:'title',
- typeAhead: false,
- loadingText: 'Searching...',
- width: 570,
- pageSize:10,
- hideTrigger:true,
- tpl: resultTpl,
- applyTo: 'search',
- itemSelector: 'div.search-item',
- onSelect: function(record){ // override default onSelect to do redirect
- window.location =
- String.format('http://extjs.com/forum/showthread.php?t={0}&p={1}', record.data.topicId, record.id);
- }
+ panel = Ext.create('Ext.panel.Panel', {
+ renderTo: Ext.getBody(),
+ title: 'Search the Ext Forums',
+ width: 600,
+ bodyPadding: 10,
+ layout: 'anchor',
+
+ items: [{
+ xtype: 'combo',
+ store: ds,
+ displayField: 'title',
+ typeAhead: false,
+ hideLabel: true,
+ hideTrigger:true,
+ anchor: '100%',
+
+ listConfig: {
+ loadingText: 'Searching...',
+ emptyText: 'No matching posts found.',
+
+ // Custom rendering template for each item
+ getInnerTpl: function() {
+ return '