Skip to content

Commit

Permalink
Merge pull request #95 from gabceb/master-70
Browse files Browse the repository at this point in the history
Added error handling for rooms. Updated Backbone and Underscore
  • Loading branch information
fusion94 committed Feb 20, 2013
2 parents 9c07e55 + 459acb9 commit 1b1ec67
Show file tree
Hide file tree
Showing 5 changed files with 1,230 additions and 788 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/backbone/kandan.js.coffee.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ window.Kandan =
initTabs: ()->
$('#kandan').tabs({
select: (event, ui)->
if ui.tab.id == "create_channel" then return false

$(document).data('active-channel-id',
Kandan.Helpers.Channels.getChannelIdByTabIndex(ui.index))

Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/backbone/views/channel_tabs.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class Kandan.Views.ChannelTabs extends Backbone.View
channel.save({}, {
success: (model)->
Kandan.Helpers.Channels.createChannelArea(model)

error: (model)->
alert("Something went wrong while creating a new Room.\n\nMaybe the room name is already taken?")
})
console.log "create channel: #{channelName}"
return false
Expand Down
Loading

0 comments on commit 1b1ec67

Please sign in to comment.