X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/42c1dec8f0f53b457e9512bcc24f26cad9df9916..873c1cb84e2fe475bc4ff566d71929fdcc35787d:/app/assets/javascripts/routing.js.erb diff --git a/app/assets/javascripts/routing.js.erb b/app/assets/javascripts/routing.js.erb index 42e4ba2bc..5ff0656c8 100644 --- a/app/assets/javascripts/routing.js.erb +++ b/app/assets/javascripts/routing.js.erb @@ -18,7 +18,10 @@ var ROUTING_POLYLINE_HIGHLIGHT={ OSM.RoutingEngines={ - list: [] + list: [], + add: function(supportsHTTPS,engine) { + if (document.location.protocol=="http:" || supportsHTTPS) this.list.push(engine); + } }; OSM.Routing=function(map,name,jqSearch) { @@ -213,7 +216,7 @@ OSM.Routing=function(map,name,jqSearch) { $('#turnbyturn').append(row); cumulative+=step[3]; } - $('#sidebar_content').append('
' + r.chosenEngine.creditline + '
'); + $('#sidebar_content').append('' + I18n.t('javascripts.directions.instructions.courtesy',{link: r.chosenEngine.creditline}) + '
'); }; r.clickTurn=function(instruction,latlng) { @@ -232,7 +235,9 @@ OSM.Routing=function(map,name,jqSearch) { else { return Math.round(m / 1000) + "km"; } }; r.formatTime=function(s) { - var d=new Date(s*1000); var h=d.getHours(); var m=d.getMinutes(); + var m=Math.round(s/60); + var h=Math.floor(m/60); + m -= h*60; return h+":"+(m<10 ? '0' : '')+m; };