Fixed bug; Popover getting rendered multiple times and/or stuck.

This commit is contained in:
Mantas Masalskis 2019-04-05 14:18:55 +02:00 committed by Thorsten Eckel
parent 6393e398c1
commit 15687b8609

View file

@ -3,11 +3,13 @@ class App.PopoverProvider
@templateName = null # needs to be overrided @templateName = null # needs to be overrided
@permission = 'ticket.agent' @permission = 'ticket.agent'
@providers = {}
@providersConfigKey = 'PopoverProviders' @providersConfigKey = 'PopoverProviders'
@registerProvider: (key, klass) -> @registerProvider: (key, klass) ->
# create hash on the fly to avoid issues with class inheritance
if !@providers
@providers = {}
@providers[key] = klass @providers[key] = klass
App.Config.set(key, klass, @providersConfigKey) App.Config.set(key, klass, @providersConfigKey)