option to hide menu

This commit is contained in:
bfabiszewski 2013-06-26 19:58:55 +02:00
parent eb96995ac4
commit 07e9dca313
5 changed files with 50 additions and 3 deletions

4
README
View File

@ -2,7 +2,7 @@ This is a simple web viewer for GPS tracks uploaded with mobile client.
It is designed to work with Android version of great app TrackMe (http://www.luisespinosa.com/trackme_eng.html), It is designed to work with Android version of great app TrackMe (http://www.luisespinosa.com/trackme_eng.html),
but it should be easy to adjust it for other clients (other database tables). but it should be easy to adjust it for other clients (other database tables).
Interface "look and feel" is based on TrackMe Display (http://forum.xda-developers.com/showthread.php?t=477394). Interface "look and feel" is based on TrackMe Display (http://forum.xda-developers.com/showthread.php?t=477394).
It is possible to switch between Google Maps API and OpenLayers API with OpenStreetMap (any other base layer should be easy to add). It is possible to switch between Google Maps API and OpenLayers API with OpenStreetMap (any other compatible base layer).
Live demo: Live demo:
- http://flaa.fabiszewski.net/phptrackme/ - http://flaa.fabiszewski.net/phptrackme/
@ -20,7 +20,7 @@ Features:
- multiple users - multiple users
- user authentication - user authentication
- Google Maps API v3 - Google Maps API v3
- OpenLayers 2.13 - OpenLayers v2
- ajax - ajax
- server based configuration - server based configuration
- user preferences stored in cookies - user preferences stored in cookies

View File

@ -184,6 +184,7 @@ print '
<a href="javascript:void(0);" onclick="load(\'gpx\',userid,trackid)">gpx</a><br /> <a href="javascript:void(0);" onclick="load(\'gpx\',userid,trackid)">gpx</a><br />
</div> </div>
</div> </div>
<div id="menu-close" onclick="toggleMenu();">»</div>
<div id="footer"><a target="_blank" href="https://github.com/bfabiszewski/phpTrackme">phpTrackme</a> '.$version.'</div> <div id="footer"><a target="_blank" href="https://github.com/bfabiszewski/phpTrackme">phpTrackme</a> '.$version.'</div>
</div> </div>
<div id="main"> <div id="main">

View File

@ -76,11 +76,29 @@ select {
} }
#footer { #footer {
position: fixed; position: fixed;
width: 165px;
bottom:0; bottom:0;
padding: 10px; padding: 10px;
background-color: #666; background-color:rgba(102, 102, 102, 0.9);
color: lightgray; color: lightgray;
} }
#menu-close {
background-color: #666;
opacity: 0.9;
position: absolute;
top: 55px;
right: 165px;
z-index: 1900;
width: 18px;
height: 20px;
line-height: 18px;
text-align: right;
font-size: 18px;
font-weight: bolder;
border-radius: 11px 0 0 11px;
cursor: pointer;
}
#user, #trip, #summary, #export, #other, #units { #user, #trip, #summary, #export, #other, #units {
padding-bottom: 10px; padding-bottom: 10px;
} }

22
main.js
View File

@ -80,6 +80,28 @@ function toggleChart(i) {
} }
} }
function toggleMenu(i) {
var emenu = document.getElementById('menu');
var emain = document.getElementById('main');
var ebutton = document.getElementById('menu-close');
if (arguments.length < 1) {
if (ebutton.innerHTML == '»') { i = 0 }
else { i = 1; }
}
if (i==0) {
emenu.style.width = '0';
emain.style.marginRight = '0';
ebutton.style.right = '0';
ebutton.innerHTML = '«';
}
else {
emenu.style.width = '165px';
emain.style.marginRight = '165px';
ebutton.style.right = '165px';
ebutton.innerHTML = '»';
}
}
function getXHR() { function getXHR() {
var xmlhttp = null; var xmlhttp = null;
if (window.XMLHttpRequest) { if (window.XMLHttpRequest) {

View File

@ -1,3 +1,9 @@
--
-- Database layout inherited from TrackMe
-- Some tables/columns are not used by the viewer at the moment.
-- Kept for compatibility with old data.
--
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00"; SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `trackme` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; CREATE DATABASE IF NOT EXISTS `trackme` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;