Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
encyclopedia-gui
Commits
d24ee075
Commit
d24ee075
authored
Jan 29, 2021
by
Iker Hurtado
Browse files
Recover Search button former function
parent
097e4a66
Pipeline
#92400
skipped with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
client/src/search-mod/NewSearchMod.js
View file @
d24ee075
...
...
@@ -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
'
);
...
...
client/src/search-mod/SearchBox.view.js
View file @
d24ee075
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment