80:addc62773413
Anton Shestakov <av6@dwimlabs.net>, Sat, 02 Apr 2016 19:21:17 +0800
sidebar: add status controls (online, away, xa)

next change 86:6f227227ac6f
previous change 79:e0fd1f0f59bf

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()
@model.trigger('show', show, status)
disconnect: =>
@model.trigger('disconnect')
render: (model) ->
@rivet = rivets.bind(@el, model: @model, view: this)
@
remove: ->
@rivet.unbind()
super