1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixes #2172 - Search needs improvment

This commit is contained in:
Luke Pulverenti 2017-05-01 16:03:02 -04:00
parent 4929ffa53b
commit 6c8302d905
70 changed files with 618 additions and 240 deletions

View file

@ -0,0 +1 @@
define(["searchFields","searchResults","events"],function(SearchFields,SearchResults,events){"use strict";function init(instance,tabContent,parentId){tabContent.innerHTML='<div class="searchFields"></div><div class="searchResults"></div>',instance.searchFields=new SearchFields({element:tabContent.querySelector(".searchFields")}),instance.searchResults=new SearchResults({element:tabContent.querySelector(".searchResults"),serverId:ApiClient.serverId(),parentId:parentId}),events.on(instance.searchFields,"search",function(e,value){instance.searchResults.search(value)})}function SearchTab(view,params,tabContent){var self=this;init(this,tabContent,params.topParentId||params.parentId),self.preRender=function(){},self.renderTab=function(){var searchFields=this.searchFields;searchFields&&searchFields.focus()}}return SearchTab.prototype.destroy=function(){var searchFields=this.searchFields;searchFields&&searchFields.destroy(),this.searchFields=null;var searchResults=this.searchResults;searchResults&&searchResults.destroy(),this.searchResults=null},SearchTab});