class Kakimasu.TranslationPopover constructor: (el) -> @$el = $(el) @delegateEvents() delegateEvents: -> @$el.on 'mouseenter', $.proxy(@showPopover, @) showPopover: (e) -> $translation = $(e.currentTarget) token = $('meta[name="csrf-token"]').attr('content') url_params = window.location.search key = $translation.data('content') translations = $translation.data('translations') #determine available locales locales = $translation.data('locales') locales = locales.split /\W+/ locales.shift() locales.pop() html = '
' html += '
' html += '

×

' html += '
' html += '
' html += ' $(this).closest('.popover').hide() $('.translation-with-key').css 'background-color', '#FFCCCC' $('.translation_missing').css 'background-color', '#FF6666'