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',
86 emptyText : "Select Companies",
87 forceSelection : true,
89 loadingText : "Searching...",
92 qtip : "Select Companies",
94 triggerAction : 'all',
97 tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> </div>',
98 queryParam : 'query[code]',
99 fieldLabel : 'Company',
101 displayField : 'code',
102 hiddenName : 'company_id',
103 name : 'company_id_code',
108 sortInfo : { direction : 'ASC', field: 'id' },
110 beforeload : function (_self, o){
111 o.params = o.params || {};
119 url : baseURL + '/Roo/Companies.php'
126 totalProperty : 'total',
127 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}]
134 allowBlank : 'false',
136 emptyText : "Select Office",
137 forceSelection : true,
139 loadingText : "Searching...",
142 qtip : "Select Office",
143 selectOnFocus : true,
144 triggerAction : 'all',
147 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
148 queryParam : 'query[name]',
149 fieldLabel : 'Office',
151 displayField : 'name',
152 hiddenName : 'office_id',
153 name : 'office_id_name',
158 sortInfo : { direction : 'ASC', field: 'id' },
160 beforeload : function (_self, o){
161 o.params = o.params || {};
169 url : baseURL + '/Roo/Office.php'
176 totalProperty : 'total',
177 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
198 fieldLabel : 'Phone',
212 fieldLabel : 'Email',
227 xtype: 'LayoutRegion',
235 click : function (_self, e)
246 click : function (_self, e)
251 _this.dialog.el.mask("Saving");
252 _this.form.doAction("submit");