minor status bar tweaks

- make L8 not show L8+
- add a little margin between the level info and the map status - may need reducing a little for mobile
- indentation fixes, minor cleanups
This commit is contained in:
Jon Atkins 2013-05-13 01:28:38 +01:00
parent e4ad933bb2
commit 66e6502d50
2 changed files with 12 additions and 6 deletions

View File

@ -39,15 +39,15 @@ window.requests.abort = function() {
// to website. Updates info in layer chooser. // to website. Updates info in layer chooser.
window.renderUpdateStatus = function() { window.renderUpdateStatus = function() {
var t = '<div><span class="help" title="Indicates portal levels displayed. Zoom in to display lower level portals."><b>portals:</b> '; var t = '<div><span class="help portallevel" title="Indicates portal levels displayed. Zoom in to display lower level portals."><b>portals</b>: ';
var minlvl = getMinPortalLevel(); var minlvl = getMinPortalLevel();
if(minlvl === 0) if(minlvl === 0)
t += 'all'; t += 'all';
else else
t+= 'L'+minlvl+'+'; t+= 'L'+minlvl+(minlvl<8?'+':'');
t +='</span>'; t +='</span>';
t += ' <b>map:</b> '; t += ' <span class="map"><b>map</b>: ';
if(mapRunsUserAction) if(mapRunsUserAction)
t += '<span class="help" title="Paused due to user interaction">paused</span'; t += '<span class="help" title="Paused due to user interaction">paused</span';
else if(isIdle()) else if(isIdle())
@ -58,14 +58,16 @@ window.renderUpdateStatus = function() {
t += 'refreshing'; t += 'refreshing';
else else
t += 'Up to date'; t += 'Up to date';
t += '</span>';
if(renderLimitReached()) if(renderLimitReached())
t += ' <span style="color:#f66" class="help" title="Can only render so much before it gets unbearably slow. Not all entities are shown. Zoom in or increase the limit (search for MAX_DRAWN_*).">RENDER LIMIT</span> ' t += ' <span style="color:#f66" class="help" title="Can only render so much before it gets unbearably slow. Not all entities are shown. Zoom in or increase the limit (search for MAX_DRAWN_*).">RENDER LIMIT</span>'
if(window.failedRequestCount > 0) if(window.failedRequestCount > 0)
t += ' <span style="color:#f66">' + window.failedRequestCount + ' failed</span>.' t += ' <span style="color:#f66">' + window.failedRequestCount + ' failed</span>'
t += '</div>'; t += '</div>';
var portalSelection = $('.leaflet-control-layers-overlays label'); var portalSelection = $('.leaflet-control-layers-overlays label');
portalSelection.slice(0, minlvl+1).addClass('disabled').attr('title', 'Zoom in to show those.'); portalSelection.slice(0, minlvl+1).addClass('disabled').attr('title', 'Zoom in to show those.');
portalSelection.slice(minlvl, 8).removeClass('disabled').attr('title', ''); portalSelection.slice(minlvl, 8).removeClass('disabled').attr('title', '');

View File

@ -684,6 +684,10 @@ h3 {
box-sizing: border-box; box-sizing: border-box;
} }
#updatestatus .map {
margin-left: 8px;
}
/* Dialogs /* Dialogs
*/ */
.ui-tooltip, .ui-dialog { .ui-tooltip, .ui-dialog {