This commit is contained in:
@@ -185,6 +185,8 @@
|
|||||||
v-else
|
v-else
|
||||||
:key="item.key"
|
:key="item.key"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
|
:href="item.href"
|
||||||
|
:target="item.target"
|
||||||
@click="clickMenuItem(item)"
|
@click="clickMenuItem(item)"
|
||||||
v-bind:class="{ 'hidden-sm-and-up': item.surface }"
|
v-bind:class="{ 'hidden-sm-and-up': item.surface }"
|
||||||
:data-cy="!!$ay.dev ? item.key : false"
|
:data-cy="!!$ay.dev ? item.key : false"
|
||||||
|
|||||||
@@ -329,6 +329,16 @@ export default {
|
|||||||
return window.$gz.store.state.helpUrl.replace("/docs/", "/");
|
return window.$gz.store.state.helpUrl.replace("/docs/", "/");
|
||||||
},
|
},
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
// generic routed download URL
|
||||||
|
//
|
||||||
|
genericDownloadUrl(route) {
|
||||||
|
//http://localhost:7575/api/v8/backup/download/100?t=sssss
|
||||||
|
|
||||||
|
let url = route + "?t=" + window.$gz.store.state.downloadToken;
|
||||||
|
|
||||||
|
return this.APIUrl(url);
|
||||||
|
},
|
||||||
|
/////////////////////////////
|
||||||
// backup file download URL
|
// backup file download URL
|
||||||
//
|
//
|
||||||
backupDownloadUrl(fileName) {
|
backupDownloadUrl(fileName) {
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ async function clickHandler(menuItem) {
|
|||||||
m.vm.replaceDialog = true;
|
m.vm.replaceDialog = true;
|
||||||
break;
|
break;
|
||||||
case "export":
|
case "export":
|
||||||
alert("download stub");
|
//ignore download link let it go
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
m.vm.remove();
|
m.vm.remove();
|
||||||
@@ -636,12 +636,21 @@ function generateMenu(vm) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
//EXPORT
|
||||||
title: "Export",
|
if (vm.$route.params.recordid != 0) {
|
||||||
icon: "fa-file-download",
|
let href = window.$gz.api.genericDownloadUrl(
|
||||||
key: FORM_KEY + ":export",
|
"translation/download/" + vm.$route.params.recordid
|
||||||
vm: vm
|
);
|
||||||
});
|
|
||||||
|
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);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user