fix: search
This commit is contained in:
@@ -26,7 +26,7 @@ SECRET_KEY = "django-insecure-^@m5bl*8x+=@c^b0lhkgb-%_#9#&oad=v15jq=!0$g#x17zjf8
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -14,6 +14,7 @@ document.addEventListener('keydown', (event)=>{
|
||||
let searchParam = params.get('s');
|
||||
if (searchParam){
|
||||
searchInput.value = searchParam;
|
||||
console.log(searchParam);
|
||||
search(searchParam);
|
||||
}
|
||||
|
||||
@@ -21,7 +22,8 @@ function submitSearch(event){
|
||||
event.preventDefault();
|
||||
search();
|
||||
}
|
||||
function search(searchStr = searchInput.value.toLowerCase()){
|
||||
function search(searchStr = searchInput.value){
|
||||
searchStr= searchStr.toLowerCase();
|
||||
function showMatch(tr){
|
||||
// match search with list
|
||||
let searchSuccess = Array.from(tr.getElementsByClassName('table-data')).map(e => e.textContent.toLowerCase())
|
||||
|
||||
@@ -42,6 +42,10 @@ small{
|
||||
border-color: var(--bg-acc);
|
||||
box-shadow: var(--bg-acc) 2px 2px;
|
||||
}
|
||||
table, tr{
|
||||
/* make table not resize when elements are hidden by searching */
|
||||
width: 100%;
|
||||
}
|
||||
th{
|
||||
text-align: left;
|
||||
}
|
||||
@@ -65,6 +69,7 @@ a:hover, a:any-link{
|
||||
color: inherit;
|
||||
}
|
||||
.table-link{
|
||||
/* TODO fix links with no title/content being almost unclickable */
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user