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();
187 if (!s.length || (s.length > 1)) {
188 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
192 _this.dialog.show(s[0].data, function() {
193 _this.grid.footer.onClick('first');
199 '|xns' : 'Roo.Toolbar'
204 '|xns' : 'Roo.Toolbar'
208 cls : 'x-btn-text-icon',
209 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
210 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
217 _this.dialog.show( { id : 0 } , function() {
218 _this.grid.footer.onClick('first');
223 '|xns' : 'Roo.Toolbar'
227 cls : 'x-btn-text-icon',
228 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
229 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
233 var s = _this.grid.getSelectionModel().getSelections();
234 if (!s.length || (s.length > 1)) {
235 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
241 _this.dialog.show(s[0].data, function() {
242 _this.grid.footer.onClick('first');
248 '|xns' : 'Roo.Toolbar'
252 cls : 'x-btn-text-icon',
253 icon : rootURL + '/Pman/templates/images/trash.gif',
254 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
258 Pman.genericDelete(_this, 'Companies');
262 '|xns' : 'Roo.Toolbar'
269 sortInfo : { field : 'name', direction: 'ASC' },
271 beforeload : function (_self, o)
273 o.params = o.params || {};
275 o.params['query[name]'] = _this.searchBox.getValue();
276 } catch(e) { return false; }
278 load : function (_self, records, options)
281 Pman.Tab.AdminOffice.grid.footer.onClick('refresh');
290 url : baseURL + '/Roo/Companies.php',
292 load : function (This, o, arg)
301 xtype : 'JsonReader',
348 'name': 'background_color',
360 'name': 'main_office_id',
364 'name': 'created_by',
368 'name': 'created_dt',
370 'dateFormat': 'Y-m-d'
373 'name': 'updated_by',
377 'name': 'updated_dt',
379 'dateFormat': 'Y-m-d'
386 'name': 'dispatch_port',
398 'name': 'logo_id_id',
402 'name': 'logo_id_filename',
406 'name': 'logo_id_ontable',
410 'name': 'logo_id_onid',
414 'name': 'logo_id_mimetype',
418 'name': 'logo_id_width',
422 'name': 'logo_id_height',
426 'name': 'logo_id_filesize',
430 'name': 'logo_id_displayorder',
434 'name': 'logo_id_language',
438 'name': 'logo_id_parent_image_id',
442 'name': 'logo_id_created',
446 'name': 'logo_id_imgtype',
450 'name': 'logo_id_linkurl',
454 'name': 'logo_id_descript',
458 'name': 'logo_id_title',
462 'name': 'owner_id_id',
466 'name': 'owner_id_office_id',
470 'name': 'owner_id_name',
474 'name': 'owner_id_phone',
478 'name': 'owner_id_fax',
482 'name': 'owner_id_email',
486 'name': 'owner_id_company_id',
490 'name': 'owner_id_role',
494 'name': 'owner_id_active',
498 'name': 'owner_id_remarks',
502 'name': 'owner_id_passwd',
506 'name': 'owner_id_owner_id',
510 'name': 'owner_id_lang',
514 'name': 'owner_id_no_reset_sent',
518 'name': 'owner_id_action_type',
522 'name': 'owner_id_project_id',
526 'name': 'owner_id_deleted_by',
530 'name': 'owner_id_deleted_dt',
534 'name': 'main_office_id_id',
538 'name': 'main_office_id_company_id',
542 'name': 'main_office_id_name',
546 'name': 'main_office_id_address',
550 'name': 'main_office_id_phone',
554 'name': 'main_office_id_fax',
558 'name': 'main_office_id_email',
562 'name': 'main_office_id_role',
568 totalProperty : 'total',
575 xtype : 'ColumnModel',
576 dataIndex : 'comptype',
577 header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
578 renderer : function (v,x ,r) {
579 //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
588 xtype : 'ColumnModel',
590 header : _this._strings['9c9745a343efeacc9efe9b7222b27afb'] /* Ref# */,
591 renderer : function(v) { return String.format('{0}', v); },
598 xtype : 'ColumnModel',
600 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
601 renderer : function(v,x,r) {
602 return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);
610 xtype : 'ColumnModel',
612 header : _this._strings['2e006b735fbd916d8ab26978ae6714d4'] /* Tel */,
613 renderer : function(v) { return String.format('{0}', v); },
619 xtype : 'ColumnModel',
621 header : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
622 renderer : function(v) { return String.format('{0}', v); },
628 xtype : 'ColumnModel',
630 header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
631 renderer : function (v) {
632 return (v.length && v.indexOf('@') > 0 ) ?
633 String.format('<a href="mailto:{0}">{0}</a>',v) : v;
642 xtype : 'ColumnModel',
643 dataIndex : 'address',
644 header : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
645 renderer : function(v) { return String.format('{0}', v); },
652 xtype : 'ColumnModel',
653 dataIndex : 'remarks',
654 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
655 renderer : function(v) { return String.format('{0}', v); },