Skip to content

Commit

Permalink
Merge pull request #167 from noraesae/minor
Browse files Browse the repository at this point in the history
Fix that 'home' doesn't work after login or register
  • Loading branch information
thedjpetersen committed Sep 28, 2012
2 parents 3f8002b + 29991cf commit 8dcd4f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/js/client.js
Expand Up @@ -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"}});
}
});

Expand All @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion assets/js/views/chat_application.js
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8dcd4f5

Please sign in to comment.