10 * @class Roo.bootstrap.Img
11 * @extends Roo.bootstrap.Component
13 * @cfg {Boolean} imgResponsive false | true
14 * @cfg {String} border rounded | circle | thumbnail
15 * @cfg {String} src image source
16 * @cfg {String} alt image alternative text
17 * @cfg {String} a tag href
21 * @param {Object} config The config object
24 Roo.bootstrap.Img = function(config){
25 Roo.bootstrap.Img.superclass.constructor.call(this, config);
31 * The img click event for the img.
32 * @param {Roo.EventObject} e
38 Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, {
45 getAutoCreate : function(){
49 cls: 'img-responsive',
53 cfg.html = this.html || cfg.html;
55 cfg.src = this.src || cfg.src;
57 if (['rounded','circle','thumbnail'].indexOf(this.border)>-1) {
58 cfg.cls += ' img-' + this.border;
76 return (this.href) ? a : cfg;
79 initEvents: function() {
82 this.el.on('click', this.onClick, this);
88 Roo.log('img onclick');
89 this.fireEvent('click', this, e);