Merge branch 'disabled-properties' into 'v3'
Grey out read only properties in webapp Closes #673 See merge request openflexure/openflexure-microscope-server!475
This commit is contained in:
commit
bc462d446c
1 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
v-model="internalValue"
|
||||
class="uk-form-small numeric-setting-line-input"
|
||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||
:disabled="isDisabled"
|
||||
type="number"
|
||||
@input="grabFocus"
|
||||
@focusout="focusOut"
|
||||
|
|
@ -22,6 +23,7 @@
|
|||
<input
|
||||
ref="checkbox"
|
||||
v-model="internalValue"
|
||||
:disabled="isDisabled"
|
||||
class="uk-checkbox"
|
||||
type="checkbox"
|
||||
@change="sendValue"
|
||||
|
|
@ -39,6 +41,7 @@
|
|||
v-model="internalValue[i - 1]"
|
||||
class="uk-form-small numeric-setting-line-input"
|
||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||
:disabled="isDisabled"
|
||||
type="number"
|
||||
@input="grabFocus"
|
||||
@focusout="focusOut"
|
||||
|
|
@ -57,6 +60,7 @@
|
|||
v-model="internalValue[key]"
|
||||
class="uk-form-small numeric-setting-line-input"
|
||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||
:disabled="isDisabled"
|
||||
type="number"
|
||||
@input="grabFocus"
|
||||
@focusout="focusOut"
|
||||
|
|
@ -74,6 +78,7 @@
|
|||
v-model="internalValue"
|
||||
class="uk-form-small numeric-setting-line-input"
|
||||
:class="{ edited: isEdited, flash: animateUpdate }"
|
||||
:disabled="isDisabled"
|
||||
type="text"
|
||||
@focusout="focusOut"
|
||||
@keydown="keyDown"
|
||||
|
|
@ -166,6 +171,11 @@ export default {
|
|||
return 1;
|
||||
}
|
||||
},
|
||||
isDisabled() {
|
||||
return !this.dataSchema?.forms?.some(form =>
|
||||
form.op?.includes('writeproperty')
|
||||
);
|
||||
},
|
||||
dataType: function () {
|
||||
let prop = this.dataSchema;
|
||||
if (prop == undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue