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 displayField : 'code',
87 emptyText : "Select Companies",
88 fieldLabel : 'Company',
89 forceSelection : true,
90 hiddenName : 'company_id',
92 loadingText : "Searching...",
94 name : 'company_id_code',
96 qtip : "Select Companies",
97 queryParam : 'query[code]',
99 tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> </div>',
100 triggerAction : 'all',
105 add : function (combo)
114 sortInfo : { direction : 'ASC', field: 'id' },
116 beforeload : function (_self, o){
117 o.params = o.params || {};
125 url : baseURL + '/Roo/Companies.php'
132 totalProperty : 'total',
133 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}]
140 allowBlank : 'false',
142 emptyText : "Select Office",
143 forceSelection : true,
145 loadingText : "Searching...",
148 qtip : "Select Office",
149 selectOnFocus : true,
150 triggerAction : 'all',
153 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
154 queryParam : 'query[name]',
155 fieldLabel : 'Office',
157 displayField : 'name',
158 hiddenName : 'office_id',
159 name : 'office_id_name',
164 sortInfo : { direction : 'ASC', field: 'id' },
166 beforeload : function (_self, o){
167 o.params = o.params || {};
175 url : baseURL + '/Roo/Office.php'
182 totalProperty : 'total',
183 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
204 fieldLabel : 'Phone',
218 fieldLabel : 'Email',
233 xtype: 'LayoutRegion',
241 click : function (_self, e)
252 click : function (_self, e)
257 _this.dialog.el.mask("Saving");
258 _this.form.doAction("submit");