Added * category by default curves settings
This commit is contained in:
@ -48,9 +48,24 @@ class CurvesSettingsPopup extends HTMLElement{
|
|||||||
let configurationLineObject = this.getRowValues(row);
|
let configurationLineObject = this.getRowValues(row);
|
||||||
let formmatedLineConfiguration = {...configurationLineObject};
|
let formmatedLineConfiguration = {...configurationLineObject};
|
||||||
|
|
||||||
if(!formmatedLineConfiguration.hasOwnProperty("variable") && Object.keys(formmatedLineConfiguration).length > 0){
|
if(!formmatedLineConfiguration.hasOwnProperty("variable")){
|
||||||
alertify.error("Variable not defined for some row(s).");
|
let definedFields = Object.keys(formmatedLineConfiguration).length;
|
||||||
throw Error;
|
if(formmatedLineConfiguration.hasOwnProperty("cat")){
|
||||||
|
if(formmatedLineConfiguration["cat"] === "*"){
|
||||||
|
if (definedFields >= 2){
|
||||||
|
alertify.error("Variable not defined for some row(s).");
|
||||||
|
throw Error;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
alertify.error("Variable not defined for some row(s).");
|
||||||
|
throw Error;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (definedFields > 0){
|
||||||
|
alertify.error("Variable not defined for some row(s).");
|
||||||
|
throw Error;
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
let key = formmatedLineConfiguration["variable"];
|
let key = formmatedLineConfiguration["variable"];
|
||||||
delete formmatedLineConfiguration["variable"];
|
delete formmatedLineConfiguration["variable"];
|
||||||
@ -200,6 +215,9 @@ class CurvesSettingsPopup extends HTMLElement{
|
|||||||
input.name = type;
|
input.name = type;
|
||||||
input.classList.add("text-input");
|
input.classList.add("text-input");
|
||||||
input.value = "";
|
input.value = "";
|
||||||
|
if (type == "cat"){
|
||||||
|
input.value = "*";
|
||||||
|
}
|
||||||
if(lineConfiguration != null && lineConfiguration.hasOwnProperty(type)){
|
if(lineConfiguration != null && lineConfiguration.hasOwnProperty(type)){
|
||||||
input.value = lineConfiguration[type];
|
input.value = lineConfiguration[type];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user