Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
idk
  • Loading branch information
etl12003 committed Apr 25, 2017
1 parent 6171aa2 commit d93106c
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 5 deletions.
66 changes: 61 additions & 5 deletions Wello/www/css/main.css
Expand Up @@ -598,15 +598,71 @@ input[type=file]{
img {
page-break-inside: avoid; }

img {
max-width: 100% !important; }
main img {
max-width: 100% !important;
width: 200px;
}

p,
h2,
h3 {
orphans: 3;
widows: 3; }
widows: 3;
}

h1,
h2,
h3 {
page-break-after: avoid; } }
h3,
p{
page-break-after: avoid;
margin: .1rem;
font-size: 1rem;
}

ul.inputs li {
padding: 0.1rem 0;
}
nav{
display: none;

}

main.details{
max-width: none;
flex-direction: row;
flex-wrap: wrap;
}
main.details div {
max-width: 15rem;

page-break-inside: avoid;
}

main.details div:nth-child(1){
order: 1;
}
main.details div:nth-child(2){
order: 4;
}
main.details div:nth-child(3){
order: 1;
}
main.details div:nth-child(4){
order: 2;
}
main.details div:nth-child(5){
order: 5;
}
main.details div:nth-child(6){
order: 6;
}
main.details div:nth-child(7){
order: 7;
margin-top: 10rem;
}
main.details div:nth-child(8){
order: 8;
margin-top: 10rem;
}

}
2 changes: 2 additions & 0 deletions Wello/www/details.php
Expand Up @@ -97,6 +97,8 @@ foreach ($row as $key => $value) {

<nav class="top-nav">
<a href="map.php"><img alt="back" src="img/back.svg" ></a> <h1>Details</h1>
<a href="javascript:window.print()"><img src="img/print.svg" alt="print this page" id="print-button" /></a>

<?php
echo'<a href="form.php?Well_ID='.$Well_ID.'"><img alt="edit" src="img/edit.svg" ></a>';
?>
Expand Down
12 changes: 12 additions & 0 deletions Wello/www/img/print.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
178 changes: 178 additions & 0 deletions Wello/www/test.html
@@ -0,0 +1,178 @@
<!DOCTYPE html>
<html class="no-js" lang="">

<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>WRA | Map</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/well-card.css">
<link rel="stylesheet" href="css/map-desktop.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>






<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->






<nav class="top-nav">
<div class="main-bttns">

<h1>Well Report App</h1>
<a href="search.php"><img src="img/search.svg" alt="menu" /></a>
</div>

</nav>

<main class="map">

<div id="map" class="google-maps">
</div>



</main>

<nav class="bottom-nav">
<a href="map.php"><img src="img/map.svg" alt="menu" /></a>
<a href="wells-list.php"><img src="img/well.png" alt="menu" /></a>
</nav>

<nav class="fabs">
<button class="gps" onclick ="getLocation()"><img src="img/gps.svg" alt="get location" /></button>
<script>


function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
map.setCenter(initialLocation);
});
}
}
</script>
<a class="add-well" href="form.php"> <img src="img/add.svg" alt="add well" /></a>
</nav>




<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')
</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>

<script>

function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: new google.maps.LatLng(41.31412, -72.23311),
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
position: google.maps.ControlPosition.RIGHT_CENTER
},
zoom: 16
});
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
map.setCenter(initialLocation);
});
}
var infoWindow = new google.maps.InfoWindow;


// Change this depending on the name of your PHP or XML file
downloadUrl('http://wellreportapp.uconn.edu/xmlGenerate.php', function(data) {
var xml = data.responseXML;
var markers = xml.documentElement.getElementsByTagName('marker');
Array.prototype.forEach.call(markers, function(markerElem) {
var id = markerElem.getAttribute('id');
var name = markerElem.getAttribute('id');
var address = markerElem.getAttribute('address');
var point = new google.maps.LatLng(
parseFloat(markerElem.getAttribute('lat')),
parseFloat(markerElem.getAttribute('lng')));

var infowincontent = document.createElement('div');
var strong = document.createElement('strong');
strong.textContent = address
infowincontent.appendChild(strong);
infowincontent.appendChild(document.createElement('br'));


var text = document.createElement('text');
text.textContent = name
infowincontent.appendChild(text);
infowincontent.appendChild(document.createElement('br'));

var clicker = document.createElement('a');
var clickerText = document.createTextNode("go to details...");
clicker.setAttribute('href',"http://wellreportapp.uconn.edu/details.php?Well_ID="+id);
clicker.appendChild(clickerText);
infowincontent.appendChild(clicker);
var marker = new google.maps.Marker({
map: map,
position: point
});
marker.addListener('click', function() {

infoWindow.setContent(infowincontent);
infoWindow.open(map, marker);
});
});
});
}


function downloadUrl(url, callback) {
var request = window.ActiveXObject ?
new ActiveXObject('Microsoft.XMLHTTP') :
new XMLHttpRequest;

request.onreadystatechange = function() {
if (request.readyState == 4) {
request.onreadystatechange = doNothing;
callback(request, request.status);
}
};

request.open('GET', url, true);
request.send(null);
}

function doNothing() {}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCNSoPsxLd0LbvQaH9R6npO7jj-jKAXyQ4&callback=initMap">
</script>
</body>


</html>
<!--
notes :
we will need a file where we import the well name, address, longiture and latitude within the range we chose
we need a food loop for it
-->

0 comments on commit d93106c

Please sign in to comment.