isc.defineClass("GeCsvDownloadButton", "GeButton"); isc.GeCsvDownloadButton.addProperties({ width: 130, title: ge.message("csv.download"), icon: "/img/icons/file_download.png", params: {type: "DEFAULT"}, // Set desired type for CSV export (possible values are defined in CsvController.type) click: function() { var params = this.params; RPCManager.sendRequest({ showPrompt: true, actionURL: '/csv/exportCsv.json', params: params, callback: function (response, data, request) { data = eval("(" + data + ")"); if (data.zipUrl == '') { isc.warn(ge.message("csv.error")); } else { window.location.href ="/" + data.zipUrl; } } }) } });