mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +00:00 
			
		
		
		
	Add callbacks for search panel opening and closing
This commit is contained in:
		| @@ -4,5 +4,31 @@ | ||||
| */ | ||||
|  | ||||
| /* exported | ||||
|     closeSearchPanel, | ||||
|     openSearchPanel, | ||||
| */ | ||||
|  | ||||
|  | ||||
| function closeSearchPanel() { | ||||
|  | ||||
|     // TODO | ||||
|      | ||||
| } | ||||
|  | ||||
|  | ||||
| /* | ||||
|  * Callback when the search panel is opened. | ||||
|  * Ensure the panel is in a known state | ||||
|  */ | ||||
| function openSearchPanel() { | ||||
|  | ||||
|     var panel = $('#offcanvas-search'); | ||||
|  | ||||
|     // Ensure the 'no results found' element is visible | ||||
|     panel.find('#search-no-results').show(); | ||||
|  | ||||
|     // Finally, grab keyboard focus in the search bar | ||||
|     panel.find('#search-input').focus(); | ||||
|  | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user