commit e1c800a2d89eac4cd6694bbc86154c8e36dc7bee
parent 2e62a6ade072f17b1b08d2db8c81ce8c2566530e
Author: Felicitus <felicitus@felicitus.org>
Date: Mon, 2 Jan 2012 12:15:48 +0100
Updated the RemoteImageField widget to work with ExtJS 4.0.7
Diffstat:
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/frontend/js/Components/Widgets/RemoteImageField.js b/src/frontend/js/Components/Widgets/RemoteImageField.js
@@ -17,7 +17,7 @@ Ext.define('PartKeepr.RemoteImageField', {
// The field template for rendering this field
fieldSubTpl: [
- '<img id="{id}" style="{size}" class="remoteimagefield"/>',
+ '<img id="{cmpId}-imgEl" style="{size}" class="remoteimagefield"/>',
{
compiled: true,
disableFormats: true
@@ -38,6 +38,7 @@ Ext.define('PartKeepr.RemoteImageField', {
*/
getSubTplData: function() {
return {
+ cmpId: this.id,
size: 'height:'+this.imageHeight+"px;width:"+this.imageWidth+"px;",
imageid: this.imageId
};
@@ -45,7 +46,16 @@ Ext.define('PartKeepr.RemoteImageField', {
/**
* Renders this field.
*/
- onRender: function () {
+ onRender: function() {
+ var me = this;
+
+ me.onLabelableRender();
+
+ me.addChildEls('imgEl');
+
+ me.callParent(arguments);
+ },
+ /*onRender: function () {
var me = this,
renderSelectors = me.renderSelectors;
@@ -56,7 +66,7 @@ Ext.define('PartKeepr.RemoteImageField', {
});
me.callParent(arguments);
- },
+ },*/
/**
* Applies the image URL to the element after rendering
*/