Commit 91ba1ecd authored by Daniel's avatar Daniel

ENH: Enhancements for MR comments.

parent f8d94dd3
......@@ -33,15 +33,20 @@ async function downloadXLS() {
"href");
var xls_result;
var xls_link = document.getElementById("downloadLinkXLS");
var onClickValue = xls_link.getAttribute("onClick");
xls_link.removeAttribute("onClick");
xls_result = await connection.runScript("xls_from_csv.py",
{"urlencoded": csv_string}).catch(
(err) => { globalError(err); });
var filename = xls_result.getElementsByTagName("stdout")[0].textContent;
xls_link.setAttribute(
"href",
location.protocol + "//" +location.host + "/Temp/" + filename);
xls_link.click();
try {
xls_result = await connection.runScript("xls_from_csv.py",
{"urlencoded": csv_string}).catch(
(err) => { globalError(err); });
var filename = xls_result.getElementsByTagName("stdout")[0].textContent;
xls_link.setAttribute(
"href",
location.protocol + "//" +location.host + "/Temp/" + filename);
xls_link.click();
} catch (e) {
xls_link.setAttribute("onClick", onClickValue);
};
return true;
}
......@@ -108,8 +108,8 @@
</a>
</p>
<p>
<a id="downloadLinkXLS" onclick="downloadXLS()"
download="selected_data.xls"> Download XLS File
<a id="downloadLinkXLS" onclick="downloadXLS()" download="">
Download XLS File
</a>
</p>
<hr/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment