1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
7 // register the module first
8 Pman.on('beforeload', function()
11 modKey : '001-Pman.Tab.AdminContacts',
12 module : Pman.Tab.AdminContacts,
14 parent : Pman.Tab.AdminContacsManager,
15 name : "Pman.Tab.AdminContacts",
17 permname: 'Core.Person'
21 Pman.Tab.AdminContacts = new Roo.util.Observable({
27 add : function(parentLayout, region)
31 this.parentLayout = parentLayout;
33 this.panel = parentLayout.addxtype({
37 activate : function() {
40 _this.grid.footer.onClick('first');
53 autoExpandColumn : 'name',
59 //_this.dialog = Pman.Dialog.FILL_IN
60 if (_this.panel.active) {
61 this.footer.onClick('first');
64 rowdblclick : function (_self, rowIndex, e)
66 if (!_this.dialog) return;
67 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
68 _this.grid.footer.onClick('first');
76 beforeload : function (_self, o)
79 o.params['!company_id_comptype'] = 'OWNER';
80 o.params['query[search]'] = _this.searchBox.getValue();
81 if (Pman.Tab.ContactsGroup.grid) {
82 var tms = Pman.Tab.ContactsGroup.grid.getLeftSelections();
85 o.params['query[in_group]'] = tms[0].data.id;
86 o.params['query[type]'] = 2; // group type..
89 //o.params['query[name]'] = _this.searchBox.getValue();
95 sortInfo : { field : 'name', direction: 'ASC' },
100 url : baseURL + '/Roo/Person.php'
105 totalProperty : 'total',
134 'name': 'company_id',
162 'name': 'no_reset_sent',
166 'name': 'action_type',
170 'name': 'project_id',
174 'name': 'office_id_id',
178 'name': 'office_id_company_id',
182 'name': 'office_id_name',
186 'name': 'office_id_address',
190 'name': 'office_id_phone',
194 'name': 'office_id_fax',
198 'name': 'office_id_email',
202 'name': 'office_id_role',
206 'name': 'company_id_code',
210 'name': 'company_id_name',
214 'name': 'company_id_remarks',
218 'name': 'company_id_owner_id',
222 'name': 'company_id_address',
226 'name': 'company_id_tel',
230 'name': 'company_id_fax',
234 'name': 'company_id_email',
238 'name': 'company_id_id',
242 'name': 'company_id_isOwner',
246 'name': 'company_id_logo_id',
250 'name': 'company_id_background_color',
254 'name': 'company_id_comptype',
258 'name': 'company_id_url',
262 'name': 'company_id_main_office_id',
266 'name': 'company_id_created_by',
270 'name': 'company_id_created_dt',
274 'name': 'company_id_updated_by',
278 'name': 'company_id_updated_dt',
282 'name': 'company_id_passwd',
286 'name': 'project_id_id',
290 'name': 'project_id_name',
294 'name': 'project_id_remarks',
298 'name': 'project_id_owner_id',
302 'name': 'project_id_code',
306 'name': 'project_id_active',
310 'name': 'project_id_type',
314 'name': 'project_id_client_id',
318 'name': 'project_id_team_id',
322 'name': 'project_id_file_location',
326 'name': 'project_id_open_date',
330 'name': 'project_id_open_by',
334 'name': 'project_id_close_date',
338 'name': 'project_id_countries',
342 'name': 'project_id_languages',
346 'name': 'project_id_agency_id',
350 'name': 'owner_id_id',
354 'name': 'owner_id_office_id',
358 'name': 'owner_id_name',
362 'name': 'owner_id_phone',
366 'name': 'owner_id_fax',
370 'name': 'owner_id_email',
374 'name': 'owner_id_company_id',
378 'name': 'owner_id_role',
382 'name': 'owner_id_active',
386 'name': 'owner_id_remarks',
390 'name': 'owner_id_passwd',
394 'name': 'owner_id_owner_id',
398 'name': 'owner_id_lang',
402 'name': 'owner_id_no_reset_sent',
406 'name': 'owner_id_action_type',
410 'name': 'owner_id_project_id',
417 xtype: 'PagingToolbar',
421 displayMsg : 'Displaying Person{0} - {1} of {2}',
422 emptyMsg : 'No Person found',
428 text : "Show Removed"
443 Pman.Dialog.PersonEdit.dialog.show( { id : 0 } , function() {
444 _this.grid.footer.onClick('first');
448 cls : 'x-btn-text-icon',
450 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
459 Pman.Dialog.PersonBulkAdd.dialog.show( { id : 0 } , function() {
460 _this.grid.footer.onClick('first');
464 cls : 'x-btn-text-icon',
466 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
474 var s = _this.grid.getSelectionModel().getSelections();
475 if (!s.length || (s.length > 1)) {
476 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
480 Pman.Dialog.PersonEdit.dialog.show(s[0].data, function() {
481 _this.grid.footer.onClick('first');
486 cls : 'x-btn-text-icon',
488 icon : Roo.rootURL + 'images/default/tree/leaf.gif'
504 // Pman.genericDelete(_this, 'Person');
507 cls : 'x-btn-text-icon',
509 icon : rootURL + '/Pman/templates/images/trash.gif'
515 xtype: 'ColumnModel',
517 dataIndex : 'project_id_code',
520 renderer : function(v) { return String.format('{0}', v); }
523 xtype: 'ColumnModel',
525 dataIndex : 'company_id_comptype',
528 renderer : function(v,x,r) {
529 if (r.data.office_id) {
530 return String.format('{0} - {1}', v, r.data.office_id_name);
532 return String.format('{0}', v);
536 xtype: 'ColumnModel',
538 dataIndex : 'company_id_name',
541 renderer : function(v,x,r) {
542 if (r.data.office_id) {
543 return String.format('{0} - {1}', v, r.data.office_id_name);
545 return String.format('{0}', v);
549 xtype: 'ColumnModel',
554 renderer : function(v) { return String.format('{0}', v); }
557 xtype: 'ColumnModel',
562 renderer : function(v) { return String.format('{0}', v); }
565 xtype: 'ColumnModel',
570 renderer : function(v) { return String.format('{0}', v); }
573 xtype: 'ColumnModel',
578 renderer : function(v) { return String.format('{0}', v); }
581 xtype: 'ColumnModel',
586 renderer : function(v) { return String.format('{0}', v); }
589 xtype: 'ColumnModel',
593 dataIndex : 'active',
594 renderer : function(v) { return String.format('{0}', v); }
599 this.layout = this.panel.layout;