From 7db71e843d07c3876ba5a9427e4674c54f2302f7 Mon Sep 17 00:00:00 2001 From: Fulgax Date: Mon, 10 Jul 2017 13:53:59 +0200 Subject: [PATCH] Choose downloaded file name With this change you can choose the name of the file downloaded. * Only works on HTML5 * Tested on Firefox and Chrome --- Exporter-all.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Exporter-all.js b/Exporter-all.js index 3969234..ffb10b9 100644 --- a/Exporter-all.js +++ b/Exporter-all.js @@ -155,7 +155,8 @@ Ext.ux.Exporter.Button = Ext.extend(Ext.Button, { if (this.store && Ext.isFunction(this.store.on)) { var setLink = function() { this.getEl().child('a', true).href = 'data:application/vnd.ms-excel;base64,' + Ext.ux.Exporter[config.exportFunction](this.component, null, config); - + //Filename (only works on HTML5) + this.getEl().child('a', true).download = 'filename.xls' this.enable(); };