mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 13:36:54 +03:00
Rolling 20220215
This commit is contained in:
@@ -1480,12 +1480,21 @@ function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1)
|
||||
if (textToFind == undefined)
|
||||
continue;
|
||||
|
||||
_isFound = false;
|
||||
element.selectedIndex = -1;
|
||||
for (var i = 0; i < element.options.length; i++) {
|
||||
if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
|
||||
element.selectedIndex = i;
|
||||
_isFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!_isFound)
|
||||
{
|
||||
_zw_txt = "In the selectd field the value '" + textToFind + "' in the parameter '";
|
||||
_zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
|
||||
alert(_zw_txt);
|
||||
}
|
||||
}
|
||||
else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
|
||||
element.checked = NUMBERS[_number][_cat][_name]["value"+j] == "true";
|
||||
@@ -1512,12 +1521,22 @@ function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1)
|
||||
if (textToFind == undefined)
|
||||
continue;
|
||||
|
||||
_isFound = false;
|
||||
element.selectedIndex = -1;
|
||||
for (var i = 0; i < element.options.length; i++) {
|
||||
if (element.options[i].value.toLowerCase() === textToFind.toLowerCase()) {
|
||||
element.selectedIndex = i;
|
||||
_isFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!_isFound)
|
||||
{
|
||||
_zw_txt = "In the selectd field the value '" + textToFind + "' in the section '";
|
||||
_zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
|
||||
alert(_zw_txt);
|
||||
}
|
||||
|
||||
}
|
||||
else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
|
||||
element.checked = _param[_cat][_name]["value"+j] == "true";
|
||||
|
||||
Reference in New Issue
Block a user