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 : '999-Pman.Tab.CmsCategoryType',
12 module : Pman.Tab.CmsCategoryType,
14 parent : Pman.Tab.Cms,
15 name : "Pman.Tab.CmsCategoryType",
21 Pman.Tab.CmsCategoryType = 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 : 'cms_category_type',
49 title : "Category Types",
57 _this.dialog = Pman.Dialog.CmsCategoryType;
58 if (_this.panel.active) {
59 this.footer.onClick('first');
62 rowdblclick : function (_self, rowIndex, e)
64 if (!_this.dialog) return;
65 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
66 _this.grid.footer.onClick('first');
70 autoExpandColumn : 'name',
76 sortInfo : { field : 'name', direction: 'ASC' },
81 url : baseURL + '/Roo/cms_category_type.php'
86 totalProperty : 'total',
102 xtype: 'PagingToolbar',
106 displayMsg : 'Displaying cms_category_type{0} - {1} of {2}',
107 emptyMsg : 'No cms_category_type found'
121 cls : 'x-btn-text-icon',
122 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
126 if (!_this.dialog) return;
127 _this.dialog.show( { id : 0 } , function() {
128 _this.grid.footer.onClick('first');
137 cls : 'x-btn-text-icon',
138 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
142 var s = _this.grid.getSelectionModel().getSelections();
143 if (!s.length || (s.length > 1)) {
144 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
147 if (!_this.dialog) return;
148 _this.dialog.show(s[0].data, function() {
149 _this.grid.footer.onClick('first');
159 cls : 'x-btn-text-icon',
160 icon : rootURL + '/Pman/templates/images/trash.gif',
164 Pman.genericDelete(_this, 'cms_category_type');
172 xtype: 'ColumnModel',
177 renderer : function(v) { return String.format('{0}', v); }
182 this.layout = this.panel.layout;