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 : '002-Pman.Tab.AdminProjectManager',
12 module : Pman.Tab.AdminProjectManager,
14 parent : Pman.Tab.Admin,
15 name : "Pman.Tab.AdminProjectManager",
17 permname: 'Core.Projects_All'
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' },
87 beforeload : function (_self, options)
96 url : baseURL + '/Roo/Projects.php'
101 totalProperty : 'total',
142 'name': 'file_location',
148 'dateFormat': 'Y-m-d'
155 'name': 'close_date',
157 'dateFormat': 'Y-m-d'
172 'name': 'client_id_code',
176 'name': 'client_id_name',
180 'name': 'client_id_remarks',
184 'name': 'client_id_owner_id',
188 'name': 'client_id_address',
192 'name': 'client_id_tel',
196 'name': 'client_id_fax',
200 'name': 'client_id_email',
204 'name': 'client_id_id',
208 'name': 'client_id_isOwner',
212 'name': 'client_id_logo_id',
216 'name': 'client_id_background_color',
220 'name': 'client_id_comptype',
224 'name': 'client_id_url',
228 'name': 'client_id_main_office_id',
232 'name': 'client_id_created_by',
236 'name': 'client_id_created_dt',
240 'name': 'client_id_updated_by',
244 'name': 'client_id_updated_dt',
248 'name': 'client_id_passwd',
252 'name': 'agency_id_code',
256 'name': 'agency_id_name',
260 'name': 'agency_id_remarks',
264 'name': 'agency_id_owner_id',
268 'name': 'agency_id_address',
272 'name': 'agency_id_tel',
276 'name': 'agency_id_fax',
280 'name': 'agency_id_email',
284 'name': 'agency_id_id',
288 'name': 'agency_id_isOwner',
292 'name': 'agency_id_logo_id',
296 'name': 'agency_id_background_color',
300 'name': 'agency_id_comptype',
304 'name': 'agency_id_url',
308 'name': 'agency_id_main_office_id',
312 'name': 'agency_id_created_by',
316 'name': 'agency_id_created_dt',
320 'name': 'agency_id_updated_by',
324 'name': 'agency_id_updated_dt',
328 'name': 'agency_id_passwd',
332 'name': 'team_id_id',
336 'name': 'team_id_name',
340 'name': 'team_id_type',
344 'name': 'team_id_leader',
348 'name': 'open_by_id',
352 'name': 'open_by_office_id',
356 'name': 'open_by_name',
360 'name': 'open_by_phone',
364 'name': 'open_by_fax',
368 'name': 'open_by_email',
372 'name': 'open_by_company_id',
376 'name': 'open_by_role',
380 'name': 'open_by_active',
384 'name': 'open_by_remarks',
388 'name': 'open_by_passwd',
392 'name': 'open_by_owner_id',
396 'name': 'open_by_lang',
400 'name': 'open_by_no_reset_sent',
404 'name': 'open_by_action_type',
408 'name': 'open_by_project_id',
412 'name': 'owner_id_id',
416 'name': 'owner_id_office_id',
420 'name': 'owner_id_name',
424 'name': 'owner_id_phone',
428 'name': 'owner_id_fax',
432 'name': 'owner_id_email',
436 'name': 'owner_id_company_id',
440 'name': 'owner_id_role',
444 'name': 'owner_id_active',
448 'name': 'owner_id_remarks',
452 'name': 'owner_id_passwd',
456 'name': 'owner_id_owner_id',
460 'name': 'owner_id_lang',
464 'name': 'owner_id_no_reset_sent',
468 'name': 'owner_id_action_type',
472 'name': 'owner_id_project_id',
479 xtype: 'PagingToolbar',
483 displayMsg : 'Displaying Projects{0} - {1} of {2}',
484 emptyMsg : 'No Projects found'
494 cls : 'x-btn-text-icon',
495 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
499 if (!_this.dialog) return;
500 _this.dialog.show( { id : 0 } , function() {
501 _this.grid.footer.onClick('first');
510 cls : 'x-btn-text-icon',
511 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
515 var s = _this.grid.getSelectionModel().getSelections();
516 if (!s.length || (s.length > 1)) {
517 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
520 if (!_this.dialog) return;
521 _this.dialog.show(s[0].data, function() {
522 _this.grid.footer.onClick('first');
532 cls : 'x-btn-text-icon',
533 icon : rootURL + '/Pman/templates/images/trash.gif',
537 Pman.genericDelete(_this, 'Projects');
545 xtype: 'ColumnModel',
550 renderer : function(v) { return String.format('{0}', v); }
553 xtype: 'ColumnModel',
558 renderer : function(v) { return String.format('{0}', v); }
561 xtype: 'ColumnModel',
566 renderer : function(v) { return String.format('{0}', v); }
569 xtype: 'ColumnModel',
573 dataIndex : 'client_id',
574 renderer : function(v) { return String.format('{0}', v); }
581 xtype: 'LayoutRegion',
585 xtype: 'LayoutRegion',
591 this.layout = this.panel.layout;