Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jsn13002 committed Apr 22, 2017
2 parents 6118acc + 5089ce8 commit deff9f0
Show file tree
Hide file tree
Showing 64 changed files with 160 additions and 5,686 deletions.
4 changes: 4 additions & 0 deletions Wello/www/css/desktop.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
align-items: center;
}

main.list h1{
display: block;
}

main.list a{
width: 75%;
max-width: 41rem;
Expand Down
10 changes: 8 additions & 2 deletions Wello/www/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ div.intro{
}
nav h1{
flex-grow: 1;
margin: 0;
margin: 0 0;
font-size: 1.5rem;
}

h1.title{
display: none;
}
nav.top-nav {
position: fixed;
top: 0;
Expand Down Expand Up @@ -435,6 +437,10 @@ main.search{
margin-top: 4.2rem;
}

main.list{
margin-top: 66px;
margin-bottom: 66px;
}

/* ==========================================================================
Helper classes
Expand Down
16 changes: 1 addition & 15 deletions Wello/www/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,7 @@
<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">
<button><a href="map.php">Cancel</a></button>
Expand All @@ -45,7 +31,7 @@
<img src="img/add-img-icon.png"/>
</label>
<input type="file" id="well-picture" accept="image/*">
</div>
</div>
<div class="group">
<ul class="inputs" id="report-metadata">
<li><label for="well-completion-date">Date well completed</label>
Expand Down
17 changes: 17 additions & 0 deletions Wello/www/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,20 @@ $('select').change(function() {
};

});

var x = document.getElementById("demo");

function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}

function showPosition(position) {
$("#gps-coordinates-latitude").val(position.coords.latitude);
$("#gps-coordinates-longitude").val(position.coords.longitude);
//x.innerHTML = "Latitude: " + position.coords.latitude +
//"<br>Longitude: " + position.coords.longitude;
}
4 changes: 0 additions & 4 deletions Wello/www/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
<!-- Add your site or application content here -->






<nav class="top-nav">
<button onclick="document.getElementById('menu').classList.toggle('closed'); document.getElementById('close-menu').classList.toggle('closed')"><img src="img/menu.svg" alt="menu" /></button> <h1>Well Report App</h1>
<button><a href="search.html"><img src="img/search.svg" alt="menu" /></a></button>
Expand Down
59 changes: 21 additions & 38 deletions Wello/www/map.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


<!DOCTYPE html>
<html class="no-js" lang="">

Expand Down Expand Up @@ -58,30 +56,9 @@
</nav>

<main class="map">
<!-- <div style=""> -->
<!--
<div id="map">
<iframe
width="600"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBmQZToyeMOBTd6KlJRFHzv-5sj7u_AidY
&q=41.8077,-72.2540" allowfullscreen>
</iframe>

</div>
-->
<!-- </div>-->

<div class="google-maps">
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d7098.94326104394!2d78.0430654485247!3d27.172909818538997!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2s!4v1385710909804" width="600" height="450" frameborder="0" style="border:0"></iframe>
<div id="map" class="google-maps">
</div>

<!--
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCNSoPsxLd0LbvQaH9R6npO7jj-jKAXyQ4&callback=initMap">
</script>
-->

<div class="well-preview well-card clearfix">
<div class="well-img"></div>
Expand Down Expand Up @@ -122,21 +99,27 @@
</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->


<script>
(function (b, o, i, l, e, r) {
b.GoogleAnalyticsObject = l;
b[l] || (b[l] = function () {
(b[l].q = b[l].q || []).push(arguments)
});
b[l].l = +new Date;
e = o.createElement(i);
r = o.getElementsByTagName(i)[0];
e.src = 'https://www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e, r)
}(window, document, 'script', 'ga'));
ga('create', 'UA-XXXXX-X', 'auto');
ga('send', 'pageview');

function initMap() {
var myLatLng = {lat: -25.363, lng: 131.044};

var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: myLatLng
});

var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCNSoPsxLd0LbvQaH9R6npO7jj-jKAXyQ4&callback=initMap">
</script>
</body>

Expand Down
168 changes: 84 additions & 84 deletions maps.js → Wello/www/maps.js
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
var map;
var infoWindow;

// markersData variable stores the information necessary to each marker
// figure out a way to import mapData


function initialize() {
var mapOptions = {
center: new google.maps.LatLng(40.601203,-8.668173),
zoom: 9,
mapTypeId: 'roadmap',
};

map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

// a new Info Window is created
infoWindow = new google.maps.InfoWindow();

// Event that closes the Info Window with a click on the map
google.maps.event.addListener(map, 'click', function() {
infoWindow.close();
});

// Finally displayMarkers() function is called to begin the markers creation
displayMarkers();
}
google.maps.event.addDomListener(window, 'load', initialize);


// This function will iterate over markersData array
// creating markers with createMarker function
function displayMarkers(){

// this variable sets the map bounds according to markers position
var bounds = new google.maps.LatLngBounds();

// for loop traverses markersData array calling createMarker function for each marker
for (var i = 0; i < markersData.length; i++){

var latlng = new google.maps.LatLng(markersData[i].lat, markersData[i].lng);
var name = markersData[i].name;
var address1 = markersData[i].address1;
var address2 = markersData[i].address2;
var postalCode = markersData[i].postalCode;

createMarker(latlng, name, address1, address2, postalCode);

// marker position is added to bounds variable
bounds.extend(latlng);
}

// Finally the bounds variable is used to set the map bounds
// with fitBounds() function
map.fitBounds(bounds);
}

// This function creates each marker and it sets their Info Window content
function createMarker(latlng, name, address1, address2, postalCode){
var marker = new google.maps.Marker({
map: map,
position: latlng,
title: name
});

// This event expects a click on a marker
// When this event is fired the Info Window content is created
// and the Info Window is opened.
google.maps.event.addListener(marker, 'click', function() {

// Creating the content to be inserted in the infowindow
var iwContent = '<div id="iw_container">' +
'<div class="iw_title">' + name + '</div>' +
'<div class="iw_content">' + address1 + '<br />' +
address2 + '<br />' +
postalCode + '</div></div>';

// including content to the Info Window.
infoWindow.setContent(iwContent);

// opening the Info Window in the current map and at the current marker location.
infoWindow.open(map, marker);
});
}
var map;
var infoWindow;

// markersData variable stores the information necessary to each marker
// figure out a way to import mapData


function initialize() {
var mapOptions = {
center: new google.maps.LatLng(40.601203,-8.668173),
zoom: 9,
mapTypeId: 'roadmap',
};

map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

// a new Info Window is created
infoWindow = new google.maps.InfoWindow();

// Event that closes the Info Window with a click on the map
google.maps.event.addListener(map, 'click', function() {
infoWindow.close();
});

// Finally displayMarkers() function is called to begin the markers creation
displayMarkers();
}
google.maps.event.addDomListener(window, 'load', initialize);


// This function will iterate over markersData array
// creating markers with createMarker function
function displayMarkers(){

// this variable sets the map bounds according to markers position
var bounds = new google.maps.LatLngBounds();

// for loop traverses markersData array calling createMarker function for each marker
for (var i = 0; i < markersData.length; i++){

var latlng = new google.maps.LatLng(markersData[i].lat, markersData[i].lng);
var name = markersData[i].name;
var address1 = markersData[i].address1;
var address2 = markersData[i].address2;
var postalCode = markersData[i].postalCode;

createMarker(latlng, name, address1, address2, postalCode);

// marker position is added to bounds variable
bounds.extend(latlng);
}

// Finally the bounds variable is used to set the map bounds
// with fitBounds() function
map.fitBounds(bounds);
}

// This function creates each marker and it sets their Info Window content
function createMarker(latlng, name, address1, address2, postalCode){
var marker = new google.maps.Marker({
map: map,
position: latlng,
title: name
});

// This event expects a click on a marker
// When this event is fired the Info Window content is created
// and the Info Window is opened.
google.maps.event.addListener(marker, 'click', function() {

// Creating the content to be inserted in the infowindow
var iwContent = '<div id="iw_container">' +
'<div class="iw_title">' + name + '</div>' +
'<div class="iw_content">' + address1 + '<br />' +
address2 + '<br />' +
postalCode + '</div></div>';

// including content to the Info Window.
infoWindow.setContent(iwContent);

// opening the Info Window in the current map and at the current marker location.
infoWindow.open(map, marker);
});
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions html-ONLY-site/.editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion html-ONLY-site/.gitattributes

This file was deleted.

2 changes: 0 additions & 2 deletions html-ONLY-site/.gitignore

This file was deleted.

Loading

0 comments on commit deff9f0

Please sign in to comment.