fix pdf export + add download_as_pdf template string and action (#110)

* fix pdf export
add download_as_pdf template string and action

* after pdf export click
- close dropdown
- open in new tab

* proper fix function
This commit is contained in:
banglashi
2020-11-02 20:07:15 +01:00
committed by GitHub
parent 7c6d5c83db
commit 6257e3410e
8 changed files with 15 additions and 3 deletions

View File

@@ -614,10 +614,11 @@ var SpacedeckSpaces = {
},
download_space_as_pdf: function(space) {
this.close_dropdown();
this.global_spinner = true;
get_resource("/spaces/" + space._id + "/pdf", function(o) {
this.global_spinner = false;
location.href = o.url;
window.open(o.url, "_blank");
}.bind(this), function(xhr) {
this.global_spinner = false;
alert("PDF export problem (" + xhr.status + ").");