devarification complete, tests ok

This commit is contained in:
2020-04-02 22:31:04 +00:00
parent d9cf0dd106
commit 6212ff7ce8
8 changed files with 28 additions and 28 deletions

View File

@@ -246,7 +246,7 @@ export default {
},
created() {
//Detect version change, wipe persisted form settings if has changed
var currentVersion = window.$gz.clientInfo.version;
let currentVersion = window.$gz.clientInfo.version;
if (currentVersion != window.$gz.store.state.lastClientVersion) {
window.$gz.store.commit(
"logItem",

View File

@@ -48,7 +48,7 @@ import errorhandler from "./api/errorhandler";
// some say this is bad only due to if you want to server render the page
// (which is not necessary here anyway)
// however when I researched that I found it's easily worked around
// as all you need is a "window" global var defined and then it's all good in the hood
// as all you need is a "window" global let defined and then it's all good in the hood
// so for convenience and far less fuckery this is the way
//
@@ -100,24 +100,24 @@ Vue.config.productionTip = false;
// AJAX LOADER INDICATOR
//
// Store a copy of the fetch function
var _oldFetch = fetch;
let _oldFetch = fetch;
// Create our new version of the fetch function
window.fetch = function() {
// Create hooks
var fetchStart = new Event("fetchStart", {
let fetchStart = new Event("fetchStart", {
view: document,
bubbles: true,
cancelable: false
});
var fetchEnd = new Event("fetchEnd", {
let fetchEnd = new Event("fetchEnd", {
view: document,
bubbles: true,
cancelable: false
});
// Pass the supplied arguments to the real fetch function
var fetchCall = _oldFetch.apply(this, arguments);
let fetchCall = _oldFetch.apply(this, arguments);
// Trigger the fetchStart event
document.dispatchEvent(fetchStart);

View File

@@ -22,7 +22,7 @@
/* Xeslint-disable */
export default {
created() {
var vm = this;
let vm = this;
window.$gz.eventBus.$emit("menu-change", {
isMain: false,
icon: "fa-info-circle",
@@ -32,7 +32,7 @@ export default {
menuItems: []
});
var outText = "";
let outText = "";
window.$gz._.forEach(vm.$store.state.logArray, function appendLogItem(
value
) {

View File

@@ -106,7 +106,7 @@ const API_BASE_URL = "Auth/ChangePassword";
export default {
created() {
var vm = this;
let vm = this;
initForm(vm)
.then(() => {
vm.rights = window.$gz.role.fullRightsObject();
@@ -175,7 +175,7 @@ export default {
}
//enable / disable save button
var canSave = val.dirty && val.valid && !val.readOnly;
let canSave = val.dirty && val.valid && !val.readOnly;
if (canSave) {
window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":save");
} else {
@@ -207,12 +207,12 @@ export default {
},
submit() {
var vm = this;
let vm = this;
if (vm.canSave) {
vm.formState.loading = true;
//always submit from this form for the current logged in user id
var url = API_BASE_URL;
let url = API_BASE_URL;
//clear any errors vm might be around from previous submit
window.$gz.form.deleteAllErrorBoxErrors(vm);
@@ -247,7 +247,7 @@ function clickHandler(menuItem) {
if (!menuItem) {
return;
}
var m = window.$gz.menu.parseMenuItem(menuItem);
let m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) {
case "save":
@@ -267,7 +267,7 @@ function clickHandler(menuItem) {
//
//
function generateMenu(vm) {
var menuOptions = {
let menuOptions = {
isMain: true,
icon: "fa-key",
title: window.$gz.translation.get("SetLoginPassword"),

View File

@@ -129,7 +129,7 @@ const FORM_CUSTOM_TEMPLATE_KEY = "Useroptions";
export default {
created() {
var vm = this;
let vm = this;
initForm(vm)
.then(() => {
vm.rights = window.$gz.role.getRights(window.$gz.type.UserOptions);
@@ -215,7 +215,7 @@ export default {
}
//enable / disable save button
var canSave = val.dirty && val.valid && !val.readOnly;
let canSave = val.dirty && val.valid && !val.readOnly;
if (canSave) {
window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":save");
} else {
@@ -249,10 +249,10 @@ export default {
}
},
getDataFromApi() {
var vm = this;
let vm = this;
vm.formState.loading = true;
//always fetch on this form for the current logged in user id
var url = API_BASE_URL + vm.$store.state.userId;
let url = API_BASE_URL + vm.$store.state.userId;
window.$gz.form.deleteAllErrorBoxErrors(vm);
@@ -296,12 +296,12 @@ export default {
});
},
submit() {
var vm = this;
let vm = this;
if (vm.canSave) {
vm.formState.loading = true;
//always submit from this form for the current logged in user id
var url = API_BASE_URL + vm.$store.state.userId;
let url = API_BASE_URL + vm.$store.state.userId;
//clear any errors vm might be around from previous submit
window.$gz.form.deleteAllErrorBoxErrors(vm);
@@ -323,7 +323,7 @@ export default {
});
//Set values in store so they are updated immediately for user
var l = vm.$store.state.locale;
let l = vm.$store.state.locale;
if (vm.obj.languageOverride) {
l.languageOverride = vm.obj.languageOverride;
@@ -360,7 +360,7 @@ function clickHandler(menuItem) {
if (!menuItem) {
return;
}
var m = window.$gz.menu.parseMenuItem(menuItem);
let m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) {
case "save":
@@ -380,7 +380,7 @@ function clickHandler(menuItem) {
//
//
function generateMenu(vm) {
var menuOptions = {
let menuOptions = {
isMain: true,
icon: "fa-user-cog",
title: window.$gz.translation.get("UserSettings"),

View File

@@ -88,7 +88,7 @@ export default {
login() {
if (this.input.username != "" && this.input.password != "") {
this.errorBadCreds = false;
var vm = this;
let vm = this;
auth
.authenticate(this.input.username, this.input.password)

View File

@@ -22,7 +22,7 @@ export default {
},
created() {
// debugger;
var badPath = this.$router.history.current.path;
let badPath = this.$router.history.current.path;
//If this happens too early then it might not have all the setup stuf available which would trigger an infinite loop
if (
!window ||
@@ -33,7 +33,7 @@ export default {
) {
this.msg = '404 - NOT FOUND: "' + badPath + '"';
} else {
var notFoundTranslated = window.$gz.translation.get("ErrorAPI2010");
let notFoundTranslated = window.$gz.translation.get("ErrorAPI2010");
//format the message
this.msg = "404 - " + notFoundTranslated + ': "' + badPath + '"';
//log it in case we need to see it in tech support

View File

@@ -49,7 +49,7 @@ function clickHandler(menuItem) {
if (!menuItem) {
return;
}
var m = window.$gz.menu.parseMenuItem(menuItem);
let m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) {
case "new":
@@ -71,7 +71,7 @@ function clickHandler(menuItem) {
//
//
function generateMenu(vm) {
var menuOptions = {
let menuOptions = {
isMain: true,
icon: "fa-vial",
title: window.$gz.translation.get("WidgetList"),