fix 'Optional parameter declared before required parameter is implicitly treated'
[Pman.Cms] / Pman.Tab.CmsCategoryType.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Tab');
6
7 Pman.Tab.CmsCategoryType = new Roo.XComponent({
8
9  _strings : {
10   '8a50fa0a4557af5018e28054386cde1f' :"Category Types",
11   '512c3cbbc9d4e8f23edae03d7abc434e' :"No cms_category_type found",
12   'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
13   '093a223e9365cd2675ea9389f321f640' :"Displaying cms_category_type{0} - {1} of {2}",
14   '7dce122004969d56ae2e0245cb754d35' :"Edit",
15   'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
16   '49ee3087348e8d44e1feda1917443987' :"Name"
17  },
18
19   part     :  ["Cms", "CategoryType" ],
20   order    : '001-Pman.Tab.CmsCategoryType',
21   region   : 'center',
22   parent   : 'Pman.Tab.Cms',
23   name     : "Pman.Tab.CmsCategoryType",
24   disabled : false, 
25   permname : '', 
26   _tree : function()
27   {
28    var _this = this;
29    var MODULE = this;
30    return {
31    background : true,
32    fitContainer : true,
33    fitToframe : true,
34    region : 'center',
35    tableName : 'cms_category_type',
36    title : _this._strings['8a50fa0a4557af5018e28054386cde1f'] /* Category Types */,
37    xns : Roo,
38    '|xns' : 'Roo',
39    xtype : 'GridPanel',
40    listeners : {
41     activate : function() {
42          _this.panel = this;
43          if (_this.grid) {
44              _this.grid.footer.onClick('first');
45          }
46          
47      }
48    },
49    grid : {
50     autoExpandColumn : 'name',
51     loadMask : true,
52     xns : Roo.grid,
53     '|xns' : 'Roo.grid',
54     xtype : 'Grid',
55     listeners : {
56      render : function() 
57       {
58           _this.grid = this; 
59           _this.dialog = Pman.Dialog.CmsCategoryType;
60           if (_this.panel.active) {
61              this.footer.onClick('first');
62           }
63       },
64      rowdblclick : function (_self, rowIndex, e)
65       {
66           if (!_this.dialog) {
67               return;
68           }
69           _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
70               _this.grid.footer.onClick('first');
71           }); 
72       }
73     },
74     footer : {
75      displayInfo : true,
76      displayMsg : _this._strings['093a223e9365cd2675ea9389f321f640'] /* Displaying cms_category_type{0} - {1} of {2} */,
77      emptyMsg : _this._strings['512c3cbbc9d4e8f23edae03d7abc434e'] /* No cms_category_type found */,
78      pageSize : 25,
79      xns : Roo,
80      '|xns' : 'Roo',
81      xtype : 'PagingToolbar'
82     },
83     toolbar : {
84      xns : Roo,
85      '|xns' : 'Roo',
86      xtype : 'Toolbar',
87      items  : [
88       {
89        xns : Roo.Toolbar,
90        '|xns' : 'Roo.Toolbar',
91        xtype : 'Fill'
92       },
93       {
94        cls : 'x-btn-text-icon',
95        icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
96        text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
97        xns : Roo.Toolbar,
98        '|xns' : 'Roo.Toolbar',
99        xtype : 'Button',
100        listeners : {
101         click : function()
102          {
103              if (!_this.dialog) {
104                  return;
105              }
106              _this.dialog.show( { id : 0 } , function() {
107                  _this.grid.footer.onClick('first');
108             }); 
109          }
110        }
111       },
112       {
113        cls : 'x-btn-text-icon',
114        icon : Roo.rootURL + 'images/default/tree/leaf.gif',
115        text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
116        xns : Roo.Toolbar,
117        '|xns' : 'Roo.Toolbar',
118        xtype : 'Button',
119        listeners : {
120         click : function()
121          {
122              var s = _this.grid.getSelectionModel().getSelections();
123              if (!s.length || (s.length > 1))  {
124                  Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
125                  return;
126              }
127              if (!_this.dialog) {
128                  return;
129              }
130              _this.dialog.show(s[0].data, function() {
131                  _this.grid.footer.onClick('first');
132              }); 
133              
134          }
135        }
136       },
137       {
138        cls : 'x-btn-text-icon',
139        icon : rootURL + '/Pman/templates/images/trash.gif',
140        text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
141        xns : Roo.Toolbar,
142        '|xns' : 'Roo.Toolbar',
143        xtype : 'Button',
144        listeners : {
145         click : function()
146          {
147               Pman.genericDelete(_this, 'cms_category_type'); 
148          }
149        }
150       }
151      ]
152     },
153     dataSource : {
154      remoteSort : true,
155      sortInfo : { field : 'name', direction: 'ASC' },
156      xns : Roo.data,
157      '|xns' : 'Roo.data',
158      xtype : 'Store',
159      proxy : {
160       method : 'GET',
161       url : baseURL + '/Roo/cms_category_type.php',
162       xns : Roo.data,
163       '|xns' : 'Roo.data',
164       xtype : 'HttpProxy'
165      },
166      reader : {
167       fields : [
168           {
169               'name': 'id',
170               'type': 'int'
171           },
172           {
173               'name': 'name',
174               'type': 'string'
175           }
176       ],
177       id : 'id',
178       root : 'data',
179       totalProperty : 'total',
180       xns : Roo.data,
181       '|xns' : 'Roo.data',
182       xtype : 'JsonReader'
183      }
184     },
185     colModel : [
186      {
187       dataIndex : 'name',
188       header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
189       renderer : function(v) { return String.format('{0}', v); },
190       width : 200,
191       xns : Roo.grid,
192       '|xns' : 'Roo.grid',
193       xtype : 'ColumnModel'
194      }
195     ]
196    }
197   };  }
198 });