This commit is contained in:
@@ -40,7 +40,7 @@ export default {
|
||||
title: that.$gzlocale.get("Logout"),
|
||||
icon: "sign-out-alt",
|
||||
color: "pink",
|
||||
key: "app||logout"
|
||||
key: "app:logout"
|
||||
});
|
||||
|
||||
//divider
|
||||
@@ -50,14 +50,16 @@ export default {
|
||||
that.appBar.menuItems.push({
|
||||
title: that.$gzlocale.get("MenuHelp"),
|
||||
icon: "question-circle",
|
||||
key: "app||help||" + that.appBar.helpUrl
|
||||
key: "app:help",
|
||||
data: that.appBar.helpUrl
|
||||
});
|
||||
|
||||
//ABOUT
|
||||
that.appBar.menuItems.push({
|
||||
title: that.$gzlocale.get("HelpAboutAyaNova"),
|
||||
icon: "info-circle",
|
||||
key: "app||nav||about"
|
||||
key: "app:nav:abt",
|
||||
data: "about"
|
||||
});
|
||||
},
|
||||
///////////////////////////////
|
||||
@@ -86,20 +88,19 @@ export default {
|
||||
// Deal with a menu change request
|
||||
// called from App.vue
|
||||
handleClick(that, menuitem) {
|
||||
//Key will start with the string "app||" if it's a global application command that should be handled here,
|
||||
//Key will start with the string "app:" if it's a global application command that should be handled here,
|
||||
//otherwise it's a local command for a local form only
|
||||
//If there is any extended information required for the command it will be in the key after the command portion of the menu item (e.g. the url in a app||help link)
|
||||
//split a key into component parts, part one is the responsible party, part two is the command, part three to part * are all extra info
|
||||
//each part is separated by a double pipe symbol ||
|
||||
//If there is any extended information required for the command it will be in the data property of the menu item
|
||||
//split a key into component parts, part one is the responsible party, part two is the command, part three only exists to make it unique if necessary
|
||||
//each part is separated by a colon
|
||||
|
||||
//Handle different items
|
||||
if (!menuitem.disabled && menuitem.key.startsWith("app||")) {
|
||||
var keyparts = menuitem.key.split("||");
|
||||
if (!menuitem.disabled && menuitem.key.startsWith("app:")) {
|
||||
var keyparts = menuitem.key.split(":");
|
||||
var cmd = keyparts[1];
|
||||
var data = keyparts[2] ? keyparts[2] : null;
|
||||
switch (cmd) {
|
||||
case "help":
|
||||
var helpurl = that.$store.state.helpUrl + data;
|
||||
var helpurl = that.$store.state.helpUrl + menuitem.data;
|
||||
window.open(helpurl, "_blank");
|
||||
break;
|
||||
case "logout":
|
||||
@@ -107,7 +108,7 @@ export default {
|
||||
that.$router.replace({ name: "login" });
|
||||
break;
|
||||
case "nav":
|
||||
that.$router.replace({ name: data });
|
||||
that.$router.replace({ name: menuitem.data });
|
||||
break;
|
||||
default:
|
||||
alert(
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
import aboutInfo from "../api/aboutinfo";
|
||||
|
||||
function clickHandler(item) {
|
||||
if (!item.disabled && !item.key.startsWith("app||")) {
|
||||
if (!item.disabled && !item.key.startsWith("app:")) {
|
||||
alert("about.vue::context click: " + item.key);
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,8 @@ export default {
|
||||
title: this.$gzlocale.get("log"),
|
||||
icon: "glasses",
|
||||
surface: true,
|
||||
key: "app||nav||log"
|
||||
key: "app:nav:log",
|
||||
data: "log"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<script>
|
||||
/* xeslint-disable */
|
||||
function clickHandler(item) {
|
||||
if (!item.disabled && !item.key.startsWith("app||")) {
|
||||
if (!item.disabled && !item.key.startsWith("app:")) {
|
||||
alert("inventory-widget-edit.vue::context click: " + item.key);
|
||||
}
|
||||
}
|
||||
@@ -185,19 +185,19 @@ export default {
|
||||
title: this.$gzlocale.get("Save"),
|
||||
icon: "save",
|
||||
surface: true,
|
||||
key: "inventory-widget-edit||save"
|
||||
key: "inventory-widget-edit:save"
|
||||
},
|
||||
{
|
||||
title: this.$gzlocale.get("Delete"),
|
||||
icon: "trash-alt",
|
||||
surface: true,
|
||||
key: "inventory-widget-edit||delete"
|
||||
key: "inventory-widget-edit:delete"
|
||||
},
|
||||
{ divider: true, inset: false },
|
||||
{
|
||||
title: this.$gzlocale.get("Duplicate"),
|
||||
icon: "clone",
|
||||
key: "inventory-widget-edit||duplicate"
|
||||
key: "inventory-widget-edit:duplicate"
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -282,7 +282,7 @@ export default {
|
||||
icon: "save",
|
||||
color: "error",
|
||||
disabled: true,
|
||||
key: "save"
|
||||
key: "inventory-widget-edit:save"
|
||||
});
|
||||
// alert("stub test click");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user