This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
/* Xeslint-disable */
|
/* Xeslint-disable */
|
||||||
|
import { processLogout } from "./authutil";
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
// Menu utils and handlers (if necessary)
|
// Menu utils and handlers
|
||||||
//
|
//
|
||||||
export default {
|
export default {
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
@@ -46,7 +47,8 @@ export default {
|
|||||||
that.appBar.menuItems.push({
|
that.appBar.menuItems.push({
|
||||||
title: that.$gzlocale.get("MenuHelp"),
|
title: that.$gzlocale.get("MenuHelp"),
|
||||||
icon: "question-circle",
|
icon: "question-circle",
|
||||||
key: "app:help:" + that.appBar.helpUrl
|
key: "app:help",
|
||||||
|
data: that.appBar.helpUrl
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
@@ -75,19 +77,26 @@ export default {
|
|||||||
// Deal with a menu change request
|
// Deal with a menu change request
|
||||||
// called from App.vue
|
// called from App.vue
|
||||||
handleClick(that, menuitem) {
|
handleClick(that, menuitem) {
|
||||||
if (!menuitem.disabled && menuitem.key.startsWith("app:")) {
|
//Key will start with the string "app:" if it's a global application command that should be handled here,
|
||||||
if (menuitem.key.startsWith("app:help:")) {
|
//otherwise it's a local command for a local form only
|
||||||
// "https://www.ayanova.com/AyaNova7webHelp/" +
|
//If there is any extended information required for the command it will be in the "data" key of the menu item (e.g. the url in a app:help link)
|
||||||
var helpurl =
|
|
||||||
that.$store.state.helpUrl + menuitem.key.replace("app:help:", "");
|
|
||||||
window.open(helpurl, "_blank");
|
|
||||||
} else {
|
|
||||||
alert("STUB gzmenu::handleClick - menu item clicked: " + menuitem.key);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Logout
|
//Handle different items
|
||||||
// auth.logout();
|
if (!menuitem.disabled && menuitem.key.startsWith("app:")) {
|
||||||
// this.$router.replace({ name: "login" });
|
switch (menuitem.key) {
|
||||||
|
case "app:help":
|
||||||
|
var helpurl = that.$store.state.helpUrl + menuitem.data;
|
||||||
|
window.open(helpurl, "_blank");
|
||||||
|
break;
|
||||||
|
case "app:logout":
|
||||||
|
processLogout();
|
||||||
|
that.$router.replace({ name: "login" });
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
alert(
|
||||||
|
"gzmenu:handleClick - unrecognized command [" + menuitem.key + "]"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//new functions above here
|
//new functions above here
|
||||||
|
|||||||
Reference in New Issue
Block a user