From: Jongsung Kim Date: Tue, 20 Nov 2018 08:36:10 +0000 (+0900) Subject: webui: epg: fix compatibility issue for FreeBSD X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d774953f6b1d775ddf31c7ae5bd6cc5e5787d108;p=thirdparty%2Ftvheadend.git webui: epg: fix compatibility issue for FreeBSD The EPG screen serviced by FreeBSD port of tvheadend has two abnormal control behaviors: Reset All button makes the list empty Typing and then deleting any search string also makes the list empty. This patch fixes the symptoms above. Patch tested with the latest FreeBSD port of tvheadend-4.2.7. Changes since v1: - call reset only if required --- diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index 57a14aa88..193a08285 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -1166,10 +1166,11 @@ tvheadend.epg = function() { epgFilterTitle.on('valid', function(c) { var value = c.getValue(); - if (value.length < 1) - value = null; - - if (epgStore.baseParams.title !== value) { + if (value.length < 1) { + delete epgStore.baseParams.title; + epgView.reset(); + } + else if (epgStore.baseParams.title !== value) { epgStore.baseParams.title = value; epgView.reset(); }