Closed edgarf closed 8 years ago
@edgarf I got that done, but there are more to say and adjust here. I replaced the previous feature with the updated and native one, which offers much more options for customization.
So it's a completely new button, and we have layout issues to handle:
And an issue regarding the document title:
Hi @regiscamimura,
I have been reviewing the updates and found some issues (will also reply to your concerns):
@edgarf Just got the buttons to work all over the place. FYI, I have removed a lot of JavaScript that was being used here and there to create the datatables with a single piece of JS that will read html attributes to set up the tables properly, so we also improved good maintainability in the process. You might want to take a look over all the sections and let me know if there are tables where you don't want the column visibility, search, and download csv features.
Attached is the screenshot about the button colors.
@regiscamimura, thank you. I agree regarding colors, let's convert it as you offer. Regarding the .CSV export itself, there's one thing I noticed: That first character is appearing on all exports.
@edgarf Regarding the CSV issue, that's because the encode used is UTF-8 with BOM. BOM means Byte Mark Order, it's a magic hidden char that can be used to retrieve info on the doc.
I did a small hack to the CSV exporter -- there was no config option for that -- to remove the BOM. Not the best approach though, cause an eventual update on database library extensions will override the change. Anyway, the quickiest and simple solution. But well, you can also adjust your CSV editor (microsoft excel?) to open with UTF-8 encoding and it would be fine, and we would avoid the hack. Well, let me know if you prefer to set the encoding in the CSV editor or if you're ok with the hack.
Hi Regis, I understood. I think adjusting spreadsheet tool is a good option, let's stick with it for now.
We need to update the download CSV functionality so it would add " " chars around string values. The current problem is that if a string value has "," inside, then the row structure breaks. That "," inside of a string is held as a separator.