From d895f70da893a7be7d0f860fc952475296a2c970 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 7 Aug 2018 16:48:50 +0200 Subject: [PATCH] fix search provider --- css/main.css | 4 ++++ js/main.js | 37 ++++++++++--------------------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/css/main.css b/css/main.css index 6707a31..658f7ad 100644 --- a/css/main.css +++ b/css/main.css @@ -862,3 +862,7 @@ html.ie8 #controls .button.new { flex-basis: 100vw; min-height: 100%; } + +.favcolumn { + width: 16px; +} diff --git a/js/main.js b/js/main.js index a2fc5c8..ad13564 100644 --- a/js/main.js +++ b/js/main.js @@ -332,34 +332,16 @@ $(function(){ }, 500); }; - function mySearch(query){ - if (query != "") { - clearTimeout(searchTimeout); - searchTimeout = setTimeout(function(){ - $('#app-navigation').find('li').removeClass("active"); - $("tbody > tr").remove(); - radio_query(0, query); - }, 500); - }; - }; - - /*OC.Plugins.register('OCA.Search.Core', { - attach: function(search) { - search.setFilter('radio', mySearch); - } - });*/ - - - SearchProxy = { - attach: function(search) { - search.setFilter('radio', function(query) { - alert("test"); - }); - } - }; - - OC.Plugins.register('OCA.Search.Core', SearchProxy); + // Search function + new OCA.Search(function (query) { + $('#app-navigation').find('li').removeClass("active"); + $("tbody > tr").remove(); + radio_query(0, query); + }, function (arg) { + switch_menu(0); + }); + // Volume slider $('#volumeslider').slider({ orientation: "horizontal", value: player.volume, @@ -373,5 +355,6 @@ $(function(){ } }); + // On app start, load top list switch_menu(0); });