Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Bushido/Kandan
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrove committed Apr 12, 2012
2 parents df9783e + 89dc69c commit ecb69f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/backbone/kandan.js.coffee
Expand Up @@ -64,6 +64,7 @@ window.Kandan =
add: (event, ui) ->
$('.header .ui-tabs-panel:last').detach().appendTo('#channels')
$('#kandan').tabs('option', 'disabled', [])
$('.header ul a').delegate('cite.close_channel', 'click', window.tabViewGlobal.deleteChannel)
})

$("#kandan").tabs 'option', 'tabTemplate', '''
Expand Down
3 changes: 2 additions & 1 deletion app/assets/javascripts/backbone/views/chatarea.js.coffee
Expand Up @@ -2,11 +2,12 @@ class Kandan.Views.ChatArea extends Backbone.View

render: ->
tabView = new Kandan.Views.ChannelTabs({channels: @options.channels})
window.tabViewGlobal = tabView
$('.header .logo').after(tabView.render().el)

# Binding tab events here, backbone can't properly attach
$('#create_channel').click(tabView.createChannel)
$('.header ul a').delegate('.close_channel', 'click', tabView.deleteChannel)
$('.header ul a').delegate('cite.close_channel', 'click', tabView.deleteChannel)

for channel in @options.channels.models
view = new Kandan.Views.ChannelPane({channel: channel})
Expand Down
2 changes: 1 addition & 1 deletion app/assets/templates/channel_tabs.jst.eco
@@ -1,6 +1,6 @@
<% for channel in @channels.models: %>
<li>
<a href="#<%= "channels-#{channel.get('id')}" %>">
<a href="#<%= "channels-#{channel.get('id')}" %>" class="show_channel" >
<span class="tab_right"></span>
<span class="tab_left"></span>
<span class="tab_content">
Expand Down

0 comments on commit ecb69f4

Please sign in to comment.