Skip to content

Commit

Permalink
live events for delete and create channel
Browse files Browse the repository at this point in the history
  • Loading branch information
kevzettler committed Apr 5, 2012
1 parent b6c3098 commit 3bdc720
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/assets/javascripts/backbone/views/chatarea.js.coffee
Expand Up @@ -9,7 +9,7 @@ class Kandan.Views.ChatArea extends Backbone.View

render: ->
$('.header .logo').after(@template({channels: @options.channels}))
$('.close_channel').click(@deleteChannel);
$('.close_channel').live('click',@deleteChannel);
$('.create_channel').click(@createChannel);
for channel in @options.channels.models
view = new Kandan.Views.ChannelPane({channel: channel})
Expand All @@ -18,7 +18,6 @@ class Kandan.Views.ChatArea extends Backbone.View
@

createChannel: (event)->
console.log("createChannel called", event);
channelName = prompt("What's the channel name?", "New channel")
channelName = channelName.replace(/^\s+|\s+$/g, '')
if channelName
Expand Down

0 comments on commit 3bdc720

Please sign in to comment.