Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.js
index 9bf7c23..1fb8be0 100644 (file)
@@ -107,36 +107,12 @@ Pman.Dialog.CoreCompanies = {
                                         {
                                             xtype: 'TextField',
                                             xns: Roo.form,
-                                            allowBlank : false,
+                                            allowBlank : true,
                                             fieldLabel : 'Company ID (for filing Ref.)',
                                             name : 'code',
                                             qtip : "Enter code",
                                             width : 100
                                         },
-                                        {
-                                            xtype: 'ComboBox',
-                                            xns: Roo.form,
-                                            allowBlank : false,
-                                            displayField : 'desc',
-                                            editable : false,
-                                            emptyText : "Select Type",
-                                            fieldLabel : 'Type',
-                                            hiddenName : 'comptype',
-                                            listWidth : 250,
-                                            name : 'comptype_name',
-                                            qtip : "Select Company type",
-                                            selectOnFocus : true,
-                                            triggerAction : 'all',
-                                            typeAhead : false,
-                                            valueField : 'val',
-                                            width : 200,
-                                            store : {
-                                                xtype: 'SimpleStore',
-                                                xns: Roo.data,
-                                                data : '[ \'CONSULTANT\', "Consultant" ],[ \'CLIENT\'    ,  "Client" ],[ \'CONTRACTOR\' , "Contractor" ]',
-                                                fields : '[\'val\', \'desc\']'
-                                            }
-                                        },
                                         {
                                             xtype: 'ComboBox',
                                             xns: Roo.form,
@@ -144,21 +120,18 @@ Pman.Dialog.CoreCompanies = {
                                                 render : function (_self)
                                                 {
                                                     _this.etypeCombo = _self;
-                                                },
-                                                select : function (combo, record, index)
-                                                {
-                                                    _this.grid.footer.onClick('first');
                                                 }
                                             },
                                             alwaysQuery : true,
                                             displayField : 'name',
-                                            editable : 'false',
                                             emptyText : "Select Type",
                                             fieldLabel : 'Type',
                                             forceSelection : true,
+                                            hiddenName : 'comptype',
                                             listWidth : 250,
                                             loadingText : "Searching...",
                                             minChars : 2,
+                                            name : 'comptype_name',
                                             pageSize : 20,
                                             qtip : "Select type",
                                             queryParam : 'query[name]',
@@ -167,7 +140,7 @@ Pman.Dialog.CoreCompanies = {
                                             triggerAction : 'all',
                                             typeAhead : false,
                                             valueField : 'name',
-                                            width : 300,
+                                            width : 200,
                                             store : {
                                                 xtype: 'Store',
                                                 xns: Roo.data,
@@ -192,7 +165,7 @@ Pman.Dialog.CoreCompanies = {
                                                     id : 'id',
                                                     root : 'data',
                                                     totalProperty : 'total',
-                                                    fields : [{"name":"id","type":"int"},{"name":"etype","type":"string"}]
+                                                    fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
                                                 }
                                             }
                                         },