This commit is contained in:
2020-04-19 21:55:14 +00:00
parent 1aca00100a
commit 128332eb19
3 changed files with 11 additions and 13 deletions

View File

@@ -694,7 +694,7 @@ export default {
if (newState.readOnly != null) {
newState.vm.formState.readOnly = newState.readOnly;
}
if (newState.ready != null) {
newState.vm.formState.ready = newState.ready;
}

View File

@@ -800,8 +800,6 @@ export default {
todo: wiki controls showing before widget form has loaded causing annoying ability to click but then doesn't work right away
- wiki controls (and indeed nothing at all) should show on form until the object is finished loading
todo: widget form, remove wiki menu option

View File

@@ -231,9 +231,9 @@
<script>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* Xeslint-disable */
//v-bind:value.sync="obj.customFields"
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Illegal1 = O0
//
const FORM_KEY = "widget-edit";
const API_BASE_URL = "Widget/";
const FORM_CUSTOM_TEMPLATE_KEY = "Widget";
@@ -258,23 +258,20 @@ export default {
dirty: false,
valid: true,
loading: false,
readOnly: readOnly,
ready: true
readOnly: readOnly
});
// //bugbug WTF? This doesn't make sense, if it's an attempt to hide delete button then that's wrong
// //it's a new record so it can't be deleted so...
// vm.rights.delete = false;
generateMenu(vm);
vm.formState.ready = true;
}
})
.catch(err => {
window.$gz.errorHandler.handleFormError(err, vm);
vm.formState.ready = true;
})
.finally(function() {
// vm.formState.ready = true;
vm.formState.ready = true;
});
},
beforeRouteUpdate(to, from, next) {
@@ -393,7 +390,11 @@ export default {
return window.$gz.form;
},
fieldValueChanged(ref) {
if (!this.formState.loading && !this.formState.readOnly) {
if (
this.formState.ready &&
!this.formState.loading &&
!this.formState.readOnly
) {
window.$gz.form.fieldValueChanged(this, ref);
}
},
@@ -410,7 +411,6 @@ export default {
window.$gz.api
.get(url)
.then(res => {
vm.formState.ready = true;
if (res.error) {
//Not found?
if (res.error.code == "2010") {
@@ -428,7 +428,6 @@ export default {
window.$gz.form.setErrorBoxErrors(vm);
} else {
vm.obj = res.data;
//Update the form status
window.$gz.form.setFormState({
vm: vm,
@@ -437,6 +436,7 @@ export default {
loading: false,
readOnly: res.readOnly ? true : false
});
//modify the menu as necessary
generateMenu(vm);
}