From 775c1436c36d3b513bd2f27c4db1313ac274af62 Mon Sep 17 00:00:00 2001 From: edward Date: Wed, 13 Jan 2016 11:37:21 +0800 Subject: [PATCH] Roo/bootstrap/Img.js --- Roo/bootstrap/Img.js | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/Roo/bootstrap/Img.js b/Roo/bootstrap/Img.js index 8c7bf92b3e..bab4684713 100644 --- a/Roo/bootstrap/Img.js +++ b/Roo/bootstrap/Img.js @@ -63,48 +63,45 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { cls: 'roo-image-responsive-group', cn: [] } - Roo.log('run?????????????????????'); - Roo.log(this.lgUrl); + var _this = this; Roo.each(['xsUrl', 'smUrl', 'mdUrl', 'lgUrl'], function(size){ - Roo.log(size); - Roo.log(this[size]); - if(!this[size]){ + if(!_this[size]){ return; } var img = { tag: 'img', - cls: (this.imgResponsive) ? 'img-responsive' : '', - html: this.html || cfg.html, - src: this[size] + cls: (_this.imgResponsive) ? 'img-responsive' : '', + html: _this.html || cfg.html, + src: _this[size] } img.cls += ' roo-image-responsive-' + size; - if (['rounded','circle','thumbnail'].indexOf(this.border)>-1) { - cfg.cls += ' img-' + this.border; + if (['rounded','circle','thumbnail'].indexOf(_this.border)>-1) { + cfg.cls += ' img-' + _this.border; } - if(this.alt){ - cfg.alt = this.alt; + if(_this.alt){ + cfg.alt = _this.alt; } - if(this.href){ + if(_this.href){ var a = { tag: 'a', - href: this.href, + href: _this.href, cn: [ img ] } if(this.target){ - a.target = this.target; + a.target = _this.target; } } - cfg.cn.push((this.href) ? a : img); + cfg.cn.push((_this.href) ? a : img); }); -- 2.39.2