Anton Shestakov <av6@dwimlabs.net>, Tue, 24 May 2016 14:45:47 +0800
index: scroll chat logs to bottom on switching
This is not the most correct solution (although it works). It's better not to
detach children and instead set "visibility: hidden" on them and then do a
small css-related ritual dance so that they don't mess with each other. That
way scroll positions would always be retained.
coffee/sidebar.coffee
Permissions: -rw-r--r--
class window.Tram.SidebarApp extends Backbone.View "background: #{ @colors[show] || @colors['default'] };" minified = not @model.get('sidebar/minified') @model.set('sidebar/minified', minified) @$el.parent().toggleClass('mini', minified) $btn = $(event.currentTarget) show = $btn.attr('data-show') status = $btn.text().trim() @model.trigger('action/show', show, status) @model.trigger('action/disconnect') @rivet = rivets.bind(@el, model: @model, view: this)