From 444d82011252dab7479b3285ae4cc723b0cb084d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 24 Apr 2014 13:39:58 +0200 Subject: [PATCH] Remove old popovers if search result is empty. --- app/assets/javascripts/app/controllers/navigation.js.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/app/controllers/navigation.js.coffee b/app/assets/javascripts/app/controllers/navigation.js.coffee index 9e7e1b07d..62c30caf4 100644 --- a/app/assets/javascripts/app/controllers/navigation.js.coffee +++ b/app/assets/javascripts/app/controllers/navigation.js.coffee @@ -49,6 +49,9 @@ class App.Navigation extends App.Controller if _.isEmpty( result ) @el.find('#global-search').parents('li').removeClass('open') el.html( '' ) + + # remove old popovers + $('.popover').remove() return # show result list