1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.AdminProjectManager = new Roo.XComponent({
10 '54e1d44609e3abed11f6e1eb6ae54988' :"Projects",
11 '8115b8afd5b2953d9fa63eb0db9559fc' :"No Projects found",
12 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
13 '13348442cc6a27032d2b4aa28b75a5d3' :"Search",
14 '7dce122004969d56ae2e0245cb754d35' :"Edit",
15 '577d7068826de925ea2aec01dbadf5e4' :"Client",
16 '917d465e9a9e8b16a8da50a1ca8156ca' :"Show:",
17 '0f111c111475c934057e6f8bb8314d56' :"Non-Projects",
18 '03f4a47830f97377a35321051685071e' :"Closed",
19 'f45e7cfb0824b6d381ade7d81bb81615' :"Displaying Projects {0} - {1} of {2}",
20 'b1c94ca2fbc3e78fc30069c8d0f01680' :"All",
21 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
22 'ca0dbad92a874b2f69b549293387925e' :"Code",
23 '49ee3087348e8d44e1feda1917443987' :"Name",
24 '93573647a6041adaabd942e88cc29e23' :"Projects / Members"
27 part : ["Admin", "ProjectManager" ],
28 order : '002-Pman.Tab.AdminProjectManager',
30 parent : 'Pman.Tab.Admin',
31 name : "Pman.Tab.AdminProjectManager",
33 permname : 'Core.Projects_All',
34 _tree : function(_data)
39 xtype : 'NestedLayoutPanel',
43 title : _this._strings['93573647a6041adaabd942e88cc29e23'] /* Projects / Members */,
47 xtype : 'BorderLayout',
51 xtype : 'LayoutRegion',
56 xtype : 'LayoutRegion',
69 tableName : 'Projects',
70 title : _this._strings['54e1d44609e3abed11f6e1eb6ae54988'] /* Projects */,
72 activate : function() {
75 _this.dialog = Pman.Dialog.CoreProject ;
78 _this.grid.footer.onClick('first');
86 autoExpandColumn : 'name',
88 getTypes : function() {
90 [ 'U' , "Project (Unconfirmed)" ],
92 [ 'C' , "Project (Closed)" ],
93 [ 'N' , "Non-Project" ],
94 [ 'X' , "Non-Project (Closed)" ]
99 typeToString : function(v)
101 var ar = this.getTypes();
103 Roo.each(ar, function(a) {
115 //_this.dialog = Pman.Dialog.FILL_IN
116 if (_this.panel.active) {
117 this.footer.onClick('first');
120 rowdblclick : function (_self, rowIndex, e)
125 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
126 _this.grid.footer.onClick('refresh');
133 xtype : 'PagingToolbar',
135 displayMsg : _this._strings['f45e7cfb0824b6d381ade7d81bb81615'] /* Displaying Projects {0} - {1} of {2} */,
136 emptyMsg : _this._strings['8115b8afd5b2953d9fa63eb0db9559fc'] /* No Projects found */,
148 cls : 'x-btn-text-icon',
149 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
150 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
157 _this.dialog.show( { id : 0 } , function() {
158 _this.grid.footer.onClick('first');
163 '|xns' : 'Roo.Toolbar'
167 cls : 'x-btn-text-icon',
168 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
169 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
173 var s = _this.grid.getSelectionModel().getSelections();
174 if (!s.length || (s.length > 1)) {
175 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
181 _this.dialog.show(s[0].data, function() {
182 _this.grid.footer.onClick('first');
188 '|xns' : 'Roo.Toolbar'
193 '|xns' : 'Roo.Toolbar'
197 text : _this._strings['13348442cc6a27032d2b4aa28b75a5d3'] /* Search */,
199 '|xns' : 'Roo.Toolbar'
204 render : function (_self)
206 _this.searchBox = _self;
208 specialkey : function (_self, e)
210 if(e.getKey() == 13) {
211 _this.grid.footer.onClick('first');
221 icon : rootURL + '/Pman/templates/images/search.gif',
223 click : function (_self, e)
225 _this.grid.footer.onClick('first');
229 '|xns' : 'Roo.Toolbar'
234 icon : rootURL + '/Pman/templates/images/edit-clear.gif',
236 click : function (_self, e)
238 _this.searchBox.setValue('');
239 _this.grid.footer.onClick('first');
243 '|xns' : 'Roo.Toolbar'
248 '|xns' : 'Roo.Toolbar'
252 text : _this._strings['917d465e9a9e8b16a8da50a1ca8156ca'] /* Show: */,
254 '|xns' : 'Roo.Toolbar'
260 text : _this._strings['b1c94ca2fbc3e78fc30069c8d0f01680'] /* All */,
261 toggleGroup : 'pgrp',
263 toggle : function (_self,st)
265 if (st) { _this.grid.filter = 'P,N,U'; }
266 _this.grid.footer.onClick('first');
271 '|xns' : 'Roo.Toolbar'
277 text : _this._strings['54e1d44609e3abed11f6e1eb6ae54988'] /* Projects */,
278 toggleGroup : 'pgrp',
280 toggle : function (_self,st)
282 if (st) { _this.grid.filter = 'P,U'; }
283 _this.grid.footer.onClick('first');
288 '|xns' : 'Roo.Toolbar'
294 text : _this._strings['0f111c111475c934057e6f8bb8314d56'] /* Non-Projects */,
295 toggleGroup : 'pgrp',
297 toggle : function (_self,st)
299 if (st) { _this.grid.filter = 'N'; }
300 _this.grid.footer.onClick('first');
305 '|xns' : 'Roo.Toolbar'
311 text : _this._strings['03f4a47830f97377a35321051685071e'] /* Closed */,
312 toggleGroup : 'pgrp',
314 toggle : function (_self, st)
316 if (st) { _this.grid.filter = 'X,C'; }
317 _this.grid.footer.onClick('first');
322 '|xns' : 'Roo.Toolbar'
329 sortInfo : { field : 'code', direction: 'ASC' },
331 beforeload : function (_self, o)
333 if (!_this.searchBox) {
336 o.params = o.params ? o.params : {};
337 o.params['query[project_search]'] = _this.searchBox.getValue();
338 o.params['query[project_filter]'] = _this.grid.filter;
346 url : baseURL + '/Roo/core_project.php',
351 xtype : 'JsonReader',
390 'name': 'file_location',
396 'dateFormat': 'Y-m-d'
403 'name': 'close_date',
405 'dateFormat': 'Y-m-d'
420 'name': 'client_id_code',
424 'name': 'client_id_name',
428 'name': 'client_id_remarks',
432 'name': 'client_id_owner_id',
436 'name': 'client_id_address',
440 'name': 'client_id_tel',
444 'name': 'client_id_fax',
448 'name': 'client_id_email',
452 'name': 'client_id_id',
456 'name': 'client_id_isOwner',
460 'name': 'client_id_logo_id',
464 'name': 'client_id_background_color',
468 'name': 'client_id_comptype',
472 'name': 'client_id_url',
476 'name': 'client_id_main_office_id',
480 'name': 'client_id_created_by',
484 'name': 'client_id_created_dt',
488 'name': 'client_id_updated_by',
492 'name': 'client_id_updated_dt',
496 'name': 'client_id_passwd',
500 'name': 'agency_id_code',
504 'name': 'agency_id_name',
508 'name': 'agency_id_remarks',
512 'name': 'agency_id_owner_id',
516 'name': 'agency_id_address',
520 'name': 'agency_id_tel',
524 'name': 'agency_id_fax',
528 'name': 'agency_id_email',
532 'name': 'agency_id_id',
536 'name': 'agency_id_isOwner',
540 'name': 'agency_id_logo_id',
544 'name': 'agency_id_background_color',
548 'name': 'agency_id_comptype',
552 'name': 'agency_id_url',
556 'name': 'agency_id_main_office_id',
560 'name': 'agency_id_created_by',
564 'name': 'agency_id_created_dt',
568 'name': 'agency_id_updated_by',
572 'name': 'agency_id_updated_dt',
576 'name': 'agency_id_passwd',
580 'name': 'team_id_id',
584 'name': 'team_id_name',
588 'name': 'team_id_type',
592 'name': 'team_id_leader',
596 'name': 'open_by_id',
600 'name': 'open_by_office_id',
604 'name': 'open_by_name',
608 'name': 'open_by_phone',
612 'name': 'open_by_fax',
616 'name': 'open_by_email',
620 'name': 'open_by_company_id',
624 'name': 'open_by_role',
628 'name': 'open_by_active',
632 'name': 'open_by_remarks',
636 'name': 'open_by_passwd',
640 'name': 'open_by_owner_id',
644 'name': 'open_by_lang',
648 'name': 'open_by_no_reset_sent',
652 'name': 'open_by_action_type',
656 'name': 'open_by_project_id',
660 'name': 'owner_id_id',
664 'name': 'owner_id_office_id',
668 'name': 'owner_id_name',
672 'name': 'owner_id_phone',
676 'name': 'owner_id_fax',
680 'name': 'owner_id_email',
684 'name': 'owner_id_company_id',
688 'name': 'owner_id_role',
692 'name': 'owner_id_active',
696 'name': 'owner_id_remarks',
700 'name': 'owner_id_passwd',
704 'name': 'owner_id_owner_id',
708 'name': 'owner_id_lang',
712 'name': 'owner_id_no_reset_sent',
716 'name': 'owner_id_action_type',
720 'name': 'owner_id_project_id',
726 totalProperty : 'total',
732 xtype : 'RowSelectionModel',
735 afterselectionchange : function (_self)
737 // load project members.
745 xtype : 'ColumnModel',
747 header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
748 renderer : function(v) { return _this.grid.typeToString(v);},
755 xtype : 'ColumnModel',
756 dataIndex : 'client_id_name',
757 header : _this._strings['577d7068826de925ea2aec01dbadf5e4'] /* Client */,
758 renderer : function(v) { return String.format('{0}', v); },
764 xtype : 'ColumnModel',
766 header : _this._strings['ca0dbad92a874b2f69b549293387925e'] /* Code */,
767 renderer : function(v) { return String.format('{0}', v); },
774 xtype : 'ColumnModel',
776 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
777 renderer : function(v) { return String.format('{0}', v); },