Changes for page Context Search
Last modified by bougault on 2023/02/20 16:29
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -40,9 +40,8 @@ 40 40 } 41 41 42 42 const filterInputs = document.querySelectorAll('input[data-role-filter]'); 43 - console.log(filterInputs);43 + 44 44 filterInputs.forEach(function(filterIpt) { 45 - console.log(filterIpt); 46 46 filterIpt.addEventListener('click', function() { 47 47 const role = this.getAttribute('data-role-filter'); 48 48 if(this.checked) { ... ... @@ -50,10 +50,15 @@ 50 50 } else { 51 51 removeRole(role); 52 52 } 53 - console.log(filters);52 + runFilteredRequest(); 54 54 }) 55 55 }); 56 56 56 + function runFilteredRequest() { 57 + for(filter in filters) { 58 + console.log(filter); 59 + } 60 + } 57 57 // https://wiki-dev.ebrains.eu/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&favorite=false&roles=administrator 58 58 const contextSearchType = document.getElementById("context-search-type"); 59 59 const contextSearchText = document.getElementById("context-search-text"); ... ... @@ -70,7 +70,7 @@ 70 70 handleXWikiSearch('bougaultx'); 71 71 break 72 72 default: 73 - handleXWikiSearch('' , applyAdministratorFilter)77 + handleXWikiSearch('') 74 74 } 75 75 76 76 });