From: Chris Date: Tue, 18 Mar 2014 07:22:38 +0000 (+0800) Subject: Pman.Dialog.PersonEditor.js X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=0dba31da947268d3faa34cbbb096857d4a235fe8 Pman.Dialog.PersonEditor.js --- diff --git a/Pman.Dialog.PersonEditor.js b/Pman.Dialog.PersonEditor.js index 752b1b30..450a16f9 100644 --- a/Pman.Dialog.PersonEditor.js +++ b/Pman.Dialog.PersonEditor.js @@ -454,6 +454,70 @@ Pman.Dialog.PersonEditor.prototype = { qtip : "Enter email", xtype : 'TextField', width : 300 + }, + country : { + + xtype: 'ComboBoxAdder', + fieldLabel: "Company", + name : 'company_id_name', + selectOnFocus:true, + qtip : "Select Company", + allowBlank : false, + width: 300, + + store: { + xtype : 'Store', + // load using HTTP + proxy:{ + xtype: 'HttpProxy', + url: baseURL + '/Roo/Companies.html', + method: 'GET' + }, + reader: Pman.Readers.Companies, + listeners : { + beforeload : function(st,o) + { + + o.params['!comptype'] = 'OWNER'; + }, + loadexception : Pman.loadException + + }, + sortInfo: { + field: 'name', direction: 'ASC' + } + }, + displayField:'name', + valueField : 'id', + hiddenName: 'company_id', + typeAhead: true, + forceSelection: true, + //mode: 'local', + triggerAction: 'all', + tpl: new Ext.Template( + '
', + '{name} {address}', + '
' + ), + queryParam: 'query[name]', + loadingText: "Searching...", + listWidth: 400, + + minChars: 2, + pageSize:20, + listeners : { + adderclick : function() + { + var cb = this; + Pman.Dialog.CoreCompanies.show( { id: 0 }, function(data) { + cb.setFromData(data); + }); + } + } + + + + }, passwd1 : { name : 'passwd1',