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

View File

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