This commit is contained in:
2020-06-25 14:02:06 +00:00
parent 186d4858fa
commit 39c6e1923b
3 changed files with 28 additions and 7 deletions

View File

@@ -508,7 +508,7 @@ async function clickHandler(menuItem) {
m.vm.replaceDialog = true;
break;
case "export":
alert("download stub");
//ignore download link let it go
break;
case "delete":
m.vm.remove();
@@ -636,12 +636,21 @@ function generateMenu(vm) {
});
}
menuOptions.menuItems.push({
title: "Export",
icon: "fa-file-download",
key: FORM_KEY + ":export",
vm: vm
});
//EXPORT
if (vm.$route.params.recordid != 0) {
let href = window.$gz.api.genericDownloadUrl(
"translation/download/" + vm.$route.params.recordid
);
menuOptions.menuItems.push({
title: "Export",
icon: "fa-file-download",
href: href,
target: "blank",
key: FORM_KEY + ":export",
vm: vm
});
}
window.$gz.eventBus.$emit("menu-change", menuOptions);
}