1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.XtupleCurrency = new Roo.XComponent({
6 part : ["Xtuple","Currency"],
7 order : '901-Pman.Tab.XtupleCurrency',
9 parent : 'Pman.Tab.XtupleAccountsTab',
10 name : "Pman.Tab.XtupleCurrency",
18 xtype: 'NestedLayoutPanel',
22 title : "Currency / Rates",
24 xtype: 'BorderLayout',
31 activate : function() {
34 _this.grid.footer.onClick('first');
42 tableName : 'curr_symbol',
43 title : "curr_symbol",
47 autoExpandColumn : 'curr_name',
53 //_this.dialog = Pman.Dialog.FILL_IN
54 if (_this.panel.active) {
55 this.footer.onClick('first');
58 rowdblclick : function (_self, rowIndex, e)
60 if (!_this.dialog) return;
61 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
62 _this.grid.footer.onClick('first');
67 xtype: 'RowSelectionModel',
70 afterselectionchange : function (_self)
72 _this.rgrid.footer.onClick('first');
81 sortInfo : { field : 'curr_name', direction: 'ASC' },
86 url : baseURL + '/Roo/curr_symbol.php'
91 totalProperty : 'total',
108 'name': 'curr_symbol',
119 xtype: 'PagingToolbar',
123 displayMsg : "Displaying curr_symbol{0} - {1} of {2}",
124 emptyMsg : "No curr_symbol found"
138 cls : 'x-btn-text-icon',
139 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
143 if (!_this.dialog) return;
144 _this.dialog.show( { id : 0 } , function() {
145 _this.grid.footer.onClick('first');
154 xtype: 'ColumnModel',
156 dataIndex : 'curr_name',
159 renderer : function(v,x,r) {
161 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
166 xtype: 'ColumnModel',
168 dataIndex : 'curr_symbol',
171 renderer : function(v,x,r) {
173 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
178 xtype: 'ColumnModel',
180 dataIndex : 'curr_abbr',
183 renderer : function(v,x,r) {
185 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
196 activate : function() {
199 _this.rgrid.footer.onClick('first');
207 tableName : 'curr_rate',
216 //_this.dialog = Pman.Dialog.FILL_IN
217 if (_this.rpanel.active) {
218 this.footer.onClick('first');
221 rowdblclick : function (_self, rowIndex, e)
223 if (!_this.dialog) return;
224 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
225 _this.grid.footer.onClick('first');
229 autoExpandColumn : 'curr_rate',
235 beforeload : function (_self, options)
237 var s = _this.grid.selModel.getSelected();
242 options.params.curr_id = s.data.curr_id;
246 sortInfo : { field : 'curr_effective', direction: 'DESC' },
251 url : baseURL + '/Roo/curr_rate.php'
256 totalProperty : 'total',
261 'name': 'curr_rate_id',
277 'name': 'curr_effective',
279 'dateFormat': 'Y-m-d'
282 'name': 'curr_expires',
284 'dateFormat': 'Y-m-d'
290 xtype: 'PagingToolbar',
294 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
295 emptyMsg : "No curr_rate found"
309 cls : 'x-btn-text-icon',
310 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
314 if (!_this.dialog) return;
315 _this.dialog.show( { id : 0 } , function() {
316 _this.grid.footer.onClick('first');
325 xtype: 'ColumnModel',
327 dataIndex : 'curr_effective',
330 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
333 xtype: 'ColumnModel',
335 dataIndex : 'curr_expires',
338 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
341 xtype: 'ColumnModel',
344 dataIndex : 'curr_rate',
347 renderer : function(v) { return String.format('{0}', v); }
350 xtype: 'ColumnModel',
353 dataIndex : 'curr_rate',
356 renderer : function(v) { return String.format('{0}', v); }
363 xtype: 'LayoutRegion',
369 xtype: 'LayoutRegion',