mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 07:16:52 -06:00
Ensure that Firefox prompts for a filename/location when downloading query results as a CSV file. Fixes #4071
This commit is contained in:
parent
eb1db50f85
commit
2356988bdf
@ -18,4 +18,5 @@ Bug fixes
|
|||||||
|
|
||||||
| `Bug #3995 <https://redmine.postgresql.org/issues/3995>`_ - Avoid 'bogus varno' message from Postgres when viewing the SQL for a table with triggers.
|
| `Bug #3995 <https://redmine.postgresql.org/issues/3995>`_ - Avoid 'bogus varno' message from Postgres when viewing the SQL for a table with triggers.
|
||||||
| `Bug #4054 <https://redmine.postgresql.org/issues/4054>`_ - Handle resultsets with zero columns correctly in the Query Tool.
|
| `Bug #4054 <https://redmine.postgresql.org/issues/4054>`_ - Handle resultsets with zero columns correctly in the Query Tool.
|
||||||
| `Bug #4060 <https://redmine.postgresql.org/issues/4060>`_ - Fix the latexpdf doc build.
|
| `Bug #4060 <https://redmine.postgresql.org/issues/4060>`_ - Fix the latexpdf doc build.
|
||||||
|
| `Bug #4071 <https://redmine.postgresql.org/issues/4071>`_ - Ensure that Firefox prompts for a filename/location when downloading query results as a CSV file.
|
@ -3612,8 +3612,10 @@ define('tools.querytool', [
|
|||||||
.done(function(response) {
|
.done(function(response) {
|
||||||
let urlCreator = window.URL || window.webkitURL,
|
let urlCreator = window.URL || window.webkitURL,
|
||||||
url = urlCreator.createObjectURL(response),
|
url = urlCreator.createObjectURL(response),
|
||||||
link = document.createElement('a'),
|
current_browser = pgAdmin.Browser.get_browser(),
|
||||||
current_browser = pgAdmin.Browser.get_browser();
|
link = document.createElement('a');
|
||||||
|
|
||||||
|
document.body.appendChild(link);
|
||||||
|
|
||||||
if (current_browser.name === 'IE' && window.navigator.msSaveBlob) {
|
if (current_browser.name === 'IE' && window.navigator.msSaveBlob) {
|
||||||
// IE10+ : (has Blob, but not a[download] or URL)
|
// IE10+ : (has Blob, but not a[download] or URL)
|
||||||
@ -3624,6 +3626,7 @@ define('tools.querytool', [
|
|||||||
link.click();
|
link.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.body.removeChild(link);
|
||||||
self.download_csv_obj = undefined;
|
self.download_csv_obj = undefined;
|
||||||
// Enable the execute button
|
// Enable the execute button
|
||||||
$('#btn-flash').prop('disabled', false);
|
$('#btn-flash').prop('disabled', false);
|
||||||
|
Loading…
Reference in New Issue
Block a user