hide Dump again, hide Save on Firefox OS
authorRobert Kaiser <robert@widebook.box.kairo.at>
Mon, 22 Oct 2012 18:21:24 +0000 (20:21 +0200)
committerRobert Kaiser <robert@widebook.box.kairo.at>
Mon, 22 Oct 2012 18:21:24 +0000 (20:21 +0200)
index.html
js/ui.js

index d4b17c9820800709480bd79ba4a2f10fadb11e55..4cb6e4426f9405b4f8b58f99c539c156ce9f02eb 100644 (file)
@@ -25,7 +25,7 @@
 <input type="button" id="saveTrackButton" value="Save"
        onclick="saveTrack();">
 <input type="button" id="dumpTrackButton" value="Dump"
-       onclick="saveTrackDump();" class="debugHideX">
+       onclick="saveTrackDump();" class="debugHide">
 <input type="button" id="clearTrackButton" value="Clear"
        onclick="clearTrack();"><br/>
 <input type="checkbox" id="trackCheckbox"
index 6566a86254e010bdd15ba67fab587d8c7dab346e..7fb08b15f66ccdb0fed2fd1fc7836bb4a994b36b 100644 (file)
--- a/js/ui.js
+++ b/js/ui.js
@@ -31,6 +31,11 @@ window.onload = function() {
     areas[i].addEventListener("touchleave", uiEvHandler, false);
   }
 
+  if (/Mozilla\/5.0 \(Mobile;/.test(navigator.useragent)) {
+    // For Firefox OS, don't display the "save" button.
+    // Do this by setting the debugHide class for testing in debug mode.
+    document.getElementById("saveTrackButton").classList.add("debugHide");
+  }
 
   initDB();
   initMap();