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() { created() {
//Detect version change, wipe persisted form settings if has changed //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) { if (currentVersion != window.$gz.store.state.lastClientVersion) {
window.$gz.store.commit( window.$gz.store.commit(
"logItem", "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 // some say this is bad only due to if you want to server render the page
// (which is not necessary here anyway) // (which is not necessary here anyway)
// however when I researched that I found it's easily worked around // 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 // so for convenience and far less fuckery this is the way
// //
@@ -100,24 +100,24 @@ Vue.config.productionTip = false;
// AJAX LOADER INDICATOR // AJAX LOADER INDICATOR
// //
// Store a copy of the fetch function // Store a copy of the fetch function
var _oldFetch = fetch; let _oldFetch = fetch;
// Create our new version of the fetch function // Create our new version of the fetch function
window.fetch = function() { window.fetch = function() {
// Create hooks // Create hooks
var fetchStart = new Event("fetchStart", { let fetchStart = new Event("fetchStart", {
view: document, view: document,
bubbles: true, bubbles: true,
cancelable: false cancelable: false
}); });
var fetchEnd = new Event("fetchEnd", { let fetchEnd = new Event("fetchEnd", {
view: document, view: document,
bubbles: true, bubbles: true,
cancelable: false cancelable: false
}); });
// Pass the supplied arguments to the real fetch function // 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 // Trigger the fetchStart event
document.dispatchEvent(fetchStart); document.dispatchEvent(fetchStart);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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