Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.js
index bc5bb70..dbf78a6 100644 (file)
@@ -195,7 +195,65 @@ Pman.Dialog.CoreCompanies = {
                                     xtype: 'Column',
                                     xns: Roo.form,
                                     labelAlign : 'top',
-                                    width : 200
+                                    width : 200,
+                                    items : [
+                                        {
+                                            xtype: 'TextField',
+                                            xns: Roo.form,
+                                            fieldLabel : 'Background Colour',
+                                            name : 'background_color'
+                                        },
+                                        {
+                                            xtype: 'DisplayField',
+                                            xns: Roo.form,
+                                            fieldLabel : 'Logo Image',
+                                            height : 170,
+                                            icon : 'rootURL + \'images/default/dd/drop-add.gif\'',
+                                            style : 'border: 1px solid #ccc;',
+                                            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'
+                                                );
+                                            }
+                                        },
+                                        {
+                                            xtype: 'Button',
+                                            xns: Roo,
+                                            listeners : {
+                                                click : function (_self, e)
+                                                {
+                                                    var _t = this;
+                                                                         
+                                                    Pman.Dialog.Image.show({
+                                                        onid :_this.data.id,
+                                                        ontable : 'Companies',
+                                                        imgtype : 'LOGO'
+                                                    }, function(data) {
+                                                        if  (data) {
+                                                            _t.setValue(data.id);
+                                                        }
+                                                        
+                                                    });
+                                                }
+                                            },
+                                            text : "Add Image"
+                                        }
+                                    ]
+                                },
+                                {
+                                    xtype: 'Hidden',
+                                    xns: Roo.form,
+                                    name : 'isOwner'
+                                },
+                                {
+                                    xtype: 'Hidden',
+                                    xns: Roo.form,
+                                    name : 'id'
                                 }
                             ]
                         }