From 35c5ad56c288e67ddf800b46afbbfbf1b5bde929 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 2 Apr 2020 14:09:29 +0000 Subject: [PATCH] --- ayanova/src/api/gzmenu.js | 20 ++++++++++---------- ayanova/src/api/gzutil.js | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index 8ed30069..5af3748c 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -18,8 +18,8 @@ export default { //FORMDATA is OPTIONAL and only required for forms that need to allow //viewing object history, attachments, custom fields, etc that kind of thing //usually CORE objects with an id, NOT utility type forms - var formAyaType = 0; - var formRecordId = 0; + let formAyaType = 0; + let formRecordId = 0; if (ctx.formData) { if (ctx.formData.ayaType != null) { formAyaType = ctx.formData.ayaType; @@ -30,7 +30,7 @@ export default { } //flag for if it's wikiable, reviewable, attachable, searchable, historical - var isCoreBizObject = formAyaType != 0 && formRecordId != 0; + let isCoreBizObject = formAyaType != 0 && formRecordId != 0; //set the help url if presented or default to the User section intro vm.appBar.helpUrl = ctx.helpUrl ? ctx.helpUrl : "user-intro"; @@ -167,7 +167,7 @@ export default { return; } //Find the key that is in the collection and replace it - for (var i = 0; i < vm.appBar.menuItems.length; i++) { + for (let i = 0; i < vm.appBar.menuItems.length; i++) { if (vm.appBar.menuItems[i].key == newItem.key) { //NOTE: since we are adding a new object, it has no reactivity in it so we need to use the Vue.Set to set it which //automatically adds the setters and getters that trigger reactivity @@ -188,8 +188,8 @@ export default { } //Find the menu item and set it to disabled and recolor it to disabled color and return - for (var i = 0; i < vm.appBar.menuItems.length; i++) { - var menuItem = vm.appBar.menuItems[i]; + for (let i = 0; i < vm.appBar.menuItems.length; i++) { + let menuItem = vm.appBar.menuItems[i]; if (menuItem.key == key) { vm.$set(vm.appBar.menuItems[i], "disabled", disabled); //menuItem.disabled = disabled; @@ -211,11 +211,11 @@ export default { //each part is separated by a colon //Handle different items - var item = this.parseMenuItem(menuItem); + let item = this.parseMenuItem(menuItem); if (!item.disabled && item.owner == "app") { switch (item.key) { case "help": - var helpurl = vm.$store.state.helpUrl + item.data; + let helpurl = vm.$store.state.helpUrl + item.data; window.open(helpurl, "_blank"); break; case "search": @@ -279,7 +279,7 @@ export default { parseMenuItem(menuItem) { //format is "AREA:KEY:UNIQUEID" //and data is in data portion - var keyparts = menuItem.key.split(":"); + let keyparts = menuItem.key.split(":"); return { owner: keyparts[0], key: keyparts[1], @@ -294,7 +294,7 @@ export default { // called once from app.vue only // wireUpEventHandlers(vm) { - var self = this; + let self = this; window.$gz.eventBus.$on("menu-change", function handleMenuChange(ctx) { self.handleMenuChange(vm, ctx); }); diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index fe30db5a..86c3fded 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -10,7 +10,7 @@ export default { // which can be problematic in some cases (IE bugs, watched data items in forms etc) removeAllPropertiesFromObject: function(o) { - for (var variableKey in o) { + for (let variableKey in o) { if (o.hasOwnProperty(variableKey)) { delete o[variableKey]; } @@ -89,7 +89,7 @@ export default { // https://stackoverflow.com/a/7616484/8939 // quickHash: function(theString) { - var hash = 0, + let hash = 0, i, chr; if (theString.length === 0) return hash; @@ -141,7 +141,7 @@ export default { return 0; } - var ret = parseFloat(string.replace(/[^\d.-]/g, "")); + let ret = parseFloat(string.replace(/[^\d.-]/g, "")); if (ret == NaN) { return 0; }