roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Fri, 1 Sep 2017 05:17:07 +0000 (13:17 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 1 Sep 2017 05:17:07 +0000 (13:17 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index aeda5db..285f72f 100644 (file)
@@ -1513,7 +1513,18 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
     {
         Roo.log('img onclick');
         this.fireEvent('click', this, e);
+    },
+    /**
+     * Sets the url of the image - used to update it
+     * @param {String} url the url of the image
+     */
+    
+    setSrc : function(url)
+    {
+        this.el.dom.src =  url;
     }
+    
+    
    
 });
 
index 24374bc..4388c64 100644 (file)
@@ -57,7 +57,7 @@ Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this
 var s=['xs','sm','md','lg'];s.splice(s.indexOf(C),1);Roo.each(s,function(ss){D.cls+=' hidden-'+ss;});if(['rounded','circle','thumbnail'].indexOf(B.border)>-1){A.cls+=' img-'+B.border;}if(B.alt){A.alt=B.alt;}if(B.href){var a={tag:'a',href:B.href,cn:[D]};if(this.target){a.target=B.target;
 }}A.cn.push((B.href)?a:D);});return A;},createSingleImg:function(){var A={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:null,src:'about:blank'};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);}});
+this.fireEvent('click',this,e);},setSrc:function(A){this.el.dom.src=A;}});
 // Roo/bootstrap/Link.js
 Roo.bootstrap.Link=function(A){Roo.bootstrap.Link.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Link,Roo.bootstrap.Component,{href:false,target:false,preventDefault:false,anchor:false,alt:false,fa:false,getAutoCreate:function(){var A=this.html||'';
 if(this.fa!==false){A='<i class="fa fa-'+this.fa+'"></i>';}var B={tag:'a'};if(this.anchor===false){B.html=A;B.href=this.href||'#';}else{B.name=this.anchor;if(this.html!==false||this.fa!==false){B.html=A;}if(this.href!==false){B.href=this.href;}}if(this.alt!==false){B.alt=this.alt;