1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.CorePersonContact = {
10 '1c76cbfe21c6f44c1d1e59d54f3e4420' :"Company",
11 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
12 'c8972faa3b9e1c7250db23c57c85aa23' :"Edit / Create Contact Details",
13 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
14 'bcc254b55c4a1babdf1dcb82c207506b' :"Phone",
15 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
16 '9675747b5ab12d05f18518761e68a533' :"Select Companies",
17 'df814135652a5a308fea15bff37ea284' :"Office",
18 'c373dd4bd4ba0b5d3e0c7522c5629880' :"Select Office",
19 '49ee3087348e8d44e1feda1917443987' :"Name",
20 'bbbabdbe1b262f75d99d62880b953be1' :"Role",
21 'c9cc8cce247e49bae79f15173ce97354' :"Save",
22 '9810aa2b9f44401be4bf73188ef2b67d' :"Fax"
25 'company_id_code_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
26 'role_fieldLabel' : 'bbbabdbe1b262f75d99d62880b953be1' /* Role */ ,
27 'fax_fieldLabel' : '9810aa2b9f44401be4bf73188ef2b67d' /* Fax */ ,
28 'office_id_name_emptyText' : 'c373dd4bd4ba0b5d3e0c7522c5629880' /* Select Office */ ,
29 'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
30 'phone_fieldLabel' : 'bcc254b55c4a1babdf1dcb82c207506b' /* Phone */ ,
31 'office_id_name_fieldLabel' : 'df814135652a5a308fea15bff37ea284' /* Office */ ,
32 'office_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
33 'company_id_code_qtip' : '9675747b5ab12d05f18518761e68a533' /* Select Companies */ ,
34 'office_id_name_qtip' : 'c373dd4bd4ba0b5d3e0c7522c5629880' /* Select Office */ ,
35 'email_fieldLabel' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
36 'company_id_code_emptyText' : '9675747b5ab12d05f18518761e68a533' /* Select Companies */ ,
37 'company_id_code_fieldLabel' : '1c76cbfe21c6f44c1d1e59d54f3e4420' /* Company */
43 show : function(data, cb)
51 this.dialog.show(this.data._el);
54 this.form.setValues(data);
55 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
63 this.dialog = Roo.factory({
64 xtype : 'LayoutDialog',
69 title : _this._strings['c8972faa3b9e1c7250db23c57c85aa23'] /* Edit / Create Contact Details */,
74 xtype : 'LayoutRegion',
81 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
83 click : function (_self, e)
93 text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
95 click : function (_self, e)
100 _this.dialog.el.mask("Saving");
101 _this.form.doAction("submit");
111 xtype : 'ContentPanel',
119 style : 'margin:10px;',
120 url : baseURL + '/Roo/core_person',
122 actioncomplete : function(_self,action)
124 if (action.type == 'setdata') {
125 //_this.dialog.el.mask("Loading");
126 //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
129 if (action.type == 'load') {
130 _this.dialog.el.unmask();
133 if (action.type =='submit') {
135 _this.dialog.el.unmask();
138 if (_this.callback) {
139 _this.callback.call(_this, _this.form.getValues());
145 rendered : function (form)
156 displayField : 'code',
158 emptyText : _this._strings['9675747b5ab12d05f18518761e68a533'] /* Select Companies */,
159 fieldLabel : _this._strings['1c76cbfe21c6f44c1d1e59d54f3e4420'] /* Company */,
160 forceSelection : true,
161 hiddenName : 'company_id',
163 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
165 name : 'company_id_code',
167 qtip : _this._strings['9675747b5ab12d05f18518761e68a533'] /* Select Companies */,
168 queryParam : 'query[code]',
169 selectOnFocus : true,
170 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> </div>',
171 triggerAction : 'all',
176 add : function (combo)
179 Pman.Dialog.Companies.show( { id: 0 }, function(data) {
180 _this.form.setValues({
181 company_id_name : data.name,
192 sortInfo : { direction : 'ASC', field: 'id' },
194 beforeload : function (_self, o){
195 o.params = o.params || {};
204 url : baseURL + '/Roo/core_company.php',
209 xtype : 'JsonReader',
210 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}],
213 totalProperty : 'total',
222 displayField : 'name',
224 emptyText : _this._strings['c373dd4bd4ba0b5d3e0c7522c5629880'] /* Select Office */,
225 fieldLabel : _this._strings['df814135652a5a308fea15bff37ea284'] /* Office */,
226 forceSelection : true,
227 hiddenName : 'office_id',
229 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
231 name : 'office_id_name',
233 qtip : _this._strings['c373dd4bd4ba0b5d3e0c7522c5629880'] /* Select Office */,
234 queryParam : 'query[name]',
235 selectOnFocus : true,
236 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
237 triggerAction : 'all',
242 add : function (combo)
244 var coid = _this.form.findField('company_id').getValue();
247 Ext.MessageBox.alert("Error", "Select An Company First");
251 Pman.Dialog.Office.show(cfg, function(data) {
252 _this.form.setValues({
253 office_id_name : data.name,
260 beforequery : function (combo, query, forceAll, cancel, e)
262 var coid = _this.form.findField('company_id').getValue();
264 Ext.MessageBox.alert("Error", "Select An Company First");
274 sortInfo : { direction : 'ASC', field: 'id' },
276 beforeload : function (_self, o){
277 o.params = o.params || {};
278 var coid = _this.form.findField('company_id').getValue();
279 o.params.company_id = coid;
287 url : baseURL + '/Roo/Office.php',
292 xtype : 'JsonReader',
293 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
296 totalProperty : 'total',
305 fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
313 fieldLabel : _this._strings['bbbabdbe1b262f75d99d62880b953be1'] /* Role */,
321 fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
329 fieldLabel : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
338 fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,