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 '68be4837f6c739877233e527a996dd00' :"Merge",
17 '155ca6a755e25c15ad7ce45e2f638f10' :"Displaying Companies{0} - {1} of {2}",
18 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
19 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
20 '9c9745a343efeacc9efe9b7222b27afb' :"Ref#",
21 '49ee3087348e8d44e1feda1917443987' :"Name",
22 '2e006b735fbd916d8ab26978ae6714d4' :"Tel",
23 'dd7bf230fde8d4836917806aff6a6b27' :"Address",
24 '9810aa2b9f44401be4bf73188ef2b67d' :"Fax"
27 part : ["Admin", "Companies" ],
28 order : '030-Pman.Tab.AdminCompanies',
30 parent : 'Pman.Tab.Admin',
31 name : "Pman.Tab.AdminCompanies",
33 permname : 'Admin.Companies',
39 xtype : 'NestedLayoutPanel',
41 title : _this._strings['edefbda3a2bdd979e42d8944b7325b79'] /* Companies */,
45 xtype : 'BorderLayout',
49 xtype : 'LayoutRegion',
54 xtype : 'LayoutRegion',
68 tableName : 'Companies',
69 title : _this._strings['edefbda3a2bdd979e42d8944b7325b79'] /* Companies */,
71 activate : function() {
74 _this.grid.footer.onClick('first');
82 autoExpandColumn : 'name',
88 _this.dialog = Pman.Dialog.Companies;
89 if (_this.panel.active) {
90 this.footer.onClick('first');
93 rowclick : function (_self, rowIndex, e)
95 try { Pman.Tab.AdminOffice.grid.footer.onClick('refresh'); } catch(e) {}
97 rowdblclick : function (_self, rowIndex, e)
102 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
103 _this.grid.footer.onClick('first');
112 xtype : 'PagingToolbar',
114 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
115 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
128 render : function (_self)
130 _this.searchBox = _self;
132 show : function (_self)
136 specialkey : function (_self, e)
138 if (e.getKey() == 13) {
139 _this.grid.footer.onClick( 'first' );
149 icon : rootURL + '/Pman/templates/images/search.gif',
151 click : function (_self, e)
153 _this.grid.footer.onClick('first');
157 '|xns' : 'Roo.Toolbar'
162 icon : rootURL + '/Pman/templates/images/edit-clear.gif',
164 click : function (_self, e)
166 _this.searchBox.setValue('');
167 _this.grid.footer.onClick('first');
171 '|xns' : 'Roo.Toolbar'
176 '|xns' : 'Roo.Toolbar'
180 cls : 'x-btn-text-icon',
181 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
182 text : _this._strings['68be4837f6c739877233e527a996dd00'] /* Merge */,
186 var s = _this.grid.getSelectionModel().getSelections();
188 if (!s.length || (s.length > 1)) {
189 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
196 Pman.Dialog.AdminCompanyMerge.show(s[0].data, function() {
197 _this.grid.footer.onClick('first');
203 '|xns' : 'Roo.Toolbar'
208 '|xns' : 'Roo.Toolbar'
212 cls : 'x-btn-text-icon',
213 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
214 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
221 _this.dialog.show( { id : 0 } , function() {
222 _this.grid.footer.onClick('first');
227 '|xns' : 'Roo.Toolbar'
231 cls : 'x-btn-text-icon',
232 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
233 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
237 var s = _this.grid.getSelectionModel().getSelections();
238 if (!s.length || (s.length > 1)) {
239 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
245 _this.dialog.show(s[0].data, function() {
246 _this.grid.footer.onClick('first');
252 '|xns' : 'Roo.Toolbar'
256 cls : 'x-btn-text-icon',
257 icon : rootURL + '/Pman/templates/images/trash.gif',
258 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
262 Pman.genericDelete(_this, 'Companies');
266 '|xns' : 'Roo.Toolbar'
273 sortInfo : { field : 'name', direction: 'ASC' },
275 beforeload : function (_self, o)
277 o.params = o.params || {};
279 o.params['query[name]'] = _this.searchBox.getValue();
280 } catch(e) { return false; }
282 load : function (_self, records, options)
285 Pman.Tab.AdminOffice.grid.footer.onClick('refresh');
294 url : baseURL + '/Roo/Companies.php',
296 load : function (This, o, arg)
305 xtype : 'JsonReader',
352 'name': 'background_color',
364 'name': 'main_office_id',
368 'name': 'created_by',
372 'name': 'created_dt',
374 'dateFormat': 'Y-m-d'
377 'name': 'updated_by',
381 'name': 'updated_dt',
383 'dateFormat': 'Y-m-d'
390 'name': 'dispatch_port',
402 'name': 'logo_id_id',
406 'name': 'logo_id_filename',
410 'name': 'logo_id_ontable',
414 'name': 'logo_id_onid',
418 'name': 'logo_id_mimetype',
422 'name': 'logo_id_width',
426 'name': 'logo_id_height',
430 'name': 'logo_id_filesize',
434 'name': 'logo_id_displayorder',
438 'name': 'logo_id_language',
442 'name': 'logo_id_parent_image_id',
446 'name': 'logo_id_created',
450 'name': 'logo_id_imgtype',
454 'name': 'logo_id_linkurl',
458 'name': 'logo_id_descript',
462 'name': 'logo_id_title',
466 'name': 'owner_id_id',
470 'name': 'owner_id_office_id',
474 'name': 'owner_id_name',
478 'name': 'owner_id_phone',
482 'name': 'owner_id_fax',
486 'name': 'owner_id_email',
490 'name': 'owner_id_company_id',
494 'name': 'owner_id_role',
498 'name': 'owner_id_active',
502 'name': 'owner_id_remarks',
506 'name': 'owner_id_passwd',
510 'name': 'owner_id_owner_id',
514 'name': 'owner_id_lang',
518 'name': 'owner_id_no_reset_sent',
522 'name': 'owner_id_action_type',
526 'name': 'owner_id_project_id',
530 'name': 'owner_id_deleted_by',
534 'name': 'owner_id_deleted_dt',
538 'name': 'main_office_id_id',
542 'name': 'main_office_id_company_id',
546 'name': 'main_office_id_name',
550 'name': 'main_office_id_address',
554 'name': 'main_office_id_phone',
558 'name': 'main_office_id_fax',
562 'name': 'main_office_id_email',
566 'name': 'main_office_id_role',
572 totalProperty : 'total',
579 xtype : 'ColumnModel',
580 dataIndex : 'comptype',
581 header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
582 renderer : function (v,x ,r) {
583 //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
592 xtype : 'ColumnModel',
594 header : _this._strings['9c9745a343efeacc9efe9b7222b27afb'] /* Ref# */,
595 renderer : function(v) { return String.format('{0}', v); },
602 xtype : 'ColumnModel',
604 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
605 renderer : function(v,x,r) {
606 return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);
614 xtype : 'ColumnModel',
616 header : _this._strings['2e006b735fbd916d8ab26978ae6714d4'] /* Tel */,
617 renderer : function(v) { return String.format('{0}', v); },
623 xtype : 'ColumnModel',
625 header : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
626 renderer : function(v) { return String.format('{0}', v); },
632 xtype : 'ColumnModel',
634 header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
635 renderer : function (v) {
636 return (v.length && v.indexOf('@') > 0 ) ?
637 String.format('<a href="mailto:{0}">{0}</a>',v) : v;
646 xtype : 'ColumnModel',
647 dataIndex : 'address',
648 header : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
649 renderer : function(v) { return String.format('{0}', v); },
656 xtype : 'ColumnModel',
657 dataIndex : 'remarks',
658 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
659 renderer : function(v) { return String.format('{0}', v); },