Pman.Tab.XtupleCurrency.bjs
[Pman.Xtuple] / Pman.Tab.XtupleCurrency.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Pman.Tab.XtupleCurrency = new Roo.XComponent({
6     part     :  ["Xtuple","Currency"],
7     order    : '001-Pman.Tab.XtupleCurrency',
8     region   : '',
9     parent   : false,
10     name     : "unnamed module",
11     disabled : false, 
12     permname : '', 
13     _tree : function()
14     {
15         var _this = this;
16         var MODULE = this;
17         return {
18             xtype: 'NestedLayoutPanel',
19             xns: Roo,
20             layout : {
21                 xtype: 'BorderLayout',
22                 xns: Roo,
23                 items : [
24                     {
25                         xtype: 'GridPanel',
26                         xns: Roo,
27                         listeners : {
28                             activate : function() {
29                                 _this.panel = this;
30                                 if (_this.grid) {
31                                     _this.grid.footer.onClick('first');
32                                 }
33                             }
34                         },
35                         background : false,
36                         fitContainer : true,
37                         fitToframe : true,
38                         region : 'west',
39                         tableName : 'curr_symbol',
40                         title : "curr_symbol",
41                         grid : {
42                             xtype: 'Grid',
43                             xns: Roo.grid,
44                             autoExpandColumn : 'curr_name',
45                             loadMask : true,
46                             listeners : {
47                                 render : function() 
48                                 {
49                                     _this.grid = this; 
50                                     //_this.dialog = Pman.Dialog.FILL_IN
51                                     if (_this.panel.active) {
52                                        this.footer.onClick('first');
53                                     }
54                                 },
55                                 rowdblclick : function (_self, rowIndex, e)
56                                 {
57                                     if (!_this.dialog) return;
58                                     _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
59                                         _this.grid.footer.onClick('first');
60                                     }); 
61                                 }
62                             },
63                             dataSource : {
64                                 xtype: 'Store',
65                                 xns: Roo.data,
66                                 remoteSort : true,
67                                 sortInfo : { field : 'curr_name', direction: 'ASC' },
68                                 proxy : {
69                                     xtype: 'HttpProxy',
70                                     xns: Roo.data,
71                                     method : 'GET',
72                                     url : baseURL + '/Roo/curr_symbol.php'
73                                 },
74                                 reader : {
75                                     xtype: 'JsonReader',
76                                     xns: Roo.data,
77                                     totalProperty : 'total',
78                                     root : 'data',
79                                     id : 'id',
80                                     fields : [
81                                         {
82                                             'name': 'curr_id',
83                                             'type': 'int'
84                                         },
85                                         {
86                                             'name': 'curr_base',
87                                             'type': 'int'
88                                         },
89                                         {
90                                             'name': 'curr_name',
91                                             'type': 'string'
92                                         },
93                                         {
94                                             'name': 'curr_symbol',
95                                             'type': 'string'
96                                         },
97                                         {
98                                             'name': 'curr_abbr',
99                                             'type': 'string'
100                                         }
101                                     ]
102                                 }
103                             },
104                             footer : {
105                                 xtype: 'PagingToolbar',
106                                 xns: Roo,
107                                 pageSize : 25,
108                                 displayInfo : true,
109                                 displayMsg : "Displaying curr_symbol{0} - {1} of {2}",
110                                 emptyMsg : "No curr_symbol found"
111                             },
112                             toolbar : {
113                                 xtype: 'Toolbar',
114                                 xns: Roo,
115                                 items : [
116                                     {
117                                         xtype: 'Fill',
118                                         xns: Roo.Toolbar
119                                     },
120                                     {
121                                         xtype: 'Button',
122                                         xns: Roo.Toolbar,
123                                         text : "Add",
124                                         cls : 'x-btn-text-icon',
125                                         icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
126                                         listeners : {
127                                             click : function()
128                                             {
129                                                 if (!_this.dialog) return;
130                                                 _this.dialog.show( { id : 0 } , function() {
131                                                     _this.grid.footer.onClick('first');
132                                                }); 
133                                             }
134                                         }
135                                     }
136                                 ]
137                             },
138                             colModel : [
139                                 {
140                                     xtype: 'ColumnModel',
141                                     xns: Roo.grid,
142                                     header : 'Curr base',
143                                     width : 75,
144                                     dataIndex : 'curr_base',
145                                     renderer : function(v) { return String.format('{0}', v); }
146                                 },
147                                 {
148                                     xtype: 'ColumnModel',
149                                     xns: Roo.grid,
150                                     header : 'Curr name',
151                                     width : 200,
152                                     dataIndex : 'curr_name',
153                                     renderer : function(v) { return String.format('{0}', v); }
154                                 },
155                                 {
156                                     xtype: 'ColumnModel',
157                                     xns: Roo.grid,
158                                     header : 'Curr symbol',
159                                     width : 200,
160                                     dataIndex : 'curr_symbol',
161                                     renderer : function(v) { return String.format('{0}', v); }
162                                 },
163                                 {
164                                     xtype: 'ColumnModel',
165                                     xns: Roo.grid,
166                                     header : 'Curr abbr',
167                                     width : 200,
168                                     dataIndex : 'curr_abbr',
169                                     renderer : function(v) { return String.format('{0}', v); }
170                                 }
171                             ]
172                         }
173                     },
174                     {
175                         xtype: 'GridPanel',
176                         xns: Roo,
177                         listeners : {
178                             activate : function() {
179                                 _this.rpanel = this;
180                                 if (_this.rgrid) {
181                                     _this.rgrid.footer.onClick('first');
182                                 }
183                             }
184                         },
185                         background : false,
186                         fitContainer : true,
187                         fitToframe : true,
188                         region : 'center',
189                         tableName : 'curr_rate',
190                         title : "curr_rate",
191                         grid : {
192                             xtype: 'Grid',
193                             xns: Roo.grid,
194                             listeners : {
195                                 render : function() 
196                                 {
197                                     _this.rgrid = this; 
198                                     //_this.dialog = Pman.Dialog.FILL_IN
199                                     if (_this.rpanel.active) {
200                                        this.footer.onClick('first');
201                                     }
202                                 },
203                                 rowdblclick : function (_self, rowIndex, e)
204                                 {
205                                     if (!_this.dialog) return;
206                                     _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
207                                         _this.grid.footer.onClick('first');
208                                     }); 
209                                 }
210                             },
211                             autoExpandColumn : '',
212                             loadMask : true,
213                             dataSource : {
214                                 xtype: 'Store',
215                                 xns: Roo.data,
216                                 remoteSort : true,
217                                 sortInfo : { field : '', direction: 'ASC' },
218                                 proxy : {
219                                     xtype: 'HttpProxy',
220                                     xns: Roo.data,
221                                     method : 'GET',
222                                     url : baseURL + '/Roo/curr_rate.php'
223                                 },
224                                 reader : {
225                                     xtype: 'JsonReader',
226                                     xns: Roo.data,
227                                     totalProperty : 'total',
228                                     root : 'data',
229                                     id : 'id',
230                                     fields : [
231                                         {
232                                             'name': 'curr_rate_id',
233                                             'type': 'int'
234                                         },
235                                         {
236                                             'name': 'curr_id',
237                                             'type': 'int'
238                                         },
239                                         {
240                                             'name': 'curr_id',
241                                             'type': 'int'
242                                         },
243                                         {
244                                             'name': 'curr_rate',
245                                             'type': 'float'
246                                         },
247                                         {
248                                             'name': 'curr_effective',
249                                             'type': 'date',
250                                             'dateFormat': 'Y-m-d'
251                                         },
252                                         {
253                                             'name': 'curr_expires',
254                                             'type': 'date',
255                                             'dateFormat': 'Y-m-d'
256                                         }
257                                     ]
258                                 }
259                             },
260                             footer : {
261                                 xtype: 'PagingToolbar',
262                                 xns: Roo,
263                                 pageSize : 25,
264                                 displayInfo : true,
265                                 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
266                                 emptyMsg : "No curr_rate found"
267                             },
268                             toolbar : {
269                                 xtype: 'Toolbar',
270                                 xns: Roo,
271                                 items : [
272                                     {
273                                         xtype: 'Fill',
274                                         xns: Roo.Toolbar
275                                     },
276                                     {
277                                         xtype: 'Button',
278                                         xns: Roo.Toolbar,
279                                         text : "Add",
280                                         cls : 'x-btn-text-icon',
281                                         icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
282                                         listeners : {
283                                             click : function()
284                                             {
285                                                 if (!_this.dialog) return;
286                                                 _this.dialog.show( { id : 0 } , function() {
287                                                     _this.grid.footer.onClick('first');
288                                                }); 
289                                             }
290                                         }
291                                     }
292                                 ]
293                             },
294                             colModel : [
295                                 {
296                                     xtype: 'ColumnModel',
297                                     xns: Roo.grid,
298                                     header : 'Curr rate',
299                                     width : 75,
300                                     dataIndex : 'curr_rate_id',
301                                     renderer : function(v) { return String.format('{0}', v); }
302                                 },
303                                 {
304                                     xtype: 'ColumnModel',
305                                     xns: Roo.grid,
306                                     header : 'Curr',
307                                     width : 75,
308                                     dataIndex : 'curr_id',
309                                     renderer : function(v) { return String.format('{0}', v); }
310                                 },
311                                 {
312                                     xtype: 'ColumnModel',
313                                     xns: Roo.grid,
314                                     header : 'Curr',
315                                     width : 75,
316                                     dataIndex : 'curr_id',
317                                     renderer : function(v) { return String.format('{0}', v); }
318                                 },
319                                 {
320                                     xtype: 'ColumnModel',
321                                     xns: Roo.grid,
322                                     header : 'Curr rate',
323                                     width : 75,
324                                     dataIndex : 'curr_rate',
325                                     renderer : function(v) { return String.format('{0}', v); }
326                                 },
327                                 {
328                                     xtype: 'ColumnModel',
329                                     xns: Roo.grid,
330                                     header : 'Curr effective',
331                                     width : 75,
332                                     dataIndex : 'curr_effective',
333                                     renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
334                                 },
335                                 {
336                                     xtype: 'ColumnModel',
337                                     xns: Roo.grid,
338                                     header : 'Curr expires',
339                                     width : 75,
340                                     dataIndex : 'curr_expires',
341                                     renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
342                                 }
343                             ]
344                         }
345                     }
346                 ],
347                 west : {
348                     xtype: 'LayoutRegion',
349                     xns: Roo,
350                     width : 200
351                 },
352                 center : {
353                     xtype: 'LayoutRegion',
354                     xns: Roo
355                 }
356             }
357         };
358     }
359 });