mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	close search button
This commit is contained in:
		
							parent
							
								
									385144451b
								
							
						
					
					
						commit
						e4d2513451
					
				
							
								
								
									
										
											BIN
										
									
								
								src/public/images/icons/search-20.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/public/images/icons/search-20.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 431 B | 
							
								
								
									
										
											BIN
										
									
								
								src/public/images/icons/x.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/public/images/icons/x.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 259 B | 
| @ -10,21 +10,26 @@ const $saveSearchButton = $("#save-search-button"); | ||||
| const $searchBox = $("#search-box"); | ||||
| const $searchResults = $("#search-results"); | ||||
| const $searchResultsInner = $("#search-results-inner"); | ||||
| const $closeSearchButton = $("#close-search-button"); | ||||
| 
 | ||||
| function showSearch() { | ||||
|     $searchBox.show(); | ||||
|     $searchInput.focus(); | ||||
| } | ||||
| 
 | ||||
| function hideSearch() { | ||||
|     resetSearch(); | ||||
| 
 | ||||
|     $searchResults.hide(); | ||||
|     $searchBox.hide(); | ||||
| } | ||||
| 
 | ||||
| function toggleSearch() { | ||||
|     if ($searchBox.is(":hidden")) { | ||||
|         showSearch(); | ||||
|     } | ||||
|     else { | ||||
|         resetSearch(); | ||||
| 
 | ||||
|         $searchResults.hide(); | ||||
|         $searchBox.hide(); | ||||
|         hideSearch(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| @ -89,6 +94,8 @@ $resetSearchButton.click(resetSearch); | ||||
| 
 | ||||
| $saveSearchButton.click(saveSearch); | ||||
| 
 | ||||
| $closeSearchButton.click(hideSearch); | ||||
| 
 | ||||
| export default { | ||||
|     toggleSearch, | ||||
|     resetSearch, | ||||
|  | ||||
| @ -76,13 +76,21 @@ | ||||
|         <div id="search-box" style="display: none; padding: 10px; margin-top: 10px;"> | ||||
|           <div style="display: flex; align-items: center;"> | ||||
|             <input name="search-text" placeholder="Search text, labels" style="flex-grow: 100; margin-left: 5px; margin-right: 5px;" autocomplete="off"> | ||||
|             <button id="do-search-button" class="btn btn-sm" title="Search">Search</button> | ||||
|             <button id="do-search-button" class="btn btn-sm" title="Search (enter)" style="padding: 4px;"> | ||||
|               <img src="/images/icons/search-20.png" alt="Search"/> | ||||
|             </button> | ||||
| 
 | ||||
|               | ||||
| 
 | ||||
|             <button id="save-search-button" class="btn btn-sm" title="Save search" style="padding: 4px;"> | ||||
|               <img src="/images/icons/save.png" alt="Save search"/> | ||||
|             </button> | ||||
| 
 | ||||
|               | ||||
| 
 | ||||
|             <button id="close-search-button" class="btn btn-sm" title="Close search" style="padding: 4px;"> | ||||
|               <img src="/images/icons/x.png" alt="Close search"/> | ||||
|             </button> | ||||
|           </div> | ||||
|         </div> | ||||
| 
 | ||||
| @ -318,7 +326,7 @@ | ||||
|         <div style="display: flex; justify-content: space-between;"> | ||||
|           <button id="jump-to-note-button" class="btn btn-sm btn-primary">Jump <kbd>enter</kbd></button> | ||||
| 
 | ||||
|           <button id="show-in-full-text-button" class="btn btn-sm"><< Show results in full text <kbd>ctrl+enter</kbd></button> | ||||
|           <button id="show-in-full-text-button" class="btn btn-sm">Search in full text <kbd>ctrl+enter</kbd></button> | ||||
|         </div> | ||||
|       </form> | ||||
|     </div> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner