86:6f227227ac6f
Anton Shestakov <av6@dwimlabs.net>, Sun, 03 Apr 2016 18:51:54 +0800
sidebar: trim status text for sending in a new presence

next change 87:8fcb4b1f8611
previous change 80:addc62773413

coffee/sidebar.coffee

Permissions: -rw-r--r--

Other formats: Feeds:
class window.Tram.SidebarApp extends Backbone.View
colors: Tram.colors.show
initialize: ->
@render()
getPipColor: (show) =>
"background: #{ @colors[show] || @colors['default'] };"
show: (event) =>
$btn = $(event.currentTarget)
show = $btn.attr('data-show')
status = $btn.text().trim()
@model.trigger('show', show, status)
disconnect: =>
@model.trigger('disconnect')
render: (model) ->
@rivet = rivets.bind(@el, model: @model, view: this)
@
remove: ->
@rivet.unbind()
super