From 2fbfdc93b11625f7eb8ff983b12a01ad2c4722d8 Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Wed, 16 May 2012 10:27:25 +0100 Subject: [PATCH] moved maintenance message to config file --- WebContent/OSRM.config.js | 9 ++++++--- WebContent/main.html | 15 ++------------- WebContent/main.js | 4 +++- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/WebContent/OSRM.config.js b/WebContent/OSRM.config.js index 22cbeae83..e656e9e21 100644 --- a/WebContent/OSRM.config.js +++ b/WebContent/OSRM.config.js @@ -19,7 +19,6 @@ or see http://www.gnu.org/licenses/agpl.txt. // [has to be loaded directly after OSRM.base] OSRM.DEFAULTS = { - MAINTENANCE: true, HOST_ROUTING_URL: 'http://router.project-osrm.org/viaroute', HOST_SHORTENER_URL: 'http://map.project-osrm.org/shorten/', HOST_TIMESTAMP_URL: 'http://router.project-osrm.org/timestamp', @@ -88,5 +87,9 @@ OSRM.DEFAULTS = { options:{minZoom: 1}, 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.

In the meantime you may want to go out an map a friendly neighborhood near you...


[OSRM]", +}; \ No newline at end of file diff --git a/WebContent/main.html b/WebContent/main.html index ef75ec919..e913562f7 100644 --- a/WebContent/main.html +++ b/WebContent/main.html @@ -92,21 +92,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
-
Scheduled Maintenance
+
Notification
-
- The OSRM Website is down for a scheduled maintenance. Please be patient while required updates are performed. - The site will be back online shortly. -
-
- In the meantime you may want to go out an map a friendly neighborhood near you... -
-
-
-
- [OSRM] -
+
diff --git a/WebContent/main.js b/WebContent/main.js index e2b75e1f8..94f69826d 100644 --- a/WebContent/main.js +++ b/WebContent/main.js @@ -26,10 +26,10 @@ OSRM.init = function() { OSRM.prefetchCSSIcons(); OSRM.GUI.init(); - OSRM.Localization.init(); OSRM.Map.init(); OSRM.Printing.init(); OSRM.Routing.init(); + OSRM.Localization.init(); // stop if in maintenance mode if( OSRM.inMaintenance() == true ) @@ -271,6 +271,8 @@ OSRM.parseParameters = function(){ OSRM.inMaintenance = function(){ if( OSRM.DEFAULTS.MAINTENANCE == true ) { 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"; return true; }