diff --git a/WebContent/printing/OSRM.Printing.js b/WebContent/printing/OSRM.Printing.js
index 9def95301..b63f6638c 100644
--- a/WebContent/printing/OSRM.Printing.js
+++ b/WebContent/printing/OSRM.Printing.js
@@ -42,35 +42,20 @@ init: function() {
show: function(response) {
// create header
var header =
- '
';
for(var i=0; i < response.route_instructions.length; i++){
//odd or even ?
- var rowstyle='results-odd';
- if(i%2==0) { rowstyle='results-even'; }
+ var rowstyle='description-body-odd';
+ if(i%2==0) { rowstyle='description-body-even'; }
- route_desc += '';
+ body += '
';
- route_desc += '';
- route_desc += ' ';
- route_desc += " | ";
+ body += '';
+ body += ' ';
+ body += " | ";
// build route description
- route_desc += '';
+ body += ' | ';
if( response.route_instructions[i][1] != "" )
- route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, response.route_instructions[i][1]).replace(/%d/, OSRM.loc(response.route_instructions[i][6]));
+ body += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, response.route_instructions[i][1]).replace(/%d/, OSRM.loc(response.route_instructions[i][6]));
else
- route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"").replace(/%d/, OSRM.loc(response.route_instructions[i][6]));
- route_desc += " | ";
+ body += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"").replace(/%d/, OSRM.loc(response.route_instructions[i][6]));
+ body += "";
- route_desc += '';
+ body += ' | ';
if( i != response.route_instructions.length-1 )
- route_desc += ''+OSRM.Utils.metersToDistance(response.route_instructions[i][2])+'';
- route_desc += " | ";
+ body += ''+OSRM.Utils.metersToDistance(response.route_instructions[i][2])+'';
+ body += "";
- route_desc += "
";
+ body += "";
}
- route_desc += '';
+ body += '';
// put everything in DOM
- OSRM.G.printwindow.document.getElementById('description').innerHTML = '