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.AdminCompanies = new Roo.XComponent({
10 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
11 '231bc72756b5e6de492aaaa1577f61b1' :"Remarks",
12 'edefbda3a2bdd979e42d8944b7325b79' :"Companies",
13 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
14 'fc6f97505d89fe9277965c126744647a' :"No Companies found",
15 '7dce122004969d56ae2e0245cb754d35' :"Edit",
16 '155ca6a755e25c15ad7ce45e2f638f10' :"Displaying Companies{0} - {1} of {2}",
17 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
18 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
19 '9c9745a343efeacc9efe9b7222b27afb' :"Ref#",
20 '49ee3087348e8d44e1feda1917443987' :"Name",
21 '2e006b735fbd916d8ab26978ae6714d4' :"Tel",
22 'dd7bf230fde8d4836917806aff6a6b27' :"Address",
23 '9810aa2b9f44401be4bf73188ef2b67d' :"Fax"
26 part : ["Admin", "Companies" ],
27 order : '030-Pman.Tab.AdminCompanies',
29 parent : 'Pman.Tab.Admin',
30 name : "Pman.Tab.AdminCompanies",
32 permname : 'Admin.Companies',
39 title : _this._strings['edefbda3a2bdd979e42d8944b7325b79'] /* Companies */,
42 xtype : 'NestedLayoutPanel',
46 xtype : 'BorderLayout',
50 xtype : 'LayoutRegion'
58 xtype : 'LayoutRegion'
66 tableName : 'Companies',
67 title : _this._strings['edefbda3a2bdd979e42d8944b7325b79'] /* Companies */,
72 activate : function() {
75 _this.grid.footer.onClick('first');
80 autoExpandColumn : 'name',
89 _this.dialog = Pman.Dialog.Companies;
90 if (_this.panel.active) {
91 this.footer.onClick('first');
94 rowclick : function (_self, rowIndex, e)
96 try { Pman.Tab.AdminOffice.grid.footer.onClick('refresh'); } catch(e) {}
98 rowdblclick : function (_self, rowIndex, e)
103 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
104 _this.grid.footer.onClick('first');
112 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
113 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
117 xtype : 'PagingToolbar'
129 render : function (_self)
131 _this.searchBox = _self;
133 show : function (_self)
137 specialkey : function (_self, e)
139 if (e.getKey() == 13) {
140 _this.grid.footer.onClick( 'first' );
147 icon : rootURL + '/Pman/templates/images/search.gif',
149 '|xns' : 'Roo.Toolbar',
152 click : function (_self, e)
154 _this.grid.footer.onClick('first');
160 icon : rootURL + '/Pman/templates/images/edit-clear.gif',
162 '|xns' : 'Roo.Toolbar',
165 click : function (_self, e)
167 _this.searchBox.setValue('');
168 _this.grid.footer.onClick('first');
174 '|xns' : 'Roo.Toolbar',
178 cls : 'x-btn-text-icon',
179 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
180 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
182 '|xns' : 'Roo.Toolbar',
190 _this.dialog.show( { id : 0 } , function() {
191 _this.grid.footer.onClick('first');
197 cls : 'x-btn-text-icon',
198 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
199 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
201 '|xns' : 'Roo.Toolbar',
206 var s = _this.grid.getSelectionModel().getSelections();
207 if (!s.length || (s.length > 1)) {
208 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
214 _this.dialog.show(s[0].data, function() {
215 _this.grid.footer.onClick('first');
222 cls : 'x-btn-text-icon',
223 icon : rootURL + '/Pman/templates/images/trash.gif',
224 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
226 '|xns' : 'Roo.Toolbar',
231 Pman.genericDelete(_this, 'Companies');
239 sortInfo : { field : 'name', direction: 'ASC' },
244 beforeload : function (_self, o)
246 o.params = o.params || {};
248 o.params['query[name]'] = _this.searchBox.getValue();
249 } catch(e) { return false; }
251 load : function (_self, records, options)
254 Pman.Tab.AdminOffice.grid.footer.onClick('refresh');
260 url : baseURL + '/Roo/Companies.php',
265 load : function (This, o, arg)
318 'name': 'background_color',
330 'name': 'main_office_id',
334 'name': 'created_by',
338 'name': 'created_dt',
340 'dateFormat': 'Y-m-d'
343 'name': 'updated_by',
347 'name': 'updated_dt',
349 'dateFormat': 'Y-m-d'
356 'name': 'dispatch_port',
368 'name': 'logo_id_id',
372 'name': 'logo_id_filename',
376 'name': 'logo_id_ontable',
380 'name': 'logo_id_onid',
384 'name': 'logo_id_mimetype',
388 'name': 'logo_id_width',
392 'name': 'logo_id_height',
396 'name': 'logo_id_filesize',
400 'name': 'logo_id_displayorder',
404 'name': 'logo_id_language',
408 'name': 'logo_id_parent_image_id',
412 'name': 'logo_id_created',
416 'name': 'logo_id_imgtype',
420 'name': 'logo_id_linkurl',
424 'name': 'logo_id_descript',
428 'name': 'logo_id_title',
432 'name': 'owner_id_id',
436 'name': 'owner_id_office_id',
440 'name': 'owner_id_name',
444 'name': 'owner_id_phone',
448 'name': 'owner_id_fax',
452 'name': 'owner_id_email',
456 'name': 'owner_id_company_id',
460 'name': 'owner_id_role',
464 'name': 'owner_id_active',
468 'name': 'owner_id_remarks',
472 'name': 'owner_id_passwd',
476 'name': 'owner_id_owner_id',
480 'name': 'owner_id_lang',
484 'name': 'owner_id_no_reset_sent',
488 'name': 'owner_id_action_type',
492 'name': 'owner_id_project_id',
496 'name': 'owner_id_deleted_by',
500 'name': 'owner_id_deleted_dt',
504 'name': 'main_office_id_id',
508 'name': 'main_office_id_company_id',
512 'name': 'main_office_id_name',
516 'name': 'main_office_id_address',
520 'name': 'main_office_id_phone',
524 'name': 'main_office_id_fax',
528 'name': 'main_office_id_email',
532 'name': 'main_office_id_role',
538 totalProperty : 'total',
546 dataIndex : 'comptype',
547 header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
548 renderer : function (v,x ,r) {
549 //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
556 xtype : 'ColumnModel'
560 header : _this._strings['9c9745a343efeacc9efe9b7222b27afb'] /* Ref# */,
561 renderer : function(v) { return String.format('{0}', v); },
566 xtype : 'ColumnModel'
570 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
571 renderer : function(v,x,r) {
572 return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);
578 xtype : 'ColumnModel'
582 header : _this._strings['2e006b735fbd916d8ab26978ae6714d4'] /* Tel */,
583 renderer : function(v) { return String.format('{0}', v); },
587 xtype : 'ColumnModel'
591 header : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
592 renderer : function(v) { return String.format('{0}', v); },
596 xtype : 'ColumnModel'
600 header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
601 renderer : function (v) {
602 return (v.length && v.indexOf('@') > 0 ) ?
603 String.format('<a href="mailto:{0}">{0}</a>',v) : v;
610 xtype : 'ColumnModel'
613 dataIndex : 'address',
614 header : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
615 renderer : function(v) { return String.format('{0}', v); },
620 xtype : 'ColumnModel'
623 dataIndex : 'remarks',
624 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
625 renderer : function(v) { return String.format('{0}', v); },
629 xtype : 'ColumnModel'