From 0f016bcd7b199474d3242032d4351ba0e92b3c6e Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 11 Oct 2018 12:03:04 -0600 Subject: [PATCH] Change missing owner label lookup to deal with async request --- calendar/js/et2_widget_view.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/calendar/js/et2_widget_view.js b/calendar/js/et2_widget_view.js index 333f861f20..ebe56f314c 100644 --- a/calendar/js/et2_widget_view.js +++ b/calendar/js/et2_widget_view.js @@ -364,7 +364,7 @@ var et2_calendar_view = (function(){ "use strict"; return et2_valueWidget.extend if(options && options.find) { var found = options.find(function(element) {return element.id == user;}) || {}; - if(found && found.label) + if(found && found.label && found.label !== user) { label = found.label; } @@ -373,7 +373,10 @@ var et2_calendar_view = (function(){ "use strict"; return et2_valueWidget.extend { // No sidebox? Must be in home or sitemgr (no caching) - ask directly label = '?'; - egw.json('calendar_owner_etemplate_widget::ajax_owner',user,function(data) {label = data;}, this).sendRequest(); + egw.json('calendar_owner_etemplate_widget::ajax_owner',user,function(data) { + et2_calendar_view.owner_name_cache[user] = data; + this.invalidate(true); + }.bind(this), this).sendRequest(); } } if(label)