mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-15 17:37:30 +01:00
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:
@@ -303,6 +303,7 @@
|
||||
"sharing": "sharing",
|
||||
"list": "Liste",
|
||||
"download_space": "Space Herunterladen",
|
||||
"download_as_pdf": "Space als PDF herunterladen",
|
||||
"duplicate_destination_folder": "Zielordner für Duplikat",
|
||||
"type": "Typ",
|
||||
"promote": "Befördern",
|
||||
|
||||
@@ -308,6 +308,7 @@
|
||||
"list": "Export List",
|
||||
"link": "Link",
|
||||
"download_space": "Download Space",
|
||||
"download_as_pdf": "Download Space as PDF",
|
||||
"type": "Type",
|
||||
"download": "Download",
|
||||
"Previous Zone": "Previous Zone",
|
||||
@@ -321,4 +322,4 @@
|
||||
"mute_present": "Unfollow",
|
||||
"follow_present_help": "If someone else is presenting this Space, the other members automatically follow the presentation. Switch following on or off with this button.",
|
||||
"export": "export"
|
||||
}
|
||||
}
|
||||
@@ -308,6 +308,7 @@
|
||||
"list": "Lista para Exportar",
|
||||
"link": "Enlace",
|
||||
"download_space": "Espacio de Descarga",
|
||||
"download_as_pdf": "Descargar espacio en PDF",
|
||||
"type": "Tipo",
|
||||
"download": "Descarga",
|
||||
"Previous Zone": "Zona Previa",
|
||||
|
||||
@@ -301,6 +301,7 @@
|
||||
"goto_folder": "Aller au dossier %s",
|
||||
"stay_here": "Reste ici",
|
||||
"download_space": "télécharger un espace",
|
||||
"download_as_pdf": "télécharger un espace comme PDF",
|
||||
"type": "Type",
|
||||
"Previous Zone": "Zone précédent",
|
||||
"Next Zone": "Zone suivante",
|
||||
|
||||
@@ -308,6 +308,7 @@
|
||||
"list": "lista",
|
||||
"link": "Ligam",
|
||||
"download_space": "Telecargar espaci",
|
||||
"download_space_as_pdf": "Telecargar espaci PDF",
|
||||
"type": "Tipe",
|
||||
"download": "Telecargar",
|
||||
"Previous Zone": "Zòna precedenta",
|
||||
|
||||
@@ -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 + ").");
|
||||
|
||||
@@ -114,7 +114,12 @@ router.get('/pdf', function(req, res, next) {
|
||||
res.status(201).json({
|
||||
url: url
|
||||
});
|
||||
fs.unlink(local_path);
|
||||
fs.unlink(local_path, function(){
|
||||
if (err) console.log('unlink', err);
|
||||
else {
|
||||
console.log('unlink', local_path);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, (err) => {
|
||||
res.status(500).json({
|
||||
|
||||
@@ -156,6 +156,7 @@
|
||||
|
||||
<div class="dropdown-menu" role="menu">
|
||||
<ul class="select-list">
|
||||
<li v-on:click="download_space_as_pdf(item)"><span><span class="icon icon-sm icon-clipboard"></span><%= __('download_as_pdf') %></span></li>
|
||||
<li v-on:click="rename_space(item)"><span><span class="icon icon-sm icon-tag"></span><%= __('rename') %></span></li>
|
||||
<li v-on:click="delete_space(item)"><span><span class="icon icon-sm icon-trash"></span><%= __('delete') %></span></li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user