From ee067d1d9255c89ca3d2d1a9d4db07244cea1f8b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 13 Apr 2020 23:50:45 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 9 --------- ayanova/src/api/gzmenu.js | 32 +++++++++++++++++++++++--------- ayanova/src/api/translation.js | 3 +-- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index c8be05c8..08f98348 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -50,15 +50,6 @@ CURRENT TODOs @@@@@@@@@@@ ROADMAP STAGE 2: - -todo: Remove all separators in menu, they create a false dichotomy and invite unnecessary questions - -todo: Remove About AyaNova from any non main form but keep on main forms - - In other words should not show in widget edit etc - -todo: Remove LOGOUT from any non main form but keep on main forms - - In other words should not show in widget edit etc - todo: Plugins option for every menu of every object with a type attached to it - but maybe named something else, not Plugins but similar icon - put it just above Customize and make it added from the central gzmenu code so can control what appears there diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index 95e1cd23..7caeb509 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -46,7 +46,7 @@ export default { vm.appBar.menuItems = ctx.menuItems; //DIVIDER //Insert the devider between context and global items - vm.appBar.menuItems.push({ divider: true, inset: false }); + // vm.appBar.menuItems.push({ divider: true, inset: false }); } //WIKI, ATTACHMENTS, RECORD HISTORY @@ -88,10 +88,22 @@ export default { }); } + //PLUGINS - for anything with a type but not necessarily an ID + if (formAyaType != 0) { + vm.appBar.menuItems.push({ + title: window.$gz.translation.get("More"), + icon: "fa-puzzle-piece", + key: "app:plugin", + data: formAyaType, + recordId: formRecordId + }); + } + //CUSTOMIZE //set custom fields and link to translation text editor if ( + isCoreBizObject && ctx.formData && ctx.formData.formCustomTemplateKey != undefined && window.$gz.role.hasRole([ @@ -103,7 +115,7 @@ export default { //add customize menu item //DIVIDER //Insert the devider between context and global items - vm.appBar.menuItems.push({ divider: true, inset: false }); + // vm.appBar.menuItems.push({ divider: true, inset: false }); //customize vm.appBar.menuItems.push({ title: window.$gz.translation.get("Customize"), @@ -122,7 +134,7 @@ export default { //global menu items //divider - vm.appBar.menuItems.push({ divider: true, inset: false }); + //vm.appBar.menuItems.push({ divider: true, inset: false }); //SEARCH //all forms except the search form @@ -145,7 +157,7 @@ export default { }); //ABOUT - if (ctx.helpUrl != "form-ay-about") { + if (!isCoreBizObject && !ctx.helpUrl != "form-ay-about") { vm.appBar.menuItems.push({ title: window.$gz.translation.get("HelpAboutAyaNova"), icon: "fa-info-circle", @@ -155,11 +167,13 @@ export default { } //LOGOUT - vm.appBar.menuItems.push({ - title: window.$gz.translation.get("Logout"), - icon: "fa-sign-out-alt", - key: "app:logout" - }); + if (!isCoreBizObject) { + vm.appBar.menuItems.push({ + title: window.$gz.translation.get("Logout"), + icon: "fa-sign-out-alt", + key: "app:logout" + }); + } }, /////////////////////////////// // CHANGE HANDLER diff --git a/ayanova/src/api/translation.js b/ayanova/src/api/translation.js index 1c07ce4e..15dbd1c3 100644 --- a/ayanova/src/api/translation.js +++ b/ayanova/src/api/translation.js @@ -35,7 +35,7 @@ export default { .then(window.$gz.api.status) .then(window.$gz.api.json) // eslint-disable-next-line - .then((response) => { + .then(response => { window.$gz._.forEach( response.data, function commitFetchedLTItemToStore(item) { @@ -103,7 +103,6 @@ export default { "MenuHelp", "More", "Logout", - //form required options "Active", "New", "Cancel",