This commit is contained in:
@@ -40,7 +40,7 @@ export default {
|
|||||||
title: that.$gzlocale.get("Logout"),
|
title: that.$gzlocale.get("Logout"),
|
||||||
icon: "sign-out-alt",
|
icon: "sign-out-alt",
|
||||||
color: "pink",
|
color: "pink",
|
||||||
key: "app||logout"
|
key: "app:logout"
|
||||||
});
|
});
|
||||||
|
|
||||||
//divider
|
//divider
|
||||||
@@ -50,14 +50,16 @@ 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
|
||||||
});
|
});
|
||||||
|
|
||||||
//ABOUT
|
//ABOUT
|
||||||
that.appBar.menuItems.push({
|
that.appBar.menuItems.push({
|
||||||
title: that.$gzlocale.get("HelpAboutAyaNova"),
|
title: that.$gzlocale.get("HelpAboutAyaNova"),
|
||||||
icon: "info-circle",
|
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
|
// Deal with a menu change request
|
||||||
// called from App.vue
|
// called from App.vue
|
||||||
handleClick(that, menuitem) {
|
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
|
//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)
|
//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 to part * are all extra info
|
//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 double pipe symbol ||
|
//each part is separated by a colon
|
||||||
|
|
||||||
//Handle different items
|
//Handle different items
|
||||||
if (!menuitem.disabled && menuitem.key.startsWith("app||")) {
|
if (!menuitem.disabled && menuitem.key.startsWith("app:")) {
|
||||||
var keyparts = menuitem.key.split("||");
|
var keyparts = menuitem.key.split(":");
|
||||||
var cmd = keyparts[1];
|
var cmd = keyparts[1];
|
||||||
var data = keyparts[2] ? keyparts[2] : null;
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case "help":
|
case "help":
|
||||||
var helpurl = that.$store.state.helpUrl + data;
|
var helpurl = that.$store.state.helpUrl + menuitem.data;
|
||||||
window.open(helpurl, "_blank");
|
window.open(helpurl, "_blank");
|
||||||
break;
|
break;
|
||||||
case "logout":
|
case "logout":
|
||||||
@@ -107,7 +108,7 @@ export default {
|
|||||||
that.$router.replace({ name: "login" });
|
that.$router.replace({ name: "login" });
|
||||||
break;
|
break;
|
||||||
case "nav":
|
case "nav":
|
||||||
that.$router.replace({ name: data });
|
that.$router.replace({ name: menuitem.data });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
alert(
|
alert(
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
import aboutInfo from "../api/aboutinfo";
|
import aboutInfo from "../api/aboutinfo";
|
||||||
|
|
||||||
function clickHandler(item) {
|
function clickHandler(item) {
|
||||||
if (!item.disabled && !item.key.startsWith("app||")) {
|
if (!item.disabled && !item.key.startsWith("app:")) {
|
||||||
alert("about.vue::context click: " + item.key);
|
alert("about.vue::context click: " + item.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,8 @@ export default {
|
|||||||
title: this.$gzlocale.get("log"),
|
title: this.$gzlocale.get("log"),
|
||||||
icon: "glasses",
|
icon: "glasses",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: "app||nav||log"
|
key: "app:nav:log",
|
||||||
|
data: "log"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
<script>
|
<script>
|
||||||
/* xeslint-disable */
|
/* xeslint-disable */
|
||||||
function clickHandler(item) {
|
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);
|
alert("inventory-widget-edit.vue::context click: " + item.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -185,19 +185,19 @@ export default {
|
|||||||
title: this.$gzlocale.get("Save"),
|
title: this.$gzlocale.get("Save"),
|
||||||
icon: "save",
|
icon: "save",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: "inventory-widget-edit||save"
|
key: "inventory-widget-edit:save"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$gzlocale.get("Delete"),
|
title: this.$gzlocale.get("Delete"),
|
||||||
icon: "trash-alt",
|
icon: "trash-alt",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: "inventory-widget-edit||delete"
|
key: "inventory-widget-edit:delete"
|
||||||
},
|
},
|
||||||
{ divider: true, inset: false },
|
{ divider: true, inset: false },
|
||||||
{
|
{
|
||||||
title: this.$gzlocale.get("Duplicate"),
|
title: this.$gzlocale.get("Duplicate"),
|
||||||
icon: "clone",
|
icon: "clone",
|
||||||
key: "inventory-widget-edit||duplicate"
|
key: "inventory-widget-edit:duplicate"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -282,7 +282,7 @@ export default {
|
|||||||
icon: "save",
|
icon: "save",
|
||||||
color: "error",
|
color: "error",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
key: "save"
|
key: "inventory-widget-edit:save"
|
||||||
});
|
});
|
||||||
// alert("stub test click");
|
// alert("stub test click");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user