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.AdminTypesCompany',
12 module : Pman.Tab.AdminTypesCompany,
14 parent : Pman.Tab.AdminTypes,
15 name : "Pman.Tab.AdminTypesCompany",
21 Pman.Tab.AdminTypesCompany = new Roo.util.Observable({
27 add : function(parentLayout, region)
31 this.parentLayout = parentLayout;
33 this.panel = parentLayout.addxtype({
37 activate : function() {
40 _this.grid.footer.onClick('first');
48 tableName : 'core_company_type',
49 title : "Company Types",
57 _this.dialog = Pman.Dialog.AdminGenericName;
58 if (_this.panel.active) {
59 this.footer.onClick('first');
62 rowdblclick : function (_self, rowIndex, e)
64 if (!_this.dialog) return;
66 id : this.getDataSource().getAt(rowIndex).data.id,
67 _title : "Edit Company Type",
68 _table : _this.panel.tableName
70 _this.grid.footer.onClick('first');
74 autoExpandColumn : 'name',
80 sortInfo : { field : 'name', direction: 'ASC' },
85 url : baseURL + '/Roo/core_company_type.php'
90 totalProperty : 'total',
106 xtype: 'PagingToolbar',
110 displayMsg : 'Displaying core_image_type{0} - {1} of {2}',
111 emptyMsg : 'No core_image_type found'
123 if (!_this.dialog) return;
126 _title : "Add Company Type",
127 _table : _this.panel.tableName
129 _this.grid.footer.onClick('first');
133 cls : 'x-btn-text-icon',
135 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
143 var s = _this.grid.getSelectionModel().getSelections();
144 if (!s.length || (s.length > 1)) {
145 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
148 if (!_this.dialog) return;
151 _title : "Edit Company Type",
152 _table : _this.panel.tableName
154 _this.grid.footer.onClick('first');
159 cls : 'x-btn-text-icon',
161 icon : Roo.rootURL + 'images/default/tree/leaf.gif'
169 Pman.genericDelete(_this, 'core_company_type');
172 cls : 'x-btn-text-icon',
174 icon : rootURL + '/Pman/templates/images/trash.gif'
180 xtype: 'ColumnModel',
185 renderer : function(v) { return String.format('{0}', v); }
190 this.layout = this.panel.layout;