This commit is contained in:
@@ -49,10 +49,19 @@ All platforms and browsers
|
||||
- DONE reorganize SAVE, DELETE ETC, put a divider between main form actions and then all the myriad of secondary things
|
||||
- DONE LOCALIZE check all new menu items, some might be not localized (look for ALL CAPS)
|
||||
- DONE WIRE UP logout link to go to login form and logout properly
|
||||
### THIS NEXT -> - JUST CHANGED the keys to a new system and dropping data property, right in the middle of it actually but it needs to be changed back partially see below
|
||||
- First of all, put gzmenu on to the vue object in main so can use it for little utilities like click handling, generating unique nav keys etc
|
||||
- Reason was to ensure key uniqueness (two nav items with same key are erroring)
|
||||
- HOWEVER as I'm thinking about it now, do we really want all that url stuff being in the key?
|
||||
- Instead, change back to using data but add a third parameter to make sure that keys are unique somehow
|
||||
- That way we can put anything into the data key again because in future might need whole objects etc (almost certainly will)
|
||||
- Move ABOUT item to just above HELP in menu and remove from main NAV and make it navigate properly on click
|
||||
- Make about contextual and insert a menu item to view log
|
||||
- TODO navigating through menu doesn't "back" properly when clicking back on browser controls
|
||||
- WIRE up save menu item and add code to disable save on broken rules (and make red, disabled etc)
|
||||
- Wire up delete menu item
|
||||
- api code is stubbed out for delete, need to write that as well
|
||||
- Move ABOUT item to just above HELP in menu and remove from main NAV and make it navigate properly on click
|
||||
|
||||
- DO I need to institute a back button? (in APP MODE?? installed to "desktop" on device will I be able to easily navigate without back and forward buttons)
|
||||
|
||||
- Navigation guard: navigate away with unsaved changes should warn and prevent but have option to continue anyway
|
||||
@@ -288,6 +297,8 @@ Make all fields work according to specs below
|
||||
- List should remember where the user was when they go to edit and back again
|
||||
- What to do if they edit? Refresh the list but keep the same page location?
|
||||
|
||||
- something I just forgot as I went to write it and got stuck reading older shit here
|
||||
|
||||
- SCROLL POSITION !! - Very important, must return UI to exact scroll position on navigation backwards, not doing so causes a hellish UI to use.
|
||||
- Same position in window
|
||||
- Same settings in any grids being shown and scrolled to same point in grids
|
||||
|
||||
@@ -35,20 +35,29 @@ export default {
|
||||
|
||||
//global menu items
|
||||
|
||||
//Logout
|
||||
//LOGOUT
|
||||
that.appBar.menuItems.push({
|
||||
title: that.$gzlocale.get("Logout"),
|
||||
icon: "sign-out-alt",
|
||||
color: "pink",
|
||||
key: "app:logout"
|
||||
key: "app||logout"
|
||||
});
|
||||
|
||||
//Insert help item
|
||||
//divider
|
||||
that.appBar.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
//HELP
|
||||
that.appBar.menuItems.push({
|
||||
title: that.$gzlocale.get("MenuHelp"),
|
||||
icon: "question-circle",
|
||||
key: "app:help",
|
||||
data: that.appBar.helpUrl
|
||||
key: "app||help||" + that.appBar.helpUrl
|
||||
});
|
||||
|
||||
//ABOUT
|
||||
that.appBar.menuItems.push({
|
||||
title: that.$gzlocale.get("HelpAboutAyaNova"),
|
||||
icon: "info-circle",
|
||||
key: "app||nav||about"
|
||||
});
|
||||
},
|
||||
///////////////////////////////
|
||||
@@ -77,21 +86,29 @@ 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 "data" key 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 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 ||
|
||||
|
||||
//Handle different items
|
||||
if (!menuitem.disabled && menuitem.key.startsWith("app:")) {
|
||||
switch (menuitem.key) {
|
||||
case "app:help":
|
||||
var helpurl = that.$store.state.helpUrl + menuitem.data;
|
||||
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;
|
||||
window.open(helpurl, "_blank");
|
||||
break;
|
||||
case "app:logout":
|
||||
case "logout":
|
||||
processLogout();
|
||||
that.$router.replace({ name: "login" });
|
||||
break;
|
||||
case "nav":
|
||||
that.$router.replace({ name: data });
|
||||
break;
|
||||
default:
|
||||
alert(
|
||||
"gzmenu:handleClick - unrecognized command [" + menuitem.key + "]"
|
||||
|
||||
@@ -70,9 +70,10 @@ export default function initialize() {
|
||||
addNavItem(locale.get("Operations"), "cogs", "ops");
|
||||
}
|
||||
|
||||
//MOVED TO MENU OUT OF NAV
|
||||
//Everyone can see about and logout
|
||||
addNavItem(locale.get("HelpAboutAyaNova"), "info-circle", "/about");
|
||||
addNavItem(locale.get("Logout"), "sign-out-alt", "/login");
|
||||
// addNavItem(locale.get("HelpAboutAyaNova"), "info-circle", "/about");
|
||||
// addNavItem(locale.get("Logout"), "sign-out-alt", "/login");
|
||||
})
|
||||
.catch(function handleIntializeError(error) {
|
||||
store.commit("logItem", "Initialize::() ltfetch -> error" + error);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-layout row>
|
||||
<v-flex>
|
||||
<v-card>
|
||||
<v-toolbar>
|
||||
<!-- <v-toolbar>
|
||||
<v-avatar size="64px" tile>
|
||||
<img :src="require('../assets/bw-logo.svg')" alt="AyaNova">
|
||||
</v-avatar>
|
||||
@@ -11,7 +11,7 @@
|
||||
<v-btn large icon to="/log">
|
||||
<v-icon>fa-glasses</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
</v-toolbar>-->
|
||||
<v-list two-line subheader>
|
||||
<v-subheader>{{ this.$gzlocale.get("ClientApp")}}</v-subheader>
|
||||
<v-list-tile avatar>
|
||||
@@ -106,6 +106,13 @@
|
||||
<script>
|
||||
/* Xeslint-disable */
|
||||
import aboutInfo from "../api/aboutinfo";
|
||||
|
||||
function clickHandler(item) {
|
||||
if (!item.disabled && !item.key.startsWith("app||")) {
|
||||
alert("about.vue::context click: " + item.key);
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
beforeCreate() {
|
||||
this.$gzlocale.fetch([
|
||||
@@ -128,10 +135,19 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.$gzevent.$emit("menu-change", {
|
||||
isMain: true,
|
||||
isMain: false,
|
||||
icon: "fa-info-circle",
|
||||
title: this.$gzlocale.get("HelpAboutAyaNova")
|
||||
title: this.$gzlocale.get("HelpAboutAyaNova"),
|
||||
menuItems: [
|
||||
{
|
||||
title: this.$gzlocale.get("log"),
|
||||
icon: "glasses",
|
||||
surface: true,
|
||||
key: "app||nav||log"
|
||||
}
|
||||
]
|
||||
});
|
||||
this.$gzevent.$on("menu-click", clickHandler);
|
||||
|
||||
this.clientInfo.version = aboutInfo.version;
|
||||
this.$gzapi
|
||||
@@ -143,6 +159,9 @@ export default {
|
||||
throw error;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$gzevent.$off("menu-click", clickHandler);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
serverInfo: { license: { license: {} } },
|
||||
|
||||
@@ -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: "save"
|
||||
key: "inventory-widget-edit||save"
|
||||
},
|
||||
{
|
||||
title: this.$gzlocale.get("Delete"),
|
||||
icon: "trash-alt",
|
||||
surface: true,
|
||||
key: "delete"
|
||||
key: "inventory-widget-edit||delete"
|
||||
},
|
||||
{ divider: true, inset: false },
|
||||
{
|
||||
title: this.$gzlocale.get("Duplicate"),
|
||||
icon: "clone",
|
||||
key: "duplicate"
|
||||
key: "inventory-widget-edit||duplicate"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user