allow string based values for comboboxarray
[roojs1] / Roo / bootstrap / Img.js
index f7536fa..9e32c01 100644 (file)
@@ -169,10 +169,21 @@ 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;
+        this.src =  url;
+        
+        if(this.src || (!this.xsUrl && !this.smUrl && !this.mdUrl && !this.lgUrl)){
+            this.el.dom.src =  url;
+            return;
+        }
+        
+        this.el.select('img', true).first().dom.src =  url;
     }