Search/banned/sort fields now functional
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -97,16 +97,16 @@ | |||||||
|                 </div> |                 </div> | ||||||
|                 <div class="rightcol column"> |                 <div class="rightcol column"> | ||||||
|                     <div class="searchcontainer column"> |                     <div class="searchcontainer column"> | ||||||
|                         <input class="searchbar" type="text" placeholder="Search Cluccs"> |                         <input class="searchbar" onchange="updateSearched(this.value)" type="text" placeholder="Search Cluccs"> | ||||||
|                         <input class="blockedwords" type="text" placeholder="Blocked words (separated by comma)"> |                         <input class="blockedwords" onchange="updateBlocked(this.value)" type="text" placeholder="Blocked words (separated by comma)"> | ||||||
|                         <div class="button sort-btn"> |                         <div class="button sort-btn"> | ||||||
|                             <span class="sortby">Sort By <span class="material-symbols-outlined">arrow_drop_down</span></span> |                             <span class="sortby">Sort By <span class="material-symbols-outlined">arrow_drop_down</span></span> | ||||||
|                             <div class="sort-dropdown"> |                             <div class="sort-dropdown"> | ||||||
|                                 <ul class="sort-dropdown-list"> |                                 <ul class="sort-dropdown-list"> | ||||||
|                                     <li>Time</li> |                                     <li onclick="updateSort('time')">Time</li> | ||||||
|                                     <li>Likes</li> |                                     <li onclick="updateSort('likes')">Likes</li> | ||||||
|                                     <li>Retweets</li> |                                     <li onclick="updateSort('retweets')">Retweets</li> | ||||||
|                                     <li>Replies</li> |                                     <li onclick="updateSort('replies')">Replies</li> | ||||||
|                                 </ul> |                                 </ul> | ||||||
|                             </div> |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|   | |||||||
| @@ -90,3 +90,20 @@ $(".order-btn").on("click", function() { | |||||||
|         $(window).trigger("descending") |         $(window).trigger("descending") | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | function updateSearched(searched){ | ||||||
|  |     searched = searched.split(","); | ||||||
|  |     filters.searchedWords = searched; | ||||||
|  |     $(window).trigger("filter"); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | function updateBlocked(blocked){ | ||||||
|  |     blocked = blocked.split(","); | ||||||
|  |     filters.blockedWords = blocked; | ||||||
|  |     $(window).trigger("filter"); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | function updateSort(sort){ | ||||||
|  |     filters.sorted = sort; | ||||||
|  |     $(window).trigger("filter"); | ||||||
|  | } | ||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user
	 jacktjong
					jacktjong