replace unicode arrows with CSS tricks that should work on all platforms (patch by mledoze). Fixes #98, #116

This commit is contained in:
Stefan Breunig
2013-02-11 17:32:02 +01:00
parent 14cc1263f3
commit 9416aeb50f
5 changed files with 556 additions and 117 deletions

View File

@ -177,12 +177,12 @@ window.setupSidebarToggle = function() {
if(sidebar.is(':visible')) {
sidebar.hide();
$('.leaflet-right').css('margin-right','0');
toggle.html('◢<br>◥');
toggle.html('<span class="toggle open"></span>');
toggle.css('right', '0');
} else {
sidebar.show();
$('.leaflet-right').css('margin-right', SIDEBAR_WIDTH+1+'px');
toggle.html('◣<br>◤');
toggle.html('<span class="toggle close"></span>');
toggle.css('right', SIDEBAR_WIDTH+1+'px');
}
});

View File

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