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',
21 title : "Currency / Rates",
23 xtype: 'BorderLayout',
30 activate : function() {
33 _this.grid.footer.onClick('first');
41 tableName : 'curr_symbol',
42 title : "curr_symbol",
46 autoExpandColumn : 'curr_name',
52 //_this.dialog = Pman.Dialog.FILL_IN
53 if (_this.panel.active) {
54 this.footer.onClick('first');
57 rowdblclick : function (_self, rowIndex, e)
59 if (!_this.dialog) return;
60 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
61 _this.grid.footer.onClick('first');
66 xtype: 'RowSelectionModel',
69 afterselectionchange : function (_self)
71 _this.rgrid.footer.onClick('first');
80 sortInfo : { field : 'curr_name', direction: 'ASC' },
85 url : baseURL + '/Roo/curr_symbol.php'
90 totalProperty : 'total',
107 'name': 'curr_symbol',
118 xtype: 'PagingToolbar',
122 displayMsg : "Displaying curr_symbol{0} - {1} of {2}",
123 emptyMsg : "No curr_symbol found"
137 cls : 'x-btn-text-icon',
138 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
142 if (!_this.dialog) return;
143 _this.dialog.show( { id : 0 } , function() {
144 _this.grid.footer.onClick('first');
153 xtype: 'ColumnModel',
155 dataIndex : 'curr_name',
158 renderer : function(v,x,r) {
160 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
165 xtype: 'ColumnModel',
167 dataIndex : 'curr_symbol',
170 renderer : function(v,x,r) {
172 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
177 xtype: 'ColumnModel',
179 dataIndex : 'curr_abbr',
182 renderer : function(v,x,r) {
184 return String.format(r.data.curr_base*1 ? '<span style="color:red">{0}</span>' : '{0}', v);
195 activate : function() {
198 _this.rgrid.footer.onClick('first');
206 tableName : 'curr_rate',
215 //_this.dialog = Pman.Dialog.FILL_IN
216 if (_this.rpanel.active) {
217 this.footer.onClick('first');
220 rowdblclick : function (_self, rowIndex, e)
222 if (!_this.dialog) return;
223 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
224 _this.grid.footer.onClick('first');
228 autoExpandColumn : 'curr_rate',
234 beforeload : function (_self, options)
236 var s = _this.grid.selModel.getSelected();
241 options.params.curr_id = s.data.curr_id;
245 sortInfo : { field : '', direction: 'ASC' },
250 url : baseURL + '/Roo/curr_rate.php'
255 totalProperty : 'total',
260 'name': 'curr_rate_id',
276 'name': 'curr_effective',
278 'dateFormat': 'Y-m-d'
281 'name': 'curr_expires',
283 'dateFormat': 'Y-m-d'
289 xtype: 'PagingToolbar',
293 displayMsg : "Displaying curr_rate{0} - {1} of {2}",
294 emptyMsg : "No curr_rate found"
308 cls : 'x-btn-text-icon',
309 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
313 if (!_this.dialog) return;
314 _this.dialog.show( { id : 0 } , function() {
315 _this.grid.footer.onClick('first');
324 xtype: 'ColumnModel',
326 dataIndex : 'curr_effective',
329 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
332 xtype: 'ColumnModel',
334 dataIndex : 'curr_expires',
337 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
340 xtype: 'ColumnModel',
343 dataIndex : 'curr_rate',
346 renderer : function(v) { return String.format('{0}', v); }
353 xtype: 'LayoutRegion',
359 xtype: 'LayoutRegion',