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.AdminProjectManager',
12 module : Pman.Tab.AdminProjectManager,
15 name : "unnamed module",
21 Pman.Tab.AdminProjectManager = new Roo.util.Observable({
27 add : function(parentLayout, region)
31 this.parentLayout = parentLayout;
33 this.panel = parentLayout.addxtype({
34 xtype: 'NestedLayoutPanel',
39 xtype: 'BorderLayout',
48 tableName : 'Projects',
52 activate : function() {
55 _this.grid.footer.onClick('first');
62 autoExpandColumn : 'name',
68 //_this.dialog = Pman.Dialog.FILL_IN
69 if (_this.panel.active) {
70 this.footer.onClick('first');
73 rowdblclick : function (_self, rowIndex, e)
75 if (!_this.dialog) return;
76 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
77 _this.grid.footer.onClick('first');
85 sortInfo : { field : 'name', direction: 'ASC' },
90 url : baseURL + '/Roo/Projects.php'
95 totalProperty : 'total',
136 'name': 'file_location',
142 'dateFormat': 'Y-m-d'
149 'name': 'close_date',
151 'dateFormat': 'Y-m-d'
166 'name': 'client_id_code',
170 'name': 'client_id_name',
174 'name': 'client_id_remarks',
178 'name': 'client_id_owner_id',
182 'name': 'client_id_address',
186 'name': 'client_id_tel',
190 'name': 'client_id_fax',
194 'name': 'client_id_email',
198 'name': 'client_id_id',
202 'name': 'client_id_isOwner',
206 'name': 'client_id_logo_id',
210 'name': 'client_id_background_color',
214 'name': 'client_id_comptype',
218 'name': 'client_id_url',
222 'name': 'client_id_main_office_id',
226 'name': 'client_id_created_by',
230 'name': 'client_id_created_dt',
234 'name': 'client_id_updated_by',
238 'name': 'client_id_updated_dt',
242 'name': 'client_id_passwd',
246 'name': 'agency_id_code',
250 'name': 'agency_id_name',
254 'name': 'agency_id_remarks',
258 'name': 'agency_id_owner_id',
262 'name': 'agency_id_address',
266 'name': 'agency_id_tel',
270 'name': 'agency_id_fax',
274 'name': 'agency_id_email',
278 'name': 'agency_id_id',
282 'name': 'agency_id_isOwner',
286 'name': 'agency_id_logo_id',
290 'name': 'agency_id_background_color',
294 'name': 'agency_id_comptype',
298 'name': 'agency_id_url',
302 'name': 'agency_id_main_office_id',
306 'name': 'agency_id_created_by',
310 'name': 'agency_id_created_dt',
314 'name': 'agency_id_updated_by',
318 'name': 'agency_id_updated_dt',
322 'name': 'agency_id_passwd',
326 'name': 'team_id_id',
330 'name': 'team_id_name',
334 'name': 'team_id_type',
338 'name': 'team_id_leader',
342 'name': 'open_by_id',
346 'name': 'open_by_office_id',
350 'name': 'open_by_name',
354 'name': 'open_by_phone',
358 'name': 'open_by_fax',
362 'name': 'open_by_email',
366 'name': 'open_by_company_id',
370 'name': 'open_by_role',
374 'name': 'open_by_active',
378 'name': 'open_by_remarks',
382 'name': 'open_by_passwd',
386 'name': 'open_by_owner_id',
390 'name': 'open_by_lang',
394 'name': 'open_by_no_reset_sent',
398 'name': 'open_by_action_type',
402 'name': 'open_by_project_id',
406 'name': 'owner_id_id',
410 'name': 'owner_id_office_id',
414 'name': 'owner_id_name',
418 'name': 'owner_id_phone',
422 'name': 'owner_id_fax',
426 'name': 'owner_id_email',
430 'name': 'owner_id_company_id',
434 'name': 'owner_id_role',
438 'name': 'owner_id_active',
442 'name': 'owner_id_remarks',
446 'name': 'owner_id_passwd',
450 'name': 'owner_id_owner_id',
454 'name': 'owner_id_lang',
458 'name': 'owner_id_no_reset_sent',
462 'name': 'owner_id_action_type',
466 'name': 'owner_id_project_id',
473 xtype: 'PagingToolbar',
477 displayMsg : 'Displaying Projects{0} - {1} of {2}',
478 emptyMsg : 'No Projects found'
488 cls : 'x-btn-text-icon',
489 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
493 if (!_this.dialog) return;
494 _this.dialog.show( { id : 0 } , function() {
495 _this.grid.footer.onClick('first');
504 cls : 'x-btn-text-icon',
505 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
509 var s = _this.grid.getSelectionModel().getSelections();
510 if (!s.length || (s.length > 1)) {
511 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
514 if (!_this.dialog) return;
515 _this.dialog.show(s[0].data, function() {
516 _this.grid.footer.onClick('first');
526 cls : 'x-btn-text-icon',
527 icon : rootURL + '/Pman/templates/images/trash.gif',
531 Pman.genericDelete(_this, 'Projects');
539 xtype: 'ColumnModel',
544 renderer : function(v) { return String.format('{0}', v); }
547 xtype: 'ColumnModel',
552 renderer : function(v) { return String.format('{0}', v); }
555 xtype: 'ColumnModel',
559 dataIndex : 'remarks',
560 renderer : function(v) { return String.format('{0}', v); }
563 xtype: 'ColumnModel',
567 dataIndex : 'owner_id',
568 renderer : function(v) { return String.format('{0}', v); }
571 xtype: 'ColumnModel',
576 renderer : function(v) { return String.format('{0}', v); }
579 xtype: 'ColumnModel',
583 dataIndex : 'active',
584 renderer : function(v) { return String.format('{0}', v); }
587 xtype: 'ColumnModel',
591 dataIndex : 'client_id',
592 renderer : function(v) { return String.format('{0}', v); }
595 xtype: 'ColumnModel',
599 dataIndex : 'team_id',
600 renderer : function(v) { return String.format('{0}', v); }
603 xtype: 'ColumnModel',
605 header : 'File location',
607 dataIndex : 'file_location',
608 renderer : function(v) { return String.format('{0}', v); }
611 xtype: 'ColumnModel',
613 header : 'Open date',
615 dataIndex : 'open_date',
616 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
619 xtype: 'ColumnModel',
623 dataIndex : 'open_by',
624 renderer : function(v) { return String.format('{0}', v); }
627 xtype: 'ColumnModel',
629 header : 'Close date',
631 dataIndex : 'close_date',
632 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
635 xtype: 'ColumnModel',
637 header : 'Countries',
639 dataIndex : 'countries',
640 renderer : function(v) { return String.format('{0}', v); }
643 xtype: 'ColumnModel',
645 header : 'Languages',
647 dataIndex : 'languages',
648 renderer : function(v) { return String.format('{0}', v); }
651 xtype: 'ColumnModel',
655 dataIndex : 'agency_id',
656 renderer : function(v) { return String.format('{0}', v); }
663 xtype: 'LayoutRegion',
667 xtype: 'LayoutRegion',
673 this.layout = this.panel.layout;