From 4d60aff6ecfcd1d77962d4aa65eb3812fdd6eb72 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 24 Apr 2017 13:09:24 +0200 Subject: [PATCH] Contactsmenu popover: show proper message when server throws error Signed-off-by: Georg Ehrke --- core/js/jquery.contactsmenu.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/js/jquery.contactsmenu.js b/core/js/jquery.contactsmenu.js index 6e5f3228e3c..2c950fb35f6 100644 --- a/core/js/jquery.contactsmenu.js +++ b/core/js/jquery.contactsmenu.js @@ -78,9 +78,15 @@ if (actions.length === 0) { } + }, function() { + $list.find('ul').find('li').addClass('hidden'); + + var template = Handlebars.compile(ENTRY); + $list.find('ul').append(template({ + hyperlink: '#', + title: t('core', 'Error fetching contact actions') + })); }); - }).catch(function(reason) { - // TODO }); $(document).click(function(event) {