From 0bbcf6510e180d16b23e5859fe3714535c6111ed Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Mon, 1 Aug 2011 23:21:36 -0500 Subject: [PATCH] Make IE sane --- web/css/dynmap_style.css | 42 +++++++++++++------------ web/{ => css}/images/layers.png | Bin web/{ => css}/images/marker-shadow.png | Bin web/{ => css}/images/marker.png | Bin web/{ => css}/images/popup-close.png | Bin web/{ => css}/images/zoom-in.png | Bin web/{ => css}/images/zoom-out.png | Bin web/js/dynmaputils.js | 3 +- 8 files changed, 24 insertions(+), 21 deletions(-) rename web/{ => css}/images/layers.png (100%) rename web/{ => css}/images/marker-shadow.png (100%) rename web/{ => css}/images/marker.png (100%) rename web/{ => css}/images/popup-close.png (100%) rename web/{ => css}/images/zoom-in.png (100%) rename web/{ => css}/images/zoom-out.png (100%) diff --git a/web/css/dynmap_style.css b/web/css/dynmap_style.css index 2ffdde72..c702a54a 100644 --- a/web/css/dynmap_style.css +++ b/web/css/dynmap_style.css @@ -11,25 +11,6 @@ margin-right: 20px !important; } -/******************* - * Leaflet overrides - */ -.leaflet-control-zoom-in { - background-image: url(../images/zoom-in.png); -} - -.leaflet-control-zoom-out { - background-image: url(../images/zoom-out.png); -} - -.leaflet-control-layers a { - background-image: url(../images/layers.png); -} - -.leaflet-popup-close-button { - background: white url(../images/popup-close.png); -} - /******************* * Page setup */ @@ -54,6 +35,22 @@ font-weight: bold; } +.leaflet-control-zoom-in { + background-color: #eee; + } + +.leaflet-control-zoom-out { + background-color: #eee; + } + +.leaflet-control-zoom-in:hover { + background-color: #fff; + } + +.leaflet-control-zoom-out:hover { + background-color: #fff; + } + /******************* * Map Setup @@ -239,6 +236,7 @@ .dynmap .panel .clock { display: inline-block; height: 16px; + z-index:50; font-weight: bold; background-repeat: no-repeat; @@ -287,6 +285,7 @@ width: 150px; height: 60px; background: rgba(0,0,0,0.6); + z-index:50; margin: auto; } @@ -534,6 +533,7 @@ position: absolute; top: 0px; left: 34px; + z-index:20; white-space: nowrap; @@ -665,6 +665,7 @@ position: absolute; bottom: 0px; left: 14px; + z-index:50; border-color: rgba(0,0,0,0.5); background: rgba(0,0,0,0.6); @@ -685,10 +686,11 @@ outline: none; color: #fff; + background-color: #000000; border: 0px; background: rgba(0, 0, 0, 0.6); - background: url(../images/chat_cursor.png) rgba(0,0,0,0.6); + background-image: url(../images/chat_cursor.png); background-repeat: no-repeat; background-position: 1px center; diff --git a/web/images/layers.png b/web/css/images/layers.png similarity index 100% rename from web/images/layers.png rename to web/css/images/layers.png diff --git a/web/images/marker-shadow.png b/web/css/images/marker-shadow.png similarity index 100% rename from web/images/marker-shadow.png rename to web/css/images/marker-shadow.png diff --git a/web/images/marker.png b/web/css/images/marker.png similarity index 100% rename from web/images/marker.png rename to web/css/images/marker.png diff --git a/web/images/popup-close.png b/web/css/images/popup-close.png similarity index 100% rename from web/images/popup-close.png rename to web/css/images/popup-close.png diff --git a/web/images/zoom-in.png b/web/css/images/zoom-in.png similarity index 100% rename from web/images/zoom-in.png rename to web/css/images/zoom-in.png diff --git a/web/images/zoom-out.png b/web/css/images/zoom-out.png similarity index 100% rename from web/images/zoom-out.png rename to web/css/images/zoom-out.png diff --git a/web/js/dynmaputils.js b/web/js/dynmaputils.js index 3e625e38..9b19033e 100644 --- a/web/js/dynmaputils.js +++ b/web/js/dynmaputils.js @@ -179,7 +179,8 @@ function loadjs(url, completed) { // Hack for IE, don't know whether this still applies to IE9. script.onreadystatechange = function() { - script.onload(); + if (script.readyState == 'loaded' || script.readyState == 'complete') + script.onload(); }; (document.head || document.getElementsByTagName('head')[0]).appendChild(script); }