fix #79 and part of #39

This commit is contained in:
Stefan Breunig
2013-02-10 09:02:08 +01:00
parent 6fdfac2923
commit f2400d1f8b
2 changed files with 9 additions and 2 deletions

View File

@ -469,14 +469,16 @@ window.chat.getActive = function() {
window.chat.toggle = function() {
var c = $('#chat, #chatcontrols');
if(c.hasClass('expand')) {
$('#chatcontrols a:first').text('expand');
$('#chatcontrols a:first').text('◢◣');
c.removeClass('expand');
var div = $('#chat > div:visible');
div.data('ignoreNextScroll', true);
div.scrollTop(99999999); // scroll to bottom
$('.leaflet-control').css('margin-left', '0');
} else {
$('#chatcontrols a:first').text('shrink');
$('#chatcontrols a:first').text('◥◤');
c.addClass('expand');
$('.leaflet-control').css('margin-left', '720px');
chat.needMoreMessages();
}
}