Pman.Dialog.CoreCompanies.bjs
authorChris <chris@roojs.com>
Wed, 12 Sep 2012 06:25:01 +0000 (14:25 +0800)
committerChris <chris@roojs.com>
Wed, 12 Sep 2012 06:25:01 +0000 (14:25 +0800)
Pman.Dialog.CoreCompanies.js

Pman.Dialog.CoreCompanies.bjs
Pman.Dialog.CoreCompanies.js

index a1e282e..cee2240 100644 (file)
                                             "style": "border: 1px solid #ccc;",
                                             "width": 170,
                                             "xtype": "DisplayField",
+                                            "|valueRenderer": "function(v) {\n    //var vp = v ? v : 'Companies:' + _this.data.id + ':-LOGO';\n    if (!v) {\n        return \"No Image Available\" + '<BR/>';\n    }\n    return String.format('<img src=\"{0}\" width=\"150\">', \n            baseURL + '/Images/Thumb/150x150/' + v + '/logo.jpg'\n    );\n}",
                                             "|xns": "Roo.form"
                                         }
                                     ]
index c350c76..906c2d4 100644 (file)
@@ -210,7 +210,16 @@ Pman.Dialog.CoreCompanies = {
                                             height : 170,
                                             icon : 'rootURL + \'images/default/dd/drop-add.gif\'',
                                             style : 'border: 1px solid #ccc;',
-                                            width : 170
+                                            width : 170,
+                                            valueRenderer : function(v) {
+                                                //var vp = v ? v : 'Companies:' + _this.data.id + ':-LOGO';
+                                                if (!v) {
+                                                    return "No Image Available" + '<BR/>';
+                                                }
+                                                return String.format('<img src="{0}" width="150">', 
+                                                        baseURL + '/Images/Thumb/150x150/' + v + '/logo.jpg'
+                                                );
+                                            }
                                         }
                                     ]
                                 },