Skip to content

Commit a844b98

Browse files
author
Alexandre CHENIEUX
committed
Fix bug where the csvExport button had the type "submit" by default.
The file to download doesn't open a new tab anymore.
1 parent 30751d4 commit a844b98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/evolugrid.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
}
374374
url += "output=csv";
375375

376-
window.open(url);
376+
window.location.replace(url);
377377
},
378378
refresh : function( noPage, filters) {
379379
var descriptor=$(this).data('descriptor');
@@ -496,7 +496,7 @@
496496

497497

498498
if (extendedDescriptor.export_csv) {
499-
var button = $('<button class="btn btn-success">').click(function(){$this.evolugrid('csvExport');});
499+
var button = $('<button class="btn btn-success" type="button">').click(function(){$this.evolugrid('csvExport');});
500500
button.append($('<i/>').addClass('glyphicon glyphicon-file').attr('style', 'cursor:pointer;'));
501501
button.append("Export to CSV");
502502
pager.append(button);
@@ -738,7 +738,7 @@
738738
}
739739

740740
if (extendedDescriptor.export_csv) {
741-
var button = $('<button class="btn btn-success">').click(function(){$this.evolugrid('csvExport');});
741+
var button = $('<button class="btn btn-success" type="button">').click(function(){$this.evolugrid('csvExport');});
742742
button.append($('<i/>').addClass('glyphicon glyphicon-file').attr('style', 'cursor:pointer;'));
743743
button.append("Export to CSV");
744744
pager.append(button);
@@ -881,4 +881,4 @@
881881
o.find('thead.header-copy> tr > th:eq('+i+')').width(w)
882882
});
883883
};
884-
})(jQuery);
884+
})(jQuery);

0 commit comments

Comments
 (0)