From: edward Date: Wed, 13 Jan 2016 03:25:27 +0000 (+0800) Subject: Roo/bootstrap/Img.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=e3ba9306a973c2167eefc8735adccd71958b85c0;p=roojs1 Roo/bootstrap/Img.js --- diff --git a/Roo/bootstrap/Img.js b/Roo/bootstrap/Img.js index d0b73502ad..398b59f463 100644 --- a/Roo/bootstrap/Img.js +++ b/Roo/bootstrap/Img.js @@ -74,9 +74,30 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { src: this.xsUrl } - cfg.html = this.html || cfg.html; - - cfg.src = this.src || cfg.src; + if (['rounded','circle','thumbnail'].indexOf(this.border)>-1) { + cfg.cls += ' img-' + this.border; + } + + if(this.alt){ + cfg.alt = this.alt; + } + + if(this.href){ + var a = { + tag: 'a', + href: this.href, + cn: [ + img + ] + } + + if(this.target){ + a.target = this.target; + } + } + + cfg.cn.push((this.href) ? a : img); + } },