Skip to content
Snippets Groups Projects
Commit 8da43f76 authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

button export to CSv is working.

parent 4e30bcae
No related branches found
No related tags found
No related merge requests found
......@@ -44,9 +44,9 @@ App.grid.Paging = Ext.extend(Object, {
},
'->',
{
xtype: 'button',
xtype: 'xbuttondownload',
text: 'Export to CSV',
listeners: {click: this.onExport}
url: App.csvUrl + '?tableName=' + App.getTableName(grid.store)
}
);
......@@ -80,13 +80,6 @@ App.grid.Paging = Ext.extend(Object, {
bbar.moveFirst();
},
/**
* Handler to export the grid content as a CSV file
*/
onExport: function (button, event) {
Ext.Msg.alert('Warning', 'Functionality not yet implemented');
},
/**
* Handler to initialize the number of rows per page and the number of page
* the scope is the grid
......@@ -97,11 +90,7 @@ App.grid.Paging = Ext.extend(Object, {
grid = this,
nRows = store.getCount(),
slider;
if (grid.pagingInitialized) {
return;
}
bbar = grid.getBottomToolbar();
bbar.pageSize = nRows;
......@@ -123,7 +112,7 @@ App.grid.Paging = Ext.extend(Object, {
slider;
bbar = grid.getBottomToolbar();
slider = bbar.findByType('slider')[0];
slider.setMaxValue(grid.store.getTotalCount());
slider.setValue(grid.store.getCount());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment