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");
193 Pman.Dialog.AdminCompanyMerge.show(s[0].data, function() {
194 _this.grid.footer.onClick('first');
200 '|xns' : 'Roo.Toolbar'
205 '|xns' : 'Roo.Toolbar'
209 cls : 'x-btn-text-icon',
210 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
211 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
218 _this.dialog.show( { id : 0 } , function() {
219 _this.grid.footer.onClick('first');
224 '|xns' : 'Roo.Toolbar'
228 cls : 'x-btn-text-icon',
229 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
230 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
234 var s = _this.grid.getSelectionModel().getSelections();
235 if (!s.length || (s.length > 1)) {
236 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
242 _this.dialog.show(s[0].data, function() {
243 _this.grid.footer.onClick('first');
249 '|xns' : 'Roo.Toolbar'
253 cls : 'x-btn-text-icon',
254 icon : rootURL + '/Pman/templates/images/trash.gif',
255 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
259 Pman.genericDelete(_this, 'Companies');
263 '|xns' : 'Roo.Toolbar'
270 sortInfo : { field : 'name', direction: 'ASC' },
272 beforeload : function (_self, o)
274 o.params = o.params || {};
276 o.params['query[name]'] = _this.searchBox.getValue();
277 } catch(e) { return false; }
279 load : function (_self, records, options)
282 Pman.Tab.AdminOffice.grid.footer.onClick('refresh');
291 url : baseURL + '/Roo/core_company',
293 load : function (This, o, arg)
302 xtype : 'JsonReader',
349 'name': 'background_color',
361 'name': 'main_office_id',
365 'name': 'created_by',
369 'name': 'created_dt',
371 'dateFormat': 'Y-m-d'
374 'name': 'updated_by',
378 'name': 'updated_dt',
380 'dateFormat': 'Y-m-d'
387 'name': 'dispatch_port',
399 'name': 'logo_id_id',
403 'name': 'logo_id_filename',
407 'name': 'logo_id_ontable',
411 'name': 'logo_id_onid',
415 'name': 'logo_id_mimetype',
419 'name': 'logo_id_width',
423 'name': 'logo_id_height',
427 'name': 'logo_id_filesize',
431 'name': 'logo_id_displayorder',
435 'name': 'logo_id_language',
439 'name': 'logo_id_parent_image_id',
443 'name': 'logo_id_created',
447 'name': 'logo_id_imgtype',
451 'name': 'logo_id_linkurl',
455 'name': 'logo_id_descript',
459 'name': 'logo_id_title',
463 'name': 'owner_id_id',
467 'name': 'owner_id_office_id',
471 'name': 'owner_id_name',
475 'name': 'owner_id_phone',
479 'name': 'owner_id_fax',
483 'name': 'owner_id_email',
487 'name': 'owner_id_company_id',
491 'name': 'owner_id_role',
495 'name': 'owner_id_active',
499 'name': 'owner_id_remarks',
503 'name': 'owner_id_passwd',
507 'name': 'owner_id_owner_id',
511 'name': 'owner_id_lang',
515 'name': 'owner_id_no_reset_sent',
519 'name': 'owner_id_action_type',
523 'name': 'owner_id_project_id',
527 'name': 'owner_id_deleted_by',
531 'name': 'owner_id_deleted_dt',
535 'name': 'main_office_id_id',
539 'name': 'main_office_id_company_id',
543 'name': 'main_office_id_name',
547 'name': 'main_office_id_address',
551 'name': 'main_office_id_phone',
555 'name': 'main_office_id_fax',
559 'name': 'main_office_id_email',
563 'name': 'main_office_id_role',
569 totalProperty : 'total',
576 xtype : 'ColumnModel',
577 dataIndex : 'comptype',
578 header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
579 renderer : function (v,x ,r) {
580 //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);
589 xtype : 'ColumnModel',
591 header : _this._strings['9c9745a343efeacc9efe9b7222b27afb'] /* Ref# */,
592 renderer : function(v) { return String.format('{0}', v); },
599 xtype : 'ColumnModel',
601 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
602 renderer : function(v,x,r) {
603 return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);
611 xtype : 'ColumnModel',
613 header : _this._strings['2e006b735fbd916d8ab26978ae6714d4'] /* Tel */,
614 renderer : function(v) { return String.format('{0}', v); },
620 xtype : 'ColumnModel',
622 header : _this._strings['9810aa2b9f44401be4bf73188ef2b67d'] /* Fax */,
623 renderer : function(v) { return String.format('{0}', v); },
629 xtype : 'ColumnModel',
631 header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
632 renderer : function (v) {
633 return (v.length && v.indexOf('@') > 0 ) ?
634 String.format('<a href="mailto:{0}">{0}</a>',v) : v;
643 xtype : 'ColumnModel',
644 dataIndex : 'address',
645 header : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
646 renderer : function(v) { return String.format('{0}', v); },
653 xtype : 'ColumnModel',
654 dataIndex : 'remarks',
655 header : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
656 renderer : function(v) { return String.format('{0}', v); },