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
20 * @param {Object} config The config object
23 Roo.bootstrap.Img = function(config){
24 Roo.bootstrap.Img.superclass.constructor.call(this, config);
30 * The img click event for the img.
31 * @param {Roo.EventObject} e
37 Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, {
44 getAutoCreate : function(){
48 cls: 'img-responsive',
52 cfg.html = this.html || cfg.html;
54 cfg.src = this.src || cfg.src;
56 if (['rounded','circle','thumbnail'].indexOf(this.border)>-1) {
57 cfg.cls += ' img-' + this.border;
75 return (this.href) ? a : cfg;
78 initEvents: function() {
81 this.el.on('click', this.onClick, this);
87 Roo.log('img onclick');
88 this.fireEvent('click', this, e);