fixed printing bug in IE8
This commit is contained in:
parent
2d956983a5
commit
c8912ad6ee
@ -61,8 +61,10 @@ deactivate: function() { // use hide route as trigger
|
|||||||
|
|
||||||
// create UI in printwindow
|
// create UI in printwindow
|
||||||
show: function(response) {
|
show: function(response) {
|
||||||
// create header (using tables for compatibility with IE quirks mode)
|
// create header
|
||||||
var header =
|
var header;
|
||||||
|
if( OSRM.Browser.IE6_8 ) { // tables used for compatibility with legacy IE (quirks mode)
|
||||||
|
header =
|
||||||
'<thead class="description-header"><tr><td colspan="3">' +
|
'<thead class="description-header"><tr><td colspan="3">' +
|
||||||
|
|
||||||
'<table class="full">' +
|
'<table class="full">' +
|
||||||
@ -99,43 +101,45 @@ show: function(response) {
|
|||||||
|
|
||||||
'<div class="quad"></div>' +
|
'<div class="quad"></div>' +
|
||||||
'</td></tr></thead>';
|
'</td></tr></thead>';
|
||||||
// var header =
|
} else {
|
||||||
// '<thead class="description-header"><tr><td colspan="3">' +
|
header =
|
||||||
//
|
'<thead class="description-header"><tr><td colspan="3">' +
|
||||||
// '<div class="full">' +
|
|
||||||
// '<div class="row">' +
|
'<div class="full">' +
|
||||||
//
|
'<div class="row">' +
|
||||||
// '<div class="left stretch">' +
|
|
||||||
// '<div class="full">' +
|
'<div class="left stretch">' +
|
||||||
// '<div class="row">' +
|
'<div class="full">' +
|
||||||
// '<div class="left description-header-label">' + OSRM.loc("GUI_START")+ ': </div>' +
|
'<div class="row">' +
|
||||||
// '<div class="left description-header-content stretch">' + document.getElementById("gui-input-source").value + '</div>' +
|
'<div class="left description-header-label">' + OSRM.loc("GUI_START")+ ': </div>' +
|
||||||
// '</div>' +
|
'<div class="left description-header-content stretch">' + document.getElementById("gui-input-source").value + '</div>' +
|
||||||
// '<div class="row">' +
|
'</div>' +
|
||||||
// '<div class="left description-header-label">' + OSRM.loc("GUI_END")+ ': </div>' +
|
'<div class="row">' +
|
||||||
// '<div class="left description-header-content stretch">' + document.getElementById("gui-input-target").value + '</div>' +
|
'<div class="left description-header-label">' + OSRM.loc("GUI_END")+ ': </div>' +
|
||||||
// '</div>' +
|
'<div class="left description-header-content stretch">' + document.getElementById("gui-input-target").value + '</div>' +
|
||||||
// '</div>' +
|
'</div>' +
|
||||||
// '</div>' +
|
'</div>' +
|
||||||
//
|
'</div>' +
|
||||||
// '<div class="left">' +
|
|
||||||
// '<div class="full">' +
|
'<div class="left">' +
|
||||||
// '<div class="row">' +
|
'<div class="full">' +
|
||||||
// '<div class="left description-header-label">' + OSRM.loc("DISTANCE")+': </div>' +
|
'<div class="row">' +
|
||||||
// '<div class="left description-header-content">' + OSRM.Utils.toHumanDistance(response.route_summary.total_distance) + '</div>' +
|
'<div class="left description-header-label">' + OSRM.loc("DISTANCE")+': </div>' +
|
||||||
// '</div>' +
|
'<div class="left description-header-content">' + OSRM.Utils.toHumanDistance(response.route_summary.total_distance) + '</div>' +
|
||||||
// '<div class="row">' +
|
'</div>' +
|
||||||
// '<div class="left description-header-label">' + OSRM.loc("DURATION")+': </div>' +
|
'<div class="row">' +
|
||||||
// '<div class="left description-header-content">' + OSRM.Utils.toHumanTime(response.route_summary.total_time) + '</div>' +
|
'<div class="left description-header-label">' + OSRM.loc("DURATION")+': </div>' +
|
||||||
// '</div>' +
|
'<div class="left description-header-content">' + OSRM.Utils.toHumanTime(response.route_summary.total_time) + '</div>' +
|
||||||
// '</div>' +
|
'</div>' +
|
||||||
// '</div>' +
|
'</div>' +
|
||||||
//
|
'</div>' +
|
||||||
// '</div>' +
|
|
||||||
// '</div>' +
|
'</div>' +
|
||||||
//
|
'</div>' +
|
||||||
// '<div class="quad"></div>' +
|
|
||||||
// '</td></tr></thead>';
|
'<div class="quad"></div>' +
|
||||||
|
'</td></tr></thead>';
|
||||||
|
}
|
||||||
|
|
||||||
// create route description
|
// create route description
|
||||||
var body = '<tbody class="description-body">';
|
var body = '<tbody class="description-body">';
|
||||||
|
@ -182,17 +182,17 @@ div.label
|
|||||||
@media screen {
|
@media screen {
|
||||||
.base-font {
|
.base-font {
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.big-font {
|
.big-font {
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||||
font-size: 14px;
|
font-size: 15px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.medium-font {
|
.medium-font {
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||||
font-size: 10.5px; /* will be 10px in IE quirks mode */
|
font-size: 11px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.small-font {
|
.small-font {
|
||||||
|
@ -28,7 +28,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
<title>OSRM Website</title>
|
<title>OSRM Website</title>
|
||||||
<meta name="description" content="OSRM Website"/>
|
<meta name="description" content="OSRM Website"/>
|
||||||
<meta name="author" content="Dennis Schieferdecker" />
|
<meta name="author" content="Dennis Schieferdecker" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=7,9" />
|
<meta http-equiv="X-UA-Compatible" content="IE=7,9" /> <!-- use quirks mode to correctly print the map in IE8 -->
|
||||||
|
|
||||||
<!-- stylesheets -->
|
<!-- stylesheets -->
|
||||||
<link rel="stylesheet" href="../leaflet/leaflet.css" type="text/css"/>
|
<link rel="stylesheet" href="../leaflet/leaflet.css" type="text/css"/>
|
||||||
|
@ -19,8 +19,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
// [for printing window]
|
// [for printing window]
|
||||||
|
|
||||||
OSRM = {};
|
OSRM = {};
|
||||||
OSRM.GLOBALS = {};
|
OSRM.GLOBALS = { main_handle:{boxVisible:function(){return false;}} }; // needed for fitBoundsUI to work
|
||||||
OSRM.GUI = { visible:false };
|
|
||||||
OSRM.G = OSRM.GLOBALS;
|
OSRM.G = OSRM.GLOBALS;
|
||||||
|
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ OSRM.prefetchIcons = function(images_list) {
|
|||||||
|
|
||||||
for(var i=0; i<icon_list.length; i++) {
|
for(var i=0; i<icon_list.length; i++) {
|
||||||
var icon = {
|
var icon = {
|
||||||
// using absolute src directory for compatibility reasons with IE quirks mode
|
// absolute directories used for compatibility with legacy IE (quirks mode)
|
||||||
iconUrl: images_list[icon_list[i].image_id].src, iconSize: new L.Point(25, 41), iconAnchor: new L.Point(13, 41),
|
iconUrl: images_list[icon_list[i].image_id].src, iconSize: new L.Point(25, 41), iconAnchor: new L.Point(13, 41),
|
||||||
shadowUrl: images_list["marker-shadow"].src, shadowSize: new L.Point(41, 41),
|
shadowUrl: images_list["marker-shadow"].src, shadowSize: new L.Point(41, 41),
|
||||||
popupAnchor: new L.Point(0, -33)
|
popupAnchor: new L.Point(0, -33)
|
||||||
|
@ -25,6 +25,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
|
|
||||||
OSRM.Browser = {
|
OSRM.Browser = {
|
||||||
FF3: useragent.search(/Firefox\/3/),
|
FF3: useragent.search(/Firefox\/3/),
|
||||||
|
IE6_8: useragent.search(/MSIE (6|7|8)/),
|
||||||
IE6_9: useragent.search(/MSIE (6|7|8|9)/)
|
IE6_9: useragent.search(/MSIE (6|7|8|9)/)
|
||||||
};
|
};
|
||||||
}());
|
}());
|
||||||
|
Loading…
Reference in New Issue
Block a user