aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-15 16:33:29 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-15 16:33:29 +0100
commit9f0d317bd4b1e46e88b3427c1217f914ddddcd3f (patch)
tree37f007ea567d4f0cf613507d5622746c6dbd8b88 /src
parente6f671d6f814fe1bed518ffb2858b72f3b85b71f (diff)
Add in test version warning to initial map page
Warning to say that reports will not be sent to the council to avoid confusion in advance of beta testing Fixes #94
Diffstat (limited to 'src')
-rw-r--r--src/css/fms.css16
-rw-r--r--src/js/app.js5
-rw-r--r--src/templates/en/around.html5
3 files changed, 26 insertions, 0 deletions
diff --git a/src/css/fms.css b/src/css/fms.css
index f1d5179..afc7ba6 100644
--- a/src/css/fms.css
+++ b/src/css/fms.css
@@ -635,6 +635,22 @@
background-image: url(images/icons-36-black.png);
}
}
+
+ div.testing {
+ position: absolute;
+ left: 0px;
+ right: 0px;
+ top: 40px;
+ width: 100%;
+ padding: 3px;
+ text-align: center;
+ font-size: 12px;
+ background-color: red;
+ color: white;
+ font-weight: bold;
+ text-shadow: none;
+ margin-bottom: 5px;
+ }
/* drafts screen */
#drafts {
diff --git a/src/js/app.js b/src/js/app.js
index 660f689..43218c1 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -51,6 +51,7 @@ var tpl = {
isAndroid: false,
iPhoneModel: 0,
uploadTimeout: CONFIG.UPLOAD_TIMEOUT || 120000,
+ testing: 0,
currentDraft: new FMS.Draft(),
allDrafts: new FMS.Drafts(),
@@ -241,6 +242,10 @@ var tpl = {
FMS.usedBefore = 1;
}
+ if ( CONFIG.TESTING ) {
+ FMS.testing = 1;
+ }
+
document.addEventListener('pause', function() { FMS.locator.stopTracking(); FMS.saveCurrentDraft(); }, false);
document.addEventListener('resume', onResume, false);
document.addEventListener('backbutton', function(e) { FMS.router.back(e); }, true);
diff --git a/src/templates/en/around.html b/src/templates/en/around.html
index 39c513d..f172dac 100644
--- a/src/templates/en/around.html
+++ b/src/templates/en/around.html
@@ -27,6 +27,11 @@
<div class="frontpage-menu">
<form class="inputcard" name="postcodeForm" id="postcodeForm">
<input type="search" id="pc" name="pc" placeholder="Search or scroll the map">
+ <% if ( FMS.testing ) { %>
+ <div class="testing">
+ Test version. Reports will not be sent to the council.
+ </div>
+ <% } %>
</form>
<a data-role="none" id="relocate" class="nodisplay"></a>