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)
100 if (!_this.dialog) return;
101 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
102 _this.grid.footer.onClick('first');
110 displayMsg : _this._strings['155ca6a755e25c15ad7ce45e2f638f10'] /* Displaying Companies{0} - {1} of {2} */,
111 emptyMsg : _this._strings['fc6f97505d89fe9277965c126744647a'] /* No Companies found */,
115 xtype : 'PagingToolbar'
127 render : function (_self)
129 _this.searchBox = _self;
131 show : function (_self)
135 specialkey : function (_self, e)
137 if (e.getKey() == 13) {
138 _this.grid.footer.onClick( 'first' );
145 icon : rootURL + '/Pman/templates/images/search.gif',
147 '|xns' : 'Roo.Toolbar',
150 click : function (_self, e)
152 _this.grid.footer.onClick('first');
158 icon : rootURL + '/Pman/templates/images/edit-clear.gif',
160 '|xns' : 'Roo.Toolbar',
163 click : function (_self, e)
165 _this.searchBox.setValue('');
166 _this.grid.footer.onClick('first');
172 '|xns' : 'Roo.Toolbar',
176 cls : 'x-btn-text-icon',
177 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
178 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
180 '|xns' : 'Roo.Toolbar',
185 if (!_this.dialog) return;
186 _this.dialog.show( { id : 0 } , function() {
187 _this.grid.footer.onClick('first');
193 cls : 'x-btn-text-icon',
194 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
195 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
197 '|xns' : 'Roo.Toolbar',
202 var s = _this.grid.getSelectionModel().getSelections();
203 if (!s.length || (s.length > 1)) {
204 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
207 if (!_this.dialog) return;
208 _this.dialog.show(s[0].data, function() {
209 _this.grid.footer.onClick('first');
216 cls : 'x-btn-text-icon',
217 icon : rootURL + '/Pman/templates/images/trash.gif',
218 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
220 '|xns' : 'Roo.Toolbar',
225 Pman.genericDelete(_this, 'Companies');
233 sortInfo : { field : 'name', direction: 'ASC' },
238 beforeload : function (_self, o)
240 o.params = o.params || {};
242 o.params['query[name]'] = _this.searchBox.getValue();
243 } catch(e) { return false; }
245 load : function (_self, records, options)
248 Pman.Tab.AdminOffice.grid.footer.onClick('refresh');
254 url : baseURL + '/Roo/Companies.php',
259 load : function (This, o, arg)
312 'name': 'background_color',
324 'name': 'main_office_id',
328 'name': 'created_by',
332 'name': 'created_dt',
334 'dateFormat': 'Y-m-d'
337 'name': 'updated_by',
341 'name': 'updated_dt',
343 'dateFormat': 'Y-m-d'
350 'name': 'dispatch_port',
362 'name': 'logo_id_id',
366 'name': 'logo_id_filename',
370 'name': 'logo_id_ontable',
374 'name': 'logo_id_onid',
378 'name': 'logo_id_mimetype',
382 'name': 'logo_id_width',
386 'name': 'logo_id_height',
390 'name': 'logo_id_filesize',
394 'name': 'logo_id_displayorder',
398 'name': 'logo_id_language',
402 'name': 'logo_id_parent_image_id',
406 'name': 'logo_id_created',
410 'name': 'logo_id_imgtype',
414 'name': 'logo_id_linkurl',
418 'name': 'logo_id_descript',
422 'name': 'logo_id_title',
426 'name': 'owner_id_id',
430 'name': 'owner_id_office_id',
434 'name': 'owner_id_name',
438 'name': 'owner_id_phone',
442 'name': 'owner_id_fax',
446 'name': 'owner_id_email',
450 'name': 'owner_id_company_id',
454 'name': 'owner_id_role',
458 'name': 'owner_id_active',
462 'name': 'owner_id_remarks',
466 'name': 'owner_id_passwd',
470 'name': 'owner_id_owner_id',
474 'name': 'owner_id_lang',
478 'name': 'owner_id_no_reset_sent',
482 'name': 'owner_id_action_type',
486 'name': 'owner_id_project_id',
490 'name': 'owner_id_deleted_by',
494 'name': 'owner_id_deleted_dt',
498 'name': 'main_office_id_id',
502 'name': 'main_office_id_company_id',
506 'name': 'main_office_id_name',
510 'name': 'main_office_id_address',
514 'name': 'main_office_id_phone',
518 'name': 'main_office_id_fax',
522 'name': 'main_office_id_email',
526 'name': 'main_office_id_role',
532 totalProperty : 'total',
540 dataIndex : 'comptype',
541 header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
542 renderer : function (v,x ,r) {
543 //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
550 xtype : 'ColumnModel'
554 header : _this._strings['9c9745a343efeacc9efe9b7222b27afb'] /* Ref# */,
555 renderer : function(v) { return String.format('{0}', v); },
560 xtype : 'ColumnModel'
564 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
565 renderer : function(v,x,r) {
566 return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);
572 xtype : 'ColumnModel'
576 header : _this._strings['2e006b735fbd916d8ab26978ae6714d4'] /* Tel */,
577 renderer : function(v) { return String.format('{0}', v); },
581 xtype : 'ColumnModel'
585 header : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
586 renderer : function(v) { return String.format('{0}', v); },
590 xtype : 'ColumnModel'
594 header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
595 renderer : function (v) {
596 return (v.length && v.indexOf('@') > 0 ) ?
597 String.format('<a href="mailto:{0}">{0}</a>',v) : v;
604 xtype : 'ColumnModel'
607 dataIndex : 'address',
608 header : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
609 renderer : function(v) { return String.format('{0}', v); },
614 xtype : 'ColumnModel'
617 dataIndex : 'remarks',
618 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
619 renderer : function(v) { return String.format('{0}', v); },
623 xtype : 'ColumnModel'