-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes on the serach.html page for the research questions, now it is…
… highlighted on which tab we are currently on.
- Loading branch information
Nikola Lekich
committed
Dec 16, 2019
1 parent
c45c1ab
commit 3d39025
Showing
4 changed files
with
36 additions
and
24 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
37 changes: 22 additions & 15 deletions
37
ckanext/knowledgehub/fanstatic/javascript/modules/render_homepage_results.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
function showSearchResults(evt, entity) { | ||
|
||
// hide elements | ||
tabcontent = document.getElementsByClassName("tab_content"); | ||
for (i = 0; i < tabcontent.length; i++) { | ||
tabcontent[i].style.display = "none"; | ||
} | ||
var x = document.getElementById(entity); | ||
if (x.style.display === "none") { | ||
x.style.display = "inline-block"; | ||
} else { | ||
x.style.display = "none"; | ||
} | ||
|
||
document.getElementById(entity).style.display = "inline-block"; | ||
function showSearchResults(evt, entity, id) { | ||
|
||
// hide elements | ||
tabcontent = document.getElementsByClassName("tab_content"); | ||
for (i = 0; i < tabcontent.length; i++) { | ||
tabcontent[i].style.display = "none"; | ||
} | ||
var x = document.getElementById(entity); | ||
if (x.style.display === "none") { | ||
x.style.display = "inline-block"; | ||
} else { | ||
x.style.display = "none"; | ||
} | ||
tabs = document.getElementsByClassName("tab"); | ||
for (i = 0; i < tabs.length; i++) { | ||
tabs[i].className = tabs[i].className.replace(" activateTab", ""); | ||
} | ||
evt.currentTarget.className += " activateTab"; | ||
|
||
|
||
|
||
document.getElementById(entity).style.display = "inline-block"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters