From 320e87c159cd213275a4b110cc1f04504ee0463a Mon Sep 17 00:00:00 2001 From: edward Date: Wed, 13 Jan 2016 11:35:29 +0800 Subject: [PATCH] Roo/bootstrap/Img.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/Img.js | 1 + roojs-bootstrap-debug.js | 3 +-- roojs-bootstrap.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Roo/bootstrap/Img.js b/Roo/bootstrap/Img.js index 1ca32e0560..d5bd8b01e8 100644 --- a/Roo/bootstrap/Img.js +++ b/Roo/bootstrap/Img.js @@ -65,6 +65,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { } Roo.log('run?????????????????????'); Roo.each(['xsUrl', 'smUrl', 'mdUrl', 'lgUrl'], function(size){ + Roo.log(size); Roo.log(this[size]); if(!this[size]){ return; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index a7a7d57257..8081670ad0 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -1365,8 +1365,6 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { getAutoCreate : function() { if(this.src || (!this.xsUrl && !this.smUrl && !this.mdUrl && !this.lgUrl)){ - Roo.log('run?????????????????????'); - Roo.log(this.src); return this.createSingleImg(); } @@ -1377,6 +1375,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { } Roo.log('run?????????????????????'); Roo.each(['xsUrl', 'smUrl', 'mdUrl', 'lgUrl'], function(size){ + Roo.log(size); Roo.log(this[size]); if(!this[size]){ return; diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 020dc2817e..9598889719 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -36,8 +36,8 @@ A.removeClass(['fa-minus','fa-plus']).addClass(['fa-plus']);}},toggleEl:function A.dom.innerHTML=v;},getTitle:function(){var A=this.titleEl();if(!A){return '';}return A.dom.innerHTML;},setRightTitle:function(v){var t=this.el.select('.panel-header-right',true).first();if(!t){return;} t.dom.innerHTML=v;}}); //Roo/bootstrap/Img.js -Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',getAutoCreate:function(){if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){Roo.log('run?????????????????????');Roo.log(this.src);return this.createSingleImg();}var A={tag:'div',cls:'roo-image-responsive-group',cn:[]} -Roo.log('run?????????????????????');Roo.each(['xsUrl','smUrl','mdUrl','lgUrl'],function(B){Roo.log(this[B]);if(!this[B]){return;}var C={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:this.html||A.html,src:this[B]} +Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',getAutoCreate:function(){if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){return this.createSingleImg();}var A={tag:'div',cls:'roo-image-responsive-group',cn:[]} +Roo.log('run?????????????????????');Roo.each(['xsUrl','smUrl','mdUrl','lgUrl'],function(B){Roo.log(B);Roo.log(this[B]);if(!this[B]){return;}var C={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:this.html||A.html,src:this[B]} C.cls+=' roo-image-responsive-'+B;if(['rounded','circle','thumbnail'].indexOf(this.border)>-1){A.cls+=' img-'+this.border;}if(this.alt){A.alt=this.alt;}if(this.href){var a={tag:'a',href:this.href,cn:[C]};if(this.target){a.target=this.target;}} A.cn.push((this.href)?a:C);});return A;},createSingleImg:function(){var A={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:null} A.html=this.html||A.html;A.src=this.src||A.src;if(['rounded','circle','thumbnail'].indexOf(this.border)>-1){A.cls+=' img-'+this.border;}if(this.alt){A.alt=this.alt;}if(this.href){var a={tag:'a',href:this.href,cn:[A]};if(this.target){a.target=this.target;}}return (this.href)?a:A;},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}},onClick:function(e){Roo.log('img onclick');this.fireEvent('click',this,e);}}); -- 2.39.2