Skip to content

Commit

Permalink
adde channels seems ok, need fix for the button
Browse files Browse the repository at this point in the history
  • Loading branch information
kevzettler committed Apr 5, 2012
1 parent 3726429 commit 2ee81a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/assets/javascripts/backbone/helpers/channels.js.coffee
Expand Up @@ -96,9 +96,11 @@ class Kandan.Helpers.Channels

@createChannelArea: (channel)->
channelArea = "#channels-#{channel.get('id')}"
totalTabs = $("#channels").tabs("length")
totalTabs = $("#kandan").tabs("length")

$("#channels").tabs('add', channelArea, "#{channel.get("name")}", totalTabs)
console.log('createChannelArea',channelArea, totalTabs);

$("#kandan").tabs('add', channelArea, "#{channel.get("name")}", totalTabs)
Kandan.Helpers.Channels.replaceCreateButton()
view = new Kandan.Views.ChannelPane({channel: channel})
view.render $(channelArea)
Expand Down
7 changes: 4 additions & 3 deletions app/assets/javascripts/backbone/views/channel_pane.js.coffee
Expand Up @@ -3,19 +3,20 @@ class Kandan.Views.ChannelPane extends Backbone.View

render: (container)->
container = container || $(@el)
console.log("channel view render", container);
$(container).html @paginatedActivitiesView()
$(container).append @chatboxView()
@setIdAndData(container)
@

setIdAndData: (container)->
$(container).attr "id", "channels-#{@options.channel.get("id")}"
$(container).data "channel_id", @options.channel.get('id')

paginatedActivitiesView: ()->
view = new Kandan.Views.PaginatedActivities({channel: @options.channel})
view.render().el

chatboxView: ()->
view = new Kandan.Views.Chatbox({channel: @options.channel})
view.render().el

0 comments on commit 2ee81a5

Please sign in to comment.