Commit d24ee075 authored by Iker Hurtado's avatar Iker Hurtado
Browse files

Recover Search button former function

parent 097e4a66
Pipeline #92400 skipped with stage
......@@ -140,6 +140,13 @@ class NewSearchMod {
this.sendQuery();
});
/* This button could be out of the search box because its functionality
is not part of it. It can also be removed eventually, if considered not necessary */
this.searchButton = this.searchBox.getSearchButtonElement();
this.searchButton.addEventListener( 'click', e => {
this.sendQuery();
});
this.addButtonsBox= this.element.querySelector('.add-buttons');
this.addElementButton = this.addButtonsBox.querySelector('.element-add-btn');
this.addFormulaButton = this.addButtonsBox.querySelector('.formula-add-btn');
......
......@@ -56,15 +56,12 @@ class SearchBox{
<button class="clean-btn" style="float: right;">Clear all</button>
</div>
<!-- this button should be out of the search box because its functionality
is not part of the search box, it's general for the search module
and it's probably being removed eventually -->
<button class="search-btn" >Search</button>
`;
this.searchButton = this.element.querySelector('.search-btn');
this.searchButton.addEventListener( "click", (e) => {
console.log('SEARCH event')
});
this.cleanButton = this.element.querySelector('.clean-btn');
this.cleanButton.addEventListener( "click", (e) => {
this.searchQuery = [];
......@@ -336,6 +333,10 @@ class SearchBox{
this.searchQueryChangeListener = listener;
}
getSearchButtonElement(){
return this.element.querySelector('.search-btn');
}
}
......@@ -397,6 +398,9 @@ class Formula{
}
/*
getReducedFormula(getTokens = true){
let counter = 0;
......
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