From: edward Date: Wed, 13 Jan 2016 03:23:37 +0000 (+0800) Subject: Roo/bootstrap/Img.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=2be6582913abb007d4893aa56d550950f51f9a03;p=roojs1 Roo/bootstrap/Img.js --- diff --git a/Roo/bootstrap/Img.js b/Roo/bootstrap/Img.js index e68f85ec9e..d0b73502ad 100644 --- a/Roo/bootstrap/Img.js +++ b/Roo/bootstrap/Img.js @@ -54,7 +54,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { getAutoCreate : function() { - if(this.src || (!xsUrl && !smUrl && !mdUrl && !lgUrl)){ + if(this.src || (!this.xsUrl && !this.smUrl && !this.mdUrl && !this.lgUrl)){ return this.createSingleImg(); } @@ -64,7 +64,20 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { cn: [] } + var img = {}; + if(this.xsUrl){ + img = { + tag: 'img', + cls: (this.imgResponsive) ? 'img-responsive' : '', + html: this.html || cfg.html, + src: this.xsUrl + } + + cfg.html = this.html || cfg.html; + + cfg.src = this.src || cfg.src; + } },