Commit 0319bded authored by Iker Hurtado's avatar Iker Hurtado
Browse files

Add the checkboxes that modify the search by Elements and Formula (II)

parent 399925e5
......@@ -7812,6 +7812,7 @@
if (this.queryTypes[i] === 'F'){
queryObj.bool.filter.push(this._getESSimpleMatch('formula_reduced', item));
console.log('getAllowOtherElementsYYYYYYYYYYYYY: '+this.formulaBox.getAllowOtherElements()+' '+this.formulaBox.getMultiplesOfFormula());
}else if (this.queryTypes[i] === 'MN'){
queryObj.bool.filter.push(this._getESSimpleMatch('material_name', item));
......@@ -8215,6 +8216,17 @@
this.formulaTextField.disabled = bool;
this.formulaButton.disabled = true;//bool;
}
getAllowOtherElements(){
return this.element.querySelector('.allow-other-elements').checked;
}
getMultiplesOfFormula(){
return this.element.querySelector('.multiples-of-formula').checked;
}
}
......
......@@ -205,6 +205,7 @@ class NewSearchMod {
if (this.queryTypes[i] === 'F'){
queryObj.bool.filter.push(this._getESSimpleMatch('formula_reduced', item));
console.log('getAllowOtherElementsYYYYYYYYYYYYY: '+this.formulaBox.getAllowOtherElements()+' '+this.formulaBox.getMultiplesOfFormula());
}else if (this.queryTypes[i] === 'MN'){
queryObj.bool.filter.push(this._getESSimpleMatch('material_name', item));
......@@ -608,6 +609,17 @@ class FormulaBox{
this.formulaTextField.disabled = bool;
this.formulaButton.disabled = true;//bool;
}
getAllowOtherElements(){
return this.element.querySelector('.allow-other-elements').checked;
}
getMultiplesOfFormula(){
return this.element.querySelector('.multiples-of-formula').checked;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment