 
   refreshObserver: =>
     articles = @el.closest('.content').find('.textBubble-content')
-    console.log('refreshObserver', articles)
     articles.off('mouseup', @onMouseUp)
     articles.on('mouseup', @onMouseUp) #future: touchend
 

      articles.attr('data-highlightcolor', @colors[@activeColorIndex].name)

  toggleHighlight: (e) =>
    console.log('toggleHighlight', @isActive)

    if @isActive
      $(e.currentTarget).removeClass('active')

      article_id = $(element).data('id')
      article    = App.TicketArticle.find(article_id)
      if article.preferences && article.preferences['highlight']
        @highlighter.deserialize(article.preferences['highlight'])
    )

  # the serialization creates one string for the entiery ticket
  # containing the offsets and the highlight classes
  #
  # we have to check how it works with having open several tickets - it might break
  #
  # if classes can be changed in the admin interface
  # we have to watch out to not end up with empty highlight classes
  storeHighlights: (article_id) ->

    # cleanup marker
    data         = @highlighter.serialize()
    marker       = "$article-content-#{article_id}"
    items        = data.split('|')
    newDataArray = [ items.shift() ]
    for item in items
      if item.substr(item.length-marker.length, item.length) is marker
        newDataArray.push item
    data = newDataArray.join('|')

    # store
    article                          = App.TicketArticle.find(article_id)
    article.preferences['highlight'] = data
    article.save()

