Permalink
Browse files

Merge pull request #167 from noraesae/minor

Fix that 'home' doesn't work after login or register
  • Loading branch information...
2 parents 3f8002b + 29991cf commit 8dcd4f505dd2a755f085856a8585cec1af929074 @thedjpetersen committed Sep 28, 2012
Showing with 5 additions and 3 deletions.
  1. +2 −2 assets/js/client.js
  2. +3 −1 assets/js/views/chat_application.js
View
@@ -79,7 +79,7 @@ $(function() {
irc.socket.emit('connect', {});
window.irc.loggedIn = true;
} else {
- $('#overview').html(ich.overview_connection());
+ irc.appView.overview.render({currentTarget: {id: "connection"}});
}
});
@@ -90,7 +90,7 @@ $(function() {
irc.socket.on('register_success', function(data) {
- $('#overview').html(ich.overview_connection());
+ irc.appView.overview.render({currentTarget: {id: "connection"}});
});
irc.socket.on('restore_connection', function(data) {
@@ -36,10 +36,12 @@ var ChatApplicationView = Backbone.View.extend({
this.render();
},
+ overview: null,
+
render: function() {
$('body').html($(this.el).html(ich.chat_application()));
if (!irc.connected) {
- var overview = new OverviewView;
+ this.overview = new OverviewView;
} else {
this.channelList = new ChannelListView;
}

0 comments on commit 8dcd4f5

Please sign in to comment.