Skip to content
This repository
Browse code

Merge pull request #167 from noraesae/minor

Fix that 'home' doesn't work after login or register
  • Loading branch information...
commit 8dcd4f505dd2a755f085856a8585cec1af929074 2 parents 3f8002b + 29991cf
David Petersen authored
4 assets/js/client.js
@@ -79,7 +79,7 @@ $(function() {
79 79 irc.socket.emit('connect', {});
80 80 window.irc.loggedIn = true;
81 81 } else {
82   - $('#overview').html(ich.overview_connection());
  82 + irc.appView.overview.render({currentTarget: {id: "connection"}});
83 83 }
84 84 });
85 85
@@ -90,7 +90,7 @@ $(function() {
90 90
91 91
92 92 irc.socket.on('register_success', function(data) {
93   - $('#overview').html(ich.overview_connection());
  93 + irc.appView.overview.render({currentTarget: {id: "connection"}});
94 94 });
95 95
96 96 irc.socket.on('restore_connection', function(data) {
4 assets/js/views/chat_application.js
@@ -36,10 +36,12 @@ var ChatApplicationView = Backbone.View.extend({
36 36 this.render();
37 37 },
38 38
  39 + overview: null,
  40 +
39 41 render: function() {
40 42 $('body').html($(this.el).html(ich.chat_application()));
41 43 if (!irc.connected) {
42   - var overview = new OverviewView;
  44 + this.overview = new OverviewView;
43 45 } else {
44 46 this.channelList = new ChannelListView;
45 47 }

0 comments on commit 8dcd4f5

Please sign in to comment.
Something went wrong with that request. Please try again.