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) {
94 displayField : 'code',
96 emptyText : "Select Companies",
97 fieldLabel : 'Company',
98 forceSelection : true,
99 hiddenName : 'company_id',
101 loadingText : "Searching...",
103 name : 'company_id_code',
105 qtip : "Select Companies",
106 queryParam : 'query[code]',
107 selectOnFocus : true,
108 tpl : '<div class="x-grid-cell-text x-btn button"><b>{code}</b> </div>',
109 triggerAction : 'all',
117 sortInfo : { direction : 'ASC', field: 'id' },
119 beforeload : function (_self, o){
120 o.params = o.params || {};
128 url : baseURL + '/Roo/Companies.php'
135 totalProperty : 'total',
136 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}]
143 allowBlank : 'false',
145 emptyText : "Select Office",
146 forceSelection : true,
148 loadingText : "Searching...",
151 qtip : "Select Office",
152 selectOnFocus : true,
153 triggerAction : 'all',
156 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
157 queryParam : 'query[name]',
158 fieldLabel : 'Office',
160 displayField : 'name',
161 hiddenName : 'office_id',
162 name : 'office_id_name',
167 sortInfo : { direction : 'ASC', field: 'id' },
169 beforeload : function (_self, o){
170 o.params = o.params || {};
178 url : baseURL + '/Roo/Office.php'
185 totalProperty : 'total',
186 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
207 fieldLabel : 'Phone',
221 fieldLabel : 'Email',
236 xtype: 'LayoutRegion',
244 click : function (_self, e)
255 click : function (_self, e)
260 _this.dialog.el.mask("Saving");
261 _this.form.doAction("submit");