]>
git.proxmox.com Git - sencha-touch.git/blob - src/examples/touchflickr/app/view/SearchListItem.js
2 * This is a search list item for the SearchList view. It contains two items:
3 * one for the search query, and a Ext.Button which is used to delete
4 * searches. (by default this button is hidden).
6 Ext
.define('Flickr.view.SearchListItem', {
7 extend
: 'Ext.dataview.component.DataItem',
8 xtype
: 'searchlistitem',
32 * Returns an instance of a Ext.Button based on the {@link #deleteButton} configuration
34 applyDeleteButton: function(config
) {
35 return Ext
.factory(config
, Ext
.Button
, this.getDeleteButton());
39 * When the {@link #deleteButton} configuration is updated, add it to this item.
41 updateDeleteButton: function(newDeleteButton
) {
42 if (newDeleteButton
) {
43 this.add(newDeleteButton
);