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');
66 //_this.dialog = Pman.Dialog.FILL_IN
67 if (_this.panel.active) {
68 this.footer.onClick('first');
71 rowdblclick : function (_self, rowIndex, e)
73 if (!_this.dialog) return;
74 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
75 _this.grid.footer.onClick('first');
80 autoExpandColumn : 'name',
82 getTypes : function() {
84 [ 'U' , "Project (Unconfirmed)" ],
86 [ 'C' , "Project (Closed)" ],
87 [ 'N' , "Non-Project" ],
88 [ 'X' , "Non-Project (Closed)" ]
92 typeToString : function(v)
94 var ar = this.getTypes();
96 Roo.each(ar, function(a) {
108 beforeload : function (_self, options)
110 if (!_this.searchBox) {
113 o.params = o.params ? o.params : {};
114 o.params['query[project_search]'] = _this.searchBox.getValue();
115 o.params['query[project_filter]'] = _this.filter;
119 sortInfo : { field : 'code', direction: 'ASC' },
124 url : baseURL + '/Roo/Projects.php'
129 totalProperty : 'total',
170 'name': 'file_location',
176 'dateFormat': 'Y-m-d'
183 'name': 'close_date',
185 'dateFormat': 'Y-m-d'
200 'name': 'client_id_code',
204 'name': 'client_id_name',
208 'name': 'client_id_remarks',
212 'name': 'client_id_owner_id',
216 'name': 'client_id_address',
220 'name': 'client_id_tel',
224 'name': 'client_id_fax',
228 'name': 'client_id_email',
232 'name': 'client_id_id',
236 'name': 'client_id_isOwner',
240 'name': 'client_id_logo_id',
244 'name': 'client_id_background_color',
248 'name': 'client_id_comptype',
252 'name': 'client_id_url',
256 'name': 'client_id_main_office_id',
260 'name': 'client_id_created_by',
264 'name': 'client_id_created_dt',
268 'name': 'client_id_updated_by',
272 'name': 'client_id_updated_dt',
276 'name': 'client_id_passwd',
280 'name': 'agency_id_code',
284 'name': 'agency_id_name',
288 'name': 'agency_id_remarks',
292 'name': 'agency_id_owner_id',
296 'name': 'agency_id_address',
300 'name': 'agency_id_tel',
304 'name': 'agency_id_fax',
308 'name': 'agency_id_email',
312 'name': 'agency_id_id',
316 'name': 'agency_id_isOwner',
320 'name': 'agency_id_logo_id',
324 'name': 'agency_id_background_color',
328 'name': 'agency_id_comptype',
332 'name': 'agency_id_url',
336 'name': 'agency_id_main_office_id',
340 'name': 'agency_id_created_by',
344 'name': 'agency_id_created_dt',
348 'name': 'agency_id_updated_by',
352 'name': 'agency_id_updated_dt',
356 'name': 'agency_id_passwd',
360 'name': 'team_id_id',
364 'name': 'team_id_name',
368 'name': 'team_id_type',
372 'name': 'team_id_leader',
376 'name': 'open_by_id',
380 'name': 'open_by_office_id',
384 'name': 'open_by_name',
388 'name': 'open_by_phone',
392 'name': 'open_by_fax',
396 'name': 'open_by_email',
400 'name': 'open_by_company_id',
404 'name': 'open_by_role',
408 'name': 'open_by_active',
412 'name': 'open_by_remarks',
416 'name': 'open_by_passwd',
420 'name': 'open_by_owner_id',
424 'name': 'open_by_lang',
428 'name': 'open_by_no_reset_sent',
432 'name': 'open_by_action_type',
436 'name': 'open_by_project_id',
440 'name': 'owner_id_id',
444 'name': 'owner_id_office_id',
448 'name': 'owner_id_name',
452 'name': 'owner_id_phone',
456 'name': 'owner_id_fax',
460 'name': 'owner_id_email',
464 'name': 'owner_id_company_id',
468 'name': 'owner_id_role',
472 'name': 'owner_id_active',
476 'name': 'owner_id_remarks',
480 'name': 'owner_id_passwd',
484 'name': 'owner_id_owner_id',
488 'name': 'owner_id_lang',
492 'name': 'owner_id_no_reset_sent',
496 'name': 'owner_id_action_type',
500 'name': 'owner_id_project_id',
507 xtype: 'PagingToolbar',
511 displayMsg : 'Displaying Projects{0} - {1} of {2}',
512 emptyMsg : 'No Projects found'
522 cls : 'x-btn-text-icon',
523 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
527 if (!_this.dialog) return;
528 _this.dialog.show( { id : 0 } , function() {
529 _this.grid.footer.onClick('first');
538 cls : 'x-btn-text-icon',
539 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
543 var s = _this.grid.getSelectionModel().getSelections();
544 if (!s.length || (s.length > 1)) {
545 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
548 if (!_this.dialog) return;
549 _this.dialog.show(s[0].data, function() {
550 _this.grid.footer.onClick('first');
560 cls : 'x-btn-text-icon',
561 icon : rootURL + '/Pman/templates/images/trash.gif',
565 Pman.genericDelete(_this, 'Projects');
573 xtype: 'ColumnModel',
578 renderer : function(v) { return _this.grid.typeToString(v);}
581 xtype: 'ColumnModel',
586 renderer : function(v) { return String.format('{0}', v); }
589 xtype: 'ColumnModel',
594 renderer : function(v) { return String.format('{0}', v); }
597 xtype: 'ColumnModel',
601 dataIndex : 'client_id',
602 renderer : function(v) { return String.format('{0}', v); }
609 xtype: 'LayoutRegion',
613 xtype: 'LayoutRegion',
619 this.layout = this.panel.layout;