X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/examples/view/chooser/InfoPanel.js?ds=sidebyside diff --git a/examples/view/chooser/InfoPanel.js b/examples/view/chooser/InfoPanel.js new file mode 100644 index 00000000..ab7b1b85 --- /dev/null +++ b/examples/view/chooser/InfoPanel.js @@ -0,0 +1,44 @@ +/** + * @class Ext.chooser.InfoPanel + * @extends Ext.panel.Panel + * @author Ed Spencer + * + * This panel subclass just displays information about an image. We have a simple template set via the tpl property, + * and a single function (loadRecord) which updates the contents with information about another image. + */ +Ext.define('Ext.chooser.InfoPanel', { + extend: 'Ext.panel.Panel', + alias : 'widget.infopanel', + id: 'img-detail-panel', + + width: 150, + minWidth: 150, + + tpl: [ + '
', + '', + (!Ext.isIE6? '' : + '
'), + '
', + 'Example Name:', + '{name}', + 'Example URL:', + '{url}.html', + 'Type:', + '{type}', + '
', + '
', + '
' + ], + + /** + * Loads a given image record into the panel. Animates the newly-updated panel in from the left over 250ms. + */ + loadRecord: function(image) { + this.body.hide(); + this.tpl.overwrite(this.body, image.data); + this.body.slideIn('l', { + duration: 250 + }); + } +}); \ No newline at end of file