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