1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.CorePersonContact = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
37 title : "Edit / Create Contact Details",
41 xtype: 'ContentPanel',
49 actioncomplete : function(_self,action)
51 if (action.type == 'setdata') {
52 //_this.dialog.el.mask("Loading");
53 //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
56 if (action.type == 'load') {
57 _this.dialog.el.unmask();
60 if (action.type =='submit') {
62 _this.dialog.el.unmask();
66 _this.callback.call(_this, _this.form.getValues());
72 rendered : function (form)
78 style : 'margin:10px;',
79 url : baseURL + '/Roo/Person.php',
85 add : function (combo)
88 Pman.Dialog.Companies.show( { id: 0 }, function(data) {
89 _this.form.setValues({
96 displayField : 'code',
98 emptyText : "Select Companies",
99 fieldLabel : 'Company',
100 forceSelection : true,
101 hiddenName : 'company_id',
103 loadingText : "Searching...",
105 name : 'company_id_code',
107 qtip : "Select Companies",
108 queryParam : 'query[code]',
109 selectOnFocus : true,
110 tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> </div>',
111 triggerAction : 'all',
119 sortInfo : { direction : 'ASC', field: 'id' },
121 beforeload : function (_self, o){
122 o.params = o.params || {};
130 url : baseURL + '/Roo/Companies.php'
137 totalProperty : 'total',
138 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}]
145 allowBlank : 'false',
147 emptyText : "Select Office",
148 forceSelection : true,
150 loadingText : "Searching...",
153 qtip : "Select Office",
154 selectOnFocus : true,
155 triggerAction : 'all',
158 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
159 queryParam : 'query[name]',
160 fieldLabel : 'Office',
162 displayField : 'name',
163 hiddenName : 'office_id',
164 name : 'office_id_name',
169 sortInfo : { direction : 'ASC', field: 'id' },
171 beforeload : function (_self, o){
172 o.params = o.params || {};
180 url : baseURL + '/Roo/Office.php'
187 totalProperty : 'total',
188 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
209 fieldLabel : 'Phone',
223 fieldLabel : 'Email',
238 xtype: 'LayoutRegion',
246 click : function (_self, e)
257 click : function (_self, e)
262 _this.dialog.el.mask("Saving");
263 _this.form.doAction("submit");