X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/app/view/search/Dropdown.js diff --git a/docs/app/view/search/Dropdown.js b/docs/app/view/search/Dropdown.js new file mode 100644 index 00000000..411eb765 --- /dev/null +++ b/docs/app/view/search/Dropdown.js @@ -0,0 +1,53 @@ +/** + * Renders search results list. + */ +Ext.define('Docs.view.search.Dropdown', { + extend: 'Ext.view.View', + alias: 'widget.searchdropdown', + + floating: true, + autoShow: false, + autoRender: true, + toFrontOnShow: true, + focusOnToFront: false, + + store: 'Search', + + id: 'search-dropdown', + overItemCls:'x-view-over', + trackOver: true, + itemSelector:'div.item', + singleSelect: true, + + initComponent: function() { + this.tpl = new Ext.XTemplate( + '', + '
', + '
{member}
', + '
{cls}
', + '
', + '
', + '
{[values.length]} of {[this.getTotal()]}
', + { + getTotal: Ext.bind(this.getTotal, this) + } + ); + this.callParent(arguments); + }, + + /** + * Sets number of total search results + * @param {Number} total + */ + setTotal: function(total) { + this.total = total; + }, + + /** + * Returns number of total search results + * @return {Number} + */ + getTotal: function() { + return this.total; + } +});