Merge pull request #16071 from atm-adrien/FIX/Linked_extrafields_alphaValue
FIX : Linked extrafields don't work with string value
This commit is contained in:
commit
34ce398033
@ -7111,7 +7111,17 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
var val = $("select[name=\""+parent_list+"\"]").val();
|
var val = $("select[name=\""+parent_list+"\"]").val();
|
||||||
var parentVal = parent_list + ":" + val;
|
var parentVal = parent_list + ":" + val;
|
||||||
if(val > 0) {
|
if(typeof val == "string"){
|
||||||
|
if(val != "") {
|
||||||
|
var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone();
|
||||||
|
$("select[name=\""+child_list+"\"] option[parent]").remove();
|
||||||
|
$("select[name=\""+child_list+"\"]").append(options);
|
||||||
|
} else {
|
||||||
|
var options = orig_select.find("option[parent]").clone();
|
||||||
|
$("select[name=\""+child_list+"\"] option[parent]").remove();
|
||||||
|
$("select[name=\""+child_list+"\"]").append(options);
|
||||||
|
}
|
||||||
|
} else if(val > 0) {
|
||||||
var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone();
|
var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone();
|
||||||
$("select[name=\""+child_list+"\"] option[parent]").remove();
|
$("select[name=\""+child_list+"\"] option[parent]").remove();
|
||||||
$("select[name=\""+child_list+"\"]").append(options);
|
$("select[name=\""+child_list+"\"]").append(options);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user