moved maintenance message to config file
This commit is contained in:
parent
8677218404
commit
2fbfdc93b1
@ -19,7 +19,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
// [has to be loaded directly after OSRM.base]
|
// [has to be loaded directly after OSRM.base]
|
||||||
|
|
||||||
OSRM.DEFAULTS = {
|
OSRM.DEFAULTS = {
|
||||||
MAINTENANCE: true,
|
|
||||||
HOST_ROUTING_URL: 'http://router.project-osrm.org/viaroute',
|
HOST_ROUTING_URL: 'http://router.project-osrm.org/viaroute',
|
||||||
HOST_SHORTENER_URL: 'http://map.project-osrm.org/shorten/',
|
HOST_SHORTENER_URL: 'http://map.project-osrm.org/shorten/',
|
||||||
HOST_TIMESTAMP_URL: 'http://router.project-osrm.org/timestamp',
|
HOST_TIMESTAMP_URL: 'http://router.project-osrm.org/timestamp',
|
||||||
@ -88,5 +87,9 @@ OSRM.DEFAULTS = {
|
|||||||
options:{minZoom: 1},
|
options:{minZoom: 1},
|
||||||
bing:true,
|
bing:true,
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
|
||||||
|
MAINTENANCE: false,
|
||||||
|
MAINTENANCE_HEADER: "Scheduled Maintenance",
|
||||||
|
MAINTENANCE_TEXT: "The OSRM Website is down for a scheduled maintenance. Please be patient while required updates are performed. The site will be back online shortly.<br/><br/>In the meantime you may want to go out an map a friendly neighborhood near you...<br/><br/><br/>[OSRM]",
|
||||||
};
|
};
|
@ -92,21 +92,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
<div id="notification-content" class="box-content">
|
<div id="notification-content" class="box-content">
|
||||||
<!-- header -->
|
<!-- header -->
|
||||||
<div id="notification-toggle" class="iconic-button cancel-marker top-right-button"></div>
|
<div id="notification-toggle" class="iconic-button cancel-marker top-right-button"></div>
|
||||||
<div id="gui-notification-label" class="box-label">Scheduled Maintenance</div>
|
<div id="notification-label" class="box-label">Notification</div>
|
||||||
|
|
||||||
<!-- notification text -->
|
<!-- notification text -->
|
||||||
<div id="notification-box">
|
<div id="notification-box"></div>
|
||||||
The OSRM Website is down for a scheduled maintenance. Please be patient while required updates are performed.
|
|
||||||
The site will be back online shortly.
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
In the meantime you may want to go out an map a friendly neighborhood near you...
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
[OSRM]
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,10 +26,10 @@ OSRM.init = function() {
|
|||||||
OSRM.prefetchCSSIcons();
|
OSRM.prefetchCSSIcons();
|
||||||
|
|
||||||
OSRM.GUI.init();
|
OSRM.GUI.init();
|
||||||
OSRM.Localization.init();
|
|
||||||
OSRM.Map.init();
|
OSRM.Map.init();
|
||||||
OSRM.Printing.init();
|
OSRM.Printing.init();
|
||||||
OSRM.Routing.init();
|
OSRM.Routing.init();
|
||||||
|
OSRM.Localization.init();
|
||||||
|
|
||||||
// stop if in maintenance mode
|
// stop if in maintenance mode
|
||||||
if( OSRM.inMaintenance() == true )
|
if( OSRM.inMaintenance() == true )
|
||||||
@ -271,6 +271,8 @@ OSRM.parseParameters = function(){
|
|||||||
OSRM.inMaintenance = function(){
|
OSRM.inMaintenance = function(){
|
||||||
if( OSRM.DEFAULTS.MAINTENANCE == true ) {
|
if( OSRM.DEFAULTS.MAINTENANCE == true ) {
|
||||||
document.getElementById('notification-blanket').style.display = "block";
|
document.getElementById('notification-blanket').style.display = "block";
|
||||||
|
document.getElementById('notification-label').innerHTML = OSRM.DEFAULTS.MAINTENANCE_HEADER;
|
||||||
|
document.getElementById('notification-box').innerHTML = OSRM.DEFAULTS.MAINTENANCE_TEXT;
|
||||||
document.getElementById('notification-toggle').style.display = "none";
|
document.getElementById('notification-toggle').style.display = "none";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user