UNPKG

grunt-sencha-dependencies

Version:

A Grunt.js plugin which will figure out the order of Ext classes your Ext.application uses so the list can be passed on to further commands like concat, jshint, etc

47 lines (41 loc) 1.18 kB
/** * This is a search list item for the SearchList view. It contains two items: * one for the search query, and a Ext.Button which is used to delete * searches. (by default this button is hidden). */ Ext.define('Twitter.view.SearchListItem', { extend: 'Ext.dataview.component.DataItem', xtype : 'searchlistitem', config: { deleteButton: { text : 'Delete', ui : 'decline-small', hidden: true }, items: [ { cls : 'search', tpl : '{query}', flex: 1 } ], layout: { type : 'hbox', align: 'middle' } }, /** * Returns an instance of a Ext.Button based on the {@link #deleteButton} configuration */ applyDeleteButton: function(config) { return Ext.factory(config, Ext.Button, this.getDeleteButton()); }, /** * When the {@link #deleteButton} configuration is updated, add it to this item. */ updateDeleteButton: function(newDeleteButton) { if (newDeleteButton) { this.add(newDeleteButton); } } });