1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
7 // register the module first
8 Pman.on('beforeload', function()
11 modKey : '001-Pman.Tab.AdminOffice',
12 module : Pman.Tab.AdminOffice,
15 name : "unnamed module",
21 Pman.Tab.AdminOffice = new Roo.util.Observable({
27 add : function(parentLayout, region)
31 this.parentLayout = parentLayout;
33 this.panel = parentLayout.addxtype({
43 activate : function() {
46 _this.grid.footer.onClick('first');
53 autoExpandColumn : 'name',
59 //_this.dialog = Pman.Dialog.FILL_IN
60 if (_this.panel.active) {
61 this.footer.onClick('first');
64 rowdblclick : function (_self, rowIndex, e)
66 if (!_this.dialog) return;
67 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
68 _this.grid.footer.onClick('first');
76 sortInfo : { field : 'name', direction: 'ASC' },
81 url : baseURL + '/Roo/Office.php'
86 totalProperty : 'total',
123 'name': 'company_id_code',
127 'name': 'company_id_name',
131 'name': 'company_id_remarks',
135 'name': 'company_id_owner_id',
139 'name': 'company_id_address',
143 'name': 'company_id_tel',
147 'name': 'company_id_fax',
151 'name': 'company_id_email',
155 'name': 'company_id_id',
159 'name': 'company_id_isOwner',
163 'name': 'company_id_logo_id',
167 'name': 'company_id_background_color',
171 'name': 'company_id_comptype',
175 'name': 'company_id_url',
179 'name': 'company_id_main_office_id',
183 'name': 'company_id_created_by',
187 'name': 'company_id_created_dt',
191 'name': 'company_id_updated_by',
195 'name': 'company_id_updated_dt',
199 'name': 'company_id_passwd',
203 'name': 'company_id_dispatch_port',
207 'name': 'company_id_province',
211 'name': 'company_id_country',
218 xtype: 'PagingToolbar',
222 displayMsg : 'Displaying Office{0} - {1} of {2}',
223 emptyMsg : 'No Office found'
233 cls : 'x-btn-text-icon',
234 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
238 if (!_this.dialog) return;
239 _this.dialog.show( { id : 0 } , function() {
240 _this.grid.footer.onClick('first');
249 cls : 'x-btn-text-icon',
250 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
254 var s = _this.grid.getSelectionModel().getSelections();
255 if (!s.length || (s.length > 1)) {
256 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
259 if (!_this.dialog) return;
260 _this.dialog.show(s[0].data, function() {
261 _this.grid.footer.onClick('first');
271 cls : 'x-btn-text-icon',
272 icon : rootURL + '/Pman/templates/images/trash.gif',
276 Pman.genericDelete(_this, 'Office');
284 xtype: 'ColumnModel',
289 renderer : function(v) { return String.format('{0}', v); }
292 xtype: 'ColumnModel',
296 dataIndex : 'company_id',
297 renderer : function(v) { return String.format('{0}', v); }
300 xtype: 'ColumnModel',
305 renderer : function(v) { return String.format('{0}', v); }
308 xtype: 'ColumnModel',
312 dataIndex : 'address',
313 renderer : function(v) { return String.format('{0}', v); }
316 xtype: 'ColumnModel',
321 renderer : function(v) { return String.format('{0}', v); }
324 xtype: 'ColumnModel',
329 renderer : function(v) { return String.format('{0}', v); }
332 xtype: 'ColumnModel',
337 renderer : function(v) { return String.format('{0}', v); }
340 xtype: 'ColumnModel',
345 renderer : function(v) { return String.format('{0}', v); }
350 this.layout = this.panel.layout;