switch main header when navigating through modules
authorRobert Kaiser <robert@widebook.box.kairo.at>
Sun, 30 Dec 2012 21:01:27 +0000 (22:01 +0100)
committerRobert Kaiser <robert@widebook.box.kairo.at>
Sun, 30 Dec 2012 21:01:27 +0000 (22:01 +0100)
TODO
js/tricorder.js

diff --git a/TODO b/TODO
index 79fe413c4ef20604f71070949964dcdb8de86f56..6da439adb6ed3afaeee66ab968222475434a6054 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,7 @@
 Tasks to complete for Web Tricorder:
 
 * Make more sensors work - see https://wiki.mozilla.org/WebAPI
-** Networks (probably need ceritified app!)
+** Networks (probably need certified app!)
 *** Current connection: http://dvcs.w3.org/hg/dap/raw-file/tip/network-api/Overview.html
 *** Mobile Networks: https://wiki.mozilla.org/WebAPI/WebMobileConnection
 *** WiFi Networks: http://groups.google.com/group/mozilla.dev.webapi/browse_thread/thread/ed980c42261c5f4a
index 2debeec9964f1d1d2c0acd9cab1a0f9895f8b33b..093f5171a79851e73569993fd587ad7b85ff8d81 100644 (file)
@@ -74,8 +74,11 @@ function switchModule(modname) {
     navs[i].classList.remove("active");
   }
 
-  document.getElementById("nav" + modname).classList.add("active");
+  var navItem = document.getElementById("nav" + modname);
+  navItem.classList.add("active");
   document.getElementById("sect" + modname).classList.add("active");
+  document.getElementById("mainHeader").textContent =
+      (modname == "Other") ? "Web Tricorder" : navItem.textContent;
 
   window["gMod" + modname].activate();
 }