This commit is contained in:
2019-04-17 19:04:05 +00:00
parent 05dc35b6d6
commit 891154d079
2 changed files with 11 additions and 22 deletions

View File

@@ -110,6 +110,7 @@ export default {
isMain: true,
icon: "",
title: "",
helpUrl: "index.html",
menuItems: []
}
};
@@ -124,6 +125,8 @@ export default {
that.appBar.isMain = ctx.isMain;
that.appBar.icon = ctx.icon;
that.appBar.title = ctx.title;
//set the help url if presented or default to the top of the index
that.appBar.helpUrl = ctx.helpUrl ? ctx.helpUrl : "index.html";
that.appBar.menuItems = [];
//CONTEXT TOP PORTION
@@ -132,14 +135,14 @@ export default {
that.appBar.menuItems = ctx.menuItems;
//DIVIDER
//Insert the devider between context and global items
that.appBar.menuItems.push({ divider: true, inset: true });
that.appBar.menuItems.push({ divider: true, inset: false });
}
//GLOBAL BOTTOM PORTION
//Global sub-heading
//Likely won't want this but here anyway to see
that.appBar.menuItems.push({ header: "GLOBAL" });
//that.appBar.menuItems.push({ header: "GLOBAL" });
//global menu items
@@ -150,22 +153,12 @@ export default {
key: "app:logout"
});
//Help
//There may already be a context help so double check that first if not then add a generic link to the start of docs
var helpItem = that.$_.find(that.appBar.menuItems, function(o) {
if (!o.key) {
return false;
}
return o.key.startsWith("app:help:");
//Insert help item
that.appBar.menuItems.push({
title: this.$gzlocale.get("MenuHelp"),
icon: "question-circle",
key: "app:help:" + that.appBar.helpUrl
});
if (!helpItem) {
that.appBar.menuItems.push({
title: this.$gzlocale.get("MenuHelp"),
icon: "question-circle",
key: "app:help:index.html"
});
}
}); //END OF EVENT
//////////////////////////////////

View File

@@ -179,6 +179,7 @@ export default {
isMain: false,
icon: "fa-splotch",
title: this.$gzlocale.get("Widget"),
helpUrl: "intro/#searching",
menuItems: [
{
title: this.$gzlocale.get("Duplicate"),
@@ -190,11 +191,6 @@ export default {
title: this.$gzlocale.get("Delete"),
icon: "trash-alt",
key: "delete"
},
{
title: this.$gzlocale.get("MenuHelp"),
icon: "question-circle",
key: "app:help:intro/#searching"
}
]
});