Commit 7827058a authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent 6881f2ba
......@@ -128,16 +128,19 @@ login = ->
$('.xmpp').click ->
Candy.View.Pane.PrivateRoom.open($(this).data('jid'), $(this).data('nick'), true, true)
#window.onunload = window.onbeforeunload
window.onbeforeunload = null
$('#candy').show()
candy_height = $('#candy').outerHeight true
$('.card_center').css('margin-bottom', -candy_height)
$('.card_center').css('padding-bottom', candy_height)
$('#candy').show()
#window.onunload = window.onbeforeunload
window.onbeforeunload = null
$('.xmpp').click ->
Candy.View.Pane.PrivateRoom.open($(this).data('jid'), $(this).data('nick'), true, true)
$('#roster').show()
@after_login = ->
$('.online_list').show()
$('#current_username').html(Candy.Util.getCookie('username'))
$('.log_reg.not_logged').hide()
$('.log_reg.logged').show()
logout = ->
Candy.Util.deleteCookie('jid')
......@@ -150,10 +153,8 @@ $(document).ready ->
if Candy.Util.getCookie('jid')
login()
if Candy.Util.getCookie('password')
$('#current_username').html(Candy.Util.getCookie('username'));
$('.log_reg.not_logged').hide();
$('.log_reg.logged').show();
after_login()
$('#new_room_dialog').dialog
autoOpen:false,
......
......@@ -216,15 +216,18 @@
$('.xmpp').click(function() {
return Candy.View.Pane.PrivateRoom.open($(this).data('jid'), $(this).data('nick'), true, true);
});
window.onbeforeunload = null;
$('#candy').show();
candy_height = $('#candy').outerHeight(true);
$('.card_center').css('margin-bottom', -candy_height);
$('.card_center').css('padding-bottom', candy_height);
$('#candy').show();
$('.xmpp').click(function() {
return Candy.View.Pane.PrivateRoom.open($(this).data('jid'), $(this).data('nick'), true, true);
});
return $('#roster').show();
return window.onbeforeunload = null;
};
this.after_login = function() {
$('.online_list').show();
$('#current_username').html(Candy.Util.getCookie('username'));
$('.log_reg.not_logged').hide();
return $('.log_reg.logged').show();
};
logout = function() {
......@@ -238,11 +241,7 @@
var new_room, rooms, servers;
if (Candy.Util.getCookie('jid')) {
login();
if (Candy.Util.getCookie('password')) {
$('#current_username').html(Candy.Util.getCookie('username'));
$('.log_reg.not_logged').hide();
$('.log_reg.logged').show();
}
after_login();
}
$('#new_room_dialog').dialog({
autoOpen: false,
......
......@@ -41,9 +41,7 @@
Candy.Util.setCookie('jid', username.value, 365);
Candy.Util.setCookie('username', node.value, 365);
Candy.Util.setCookie('password', password.value, 365);
$('#current_username').html(username.value);
$('.log_reg.not_logged').hide();
$('.log_reg.logged').show();">
after_login();">
{{#displayUsername}}
<label for="node">{{_labelUsername}}</label>
<input type="text" id="node" name="node"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment