Roo/bootstrap/Img.js
authoredward <edward@roojs.com>
Wed, 13 Jan 2016 03:19:15 +0000 (11:19 +0800)
committeredward <edward@roojs.com>
Wed, 13 Jan 2016 03:19:15 +0000 (11:19 +0800)
Roo/bootstrap/Img.js

index 435d4c2..85069f5 100644 (file)
@@ -54,6 +54,14 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
 
     getAutoCreate : function()
     {   
+        if(this.src){
+            this.createSingleImg();
+        }
+        
+    },
+    
+    createSingleImg : function()
+    {
         var cfg = {
             tag: 'img',
             cls: (this.imgResponsive) ? 'img-responsive' : '',
@@ -87,7 +95,6 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component,  {
             
         }
         
-        
         return (this.href) ? a : cfg;
     },