Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
changed "here" button to icon and added location help text
Browse files Browse the repository at this point in the history
  • Loading branch information
jessica-azgs committed Oct 1, 2015
1 parent ffef57a commit 019105c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 8 deletions.
Binary file added images/geolocate-center.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/help.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 40 additions & 7 deletions index.html
Expand Up @@ -24,7 +24,7 @@
<script src="vendor/html5shiv.js"></script>
<script src="vendor/respond.min.js"></script>
<![endif]-->

</head>
<body>
<div id="map"></div>
Expand Down Expand Up @@ -138,7 +138,7 @@ <h4><%= data.properties.source %></h4>
<% } %>
<table class="table">
<tbody
<tbody>
<tr>
<td class="contact-info">
<%= data.properties.street %><br>
Expand Down Expand Up @@ -190,18 +190,42 @@ <h5><strong>Owner: </strong><%= data.properties.owner %></h5>
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" id="geo-start" placeholder="Enter starting location ... ">
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="setMyLocation('from');">Here</button>
<span class="input-group-btn directions-btn">
<button class="btn btn-default" type="button" onclick="setMyLocation('from');">
<img src='images/geolocate-center.png' width='18' height='18'>
</button>
<button class="btn btn-default" type="button" onclick="toggleHints();">
<img src='images/help.png' width='18' height='18'>
</button>
</span>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" id="geo-destination" placeholder="Enter destination ...">
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="setMyLocation('to');">Here</button>
<span class="input-group-btn directions-btn">
<button class="btn btn-default" type="button" onclick="setMyLocation('to');">
<img src='images/geolocate-center.png' width='18' height='18'>
</button>
<button class="btn btn-default" type="button" onclick="toggleHints();">
<img src='images/help.png' width='18' height='18'>
</button>
</span>
</div>
<div id="location-hints" class="location-hints">
Use the following formats to input a location:<br>
<ul>
<li>
city, state OR zip code OR street, city, state OR lat, long
</li>
<li>
farm name, eg. Windy Hills Lavender
</li>
<li>
Use <img src='images/geolocate-center.png' width='14' height='14'> for your current location
</li>
</ul>
</div>
</div>
<div class="btn-group btn-group-justified">
<div class="btn-group">
Expand All @@ -213,7 +237,7 @@ <h5><strong>Owner: </strong><%= data.properties.owner %></h5>
</div>
</form>
</div>
<div class="tab-pane" id="show-directions">
<div class="tab-pane" id="show-directions"></div>
</div>
</script>

Expand Down Expand Up @@ -253,6 +277,15 @@ <h5><strong>Owner: </strong><%= data.properties.owner %></h5>
if (dir == 'to')
$('#geo-destination').val('My location');
}

function toggleHints() {
var d = document.getElementById('location-hints');
var displaySetting = d.style.display;
if (displaySetting == 'block')
d.style.display = 'none';
else
d.style.display = 'block';
}
</script>

<script src="vendor/leaflet-0.7.2.js"></script>
Expand Down
12 changes: 11 additions & 1 deletion style/base.css
Expand Up @@ -69,9 +69,19 @@ h5.subtitle {
font-style: italic;
}

.directions-btn {
vertical-align: top;
}

.location-hints {
display: none;
font-size: smaller;
font-style: italic;
}

/* Typeahead */
.twitter-typeahead {
width: 100%;
width: 100%;
}
.typeahead {
background-color: #FFFFFF;
Expand Down

0 comments on commit 019105c

Please sign in to comment.