mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
1 line
663 B
JavaScript
1 line
663 B
JavaScript
define(["focusManager","searchFields","searchResults","events"],function(focusManager,SearchFields,SearchResults,events){"use strict";return function(view,params){var self=this;self.searchFields=new SearchFields({element:view.querySelector(".searchFields")}),self.searchResults=new SearchResults({element:view.querySelector(".searchResults"),serverId:ApiClient.serverId()}),events.on(self.searchFields,"search",function(e,value){self.searchResults.search(value)}),view.addEventListener("viewdestroy",function(){self.searchFields&&(self.searchFields.destroy(),self.searchFields=null),self.searchResults&&(self.searchResults.destroy(),self.searchResults=null)})}}); |