Merge branch 'daniel' of https://gitlab.psi.ch/samenv/seweb into daniel
This commit is contained in:
@ -282,19 +282,10 @@ function updateValue(component) {
|
||||
if (text) {
|
||||
elem.innerHTML = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (type == "input") {
|
||||
let row = elem.closest('div');
|
||||
row.classList.remove('row-waiting-for-answer');
|
||||
|
||||
let oldValue = ('oldValue' in elem) ? elem.oldValue : elem.value;
|
||||
if (component.value != elem.value && parseFloat(component.value) != parseFloat(elem.value) && component.value != oldValue) {
|
||||
if (elem == document.activeElement || oldValue != elem.value) {
|
||||
row.classList.add('row-waiting-for-answer');
|
||||
} else {
|
||||
elem.value = component.value;
|
||||
}
|
||||
}
|
||||
elem.actualValue = component.value;
|
||||
resizeTextfield(elem);
|
||||
} else if (type == "checkbox") {
|
||||
|
@ -242,6 +242,10 @@ function createIconEdit (input_element) {
|
||||
hideInputElements();
|
||||
if (is_hidden) {
|
||||
input_element.classList.remove('input-element-hidden');
|
||||
if (input_element.inputChild) {
|
||||
// update input value before edit
|
||||
input_element.inputChild.value = input_element.inputChild.actualValue;
|
||||
}
|
||||
icon_edit.setAttribute('src', 'res/icon_edit_close.png');
|
||||
} else {
|
||||
icon_edit.setAttribute('src', 'res/icon_edit.png');
|
||||
@ -327,6 +331,7 @@ function createInputText(component) {
|
||||
};
|
||||
form.appendChild(input);
|
||||
form.appendChild(createSubmitButton());
|
||||
form.inputChild = input;
|
||||
return form;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user