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"
28 show : function(data, cb)
36 this.dialog.show(this.data._el);
39 this.form.setValues(data);
40 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
48 this.dialog = Roo.factory({
49 xtype : 'LayoutDialog',
54 title : _this._strings['c8972faa3b9e1c7250db23c57c85aa23'] /* Edit / Create Contact Details */,
59 xtype : 'LayoutRegion',
66 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
68 click : function (_self, e)
78 text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
80 click : function (_self, e)
85 _this.dialog.el.mask("Saving");
86 _this.form.doAction("submit");
96 xtype : 'ContentPanel',
104 style : 'margin:10px;',
105 url : baseURL + '/Roo/core_person',
107 actioncomplete : function(_self,action)
109 if (action.type == 'setdata') {
110 //_this.dialog.el.mask("Loading");
111 //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
114 if (action.type == 'load') {
115 _this.dialog.el.unmask();
118 if (action.type =='submit') {
120 _this.dialog.el.unmask();
123 if (_this.callback) {
124 _this.callback.call(_this, _this.form.getValues());
130 rendered : function (form)
141 displayField : 'code',
143 emptyText : _this._strings['9675747b5ab12d05f18518761e68a533'] /* Select Companies */,
144 fieldLabel : _this._strings['1c76cbfe21c6f44c1d1e59d54f3e4420'] /* Company */,
145 forceSelection : true,
146 hiddenName : 'company_id',
148 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
150 name : 'company_id_code',
152 qtip : _this._strings['9675747b5ab12d05f18518761e68a533'] /* Select Companies */,
153 queryParam : 'query[code]',
154 selectOnFocus : true,
155 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> </div>',
156 triggerAction : 'all',
161 add : function (combo)
164 Pman.Dialog.Companies.show( { id: 0 }, function(data) {
165 _this.form.setValues({
166 company_id_name : data.name,
177 sortInfo : { direction : 'ASC', field: 'id' },
179 beforeload : function (_self, o){
180 o.params = o.params || {};
189 url : baseURL + '/Roo/core_company.php',
194 xtype : 'JsonReader',
195 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}],
198 totalProperty : 'total',
207 displayField : 'name',
209 emptyText : _this._strings['c373dd4bd4ba0b5d3e0c7522c5629880'] /* Select Office */,
210 fieldLabel : _this._strings['df814135652a5a308fea15bff37ea284'] /* Office */,
211 forceSelection : true,
212 hiddenName : 'office_id',
214 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
216 name : 'office_id_name',
218 qtip : _this._strings['c373dd4bd4ba0b5d3e0c7522c5629880'] /* Select Office */,
219 queryParam : 'query[name]',
220 selectOnFocus : true,
221 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
222 triggerAction : 'all',
227 add : function (combo)
229 var coid = _this.form.findField('company_id').getValue();
232 Ext.MessageBox.alert("Error", "Select An Company First");
236 Pman.Dialog.Office.show(cfg, function(data) {
237 _this.form.setValues({
238 office_id_name : data.name,
245 beforequery : function (combo, query, forceAll, cancel, e)
247 var coid = _this.form.findField('company_id').getValue();
249 Ext.MessageBox.alert("Error", "Select An Company First");
259 sortInfo : { direction : 'ASC', field: 'id' },
261 beforeload : function (_self, o){
262 o.params = o.params || {};
263 var coid = _this.form.findField('company_id').getValue();
264 o.params.company_id = coid;
272 url : baseURL + '/Roo/Office.php',
277 xtype : 'JsonReader',
278 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
281 totalProperty : 'total',
290 fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
298 fieldLabel : _this._strings['bbbabdbe1b262f75d99d62880b953be1'] /* Role */,
306 fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
314 fieldLabel : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
323 fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,