1
restaurant-search/static/index.html

174 lines
9.0 KiB
HTML
Raw Normal View History

2014-09-30 08:40:31 +00:00
<!DOCTYPE html>
<html>
<head>
2015-06-26 01:37:07 +00:00
<title>Restaurant Search with Predictive Multispace Queries</title>
2014-09-30 08:40:31 +00:00
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
2016-02-14 21:20:04 +00:00
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.css">
2015-03-27 03:53:23 +00:00
<style type="text/css">
th {
white-space: nowrap;
}
2015-09-22 11:02:34 +00:00
div#map, svg#svg {
2015-09-22 05:04:17 +00:00
width: 100%;
2015-09-22 11:02:34 +00:00
height: 400px;
2015-09-22 05:04:17 +00:00
}
2015-03-27 03:53:23 +00:00
</style>
2014-09-30 08:40:31 +00:00
</head>
<body>
2015-06-29 10:09:34 +00:00
<div class="container">
2014-09-30 08:40:31 +00:00
<!-- busy spinner -->
<div class="page-header">
2015-06-26 01:37:07 +00:00
<img id="spinner" alt="loading" class="pull-right" src="images/spinner.gif" style="display: none;" width="32" height="32">
2015-09-23 02:11:34 +00:00
<h1>Restaurant Search</h1>
2014-09-30 08:40:31 +00:00
</div>
2015-03-09 11:18:50 +00:00
<!-- profile dialog -->
2015-03-09 13:56:19 +00:00
<div id="profileDlg" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="model-header">
<div class="modal-header">
2015-03-09 14:14:04 +00:00
<button type="button" class="close" data-dismiss="modal">&times;</button>
2015-03-26 09:04:34 +00:00
<h3 class="modal-title">Profile Editor</h3>
2015-03-09 13:56:19 +00:00
</div>
<div class="modal-body">
<iframe src="/profile.html" width="100%" height="250" frameborder="0"></iframe>
</div>
<div class="modal-footer">
2015-03-17 07:54:01 +00:00
<button class="btn btn-warning" id="resetStorage">Reset</button>
2015-03-17 06:23:57 +00:00
<button class="btn btn-default" data-dismiss="modal">Accept</button>
2015-03-09 13:56:19 +00:00
</div>
</div>
</div>
2015-03-09 11:18:50 +00:00
</div>
</div>
2014-11-08 09:54:39 +00:00
<div class="row">
<!-- query -->
2015-03-09 09:49:47 +00:00
<div class="col-md-3">
2014-11-08 09:54:39 +00:00
<div class="panel panel-default">
<div class="panel-heading">
<big>Query</big>
</div>
<div class="panel-body">
2015-01-05 07:26:47 +00:00
<div class="form-group">
<label for="walkingDist">Walking distance (km)</label>
<input class="form-control" type="number" step="0.1" min="0.1" value="1.0" id="walkingDist">
2015-01-05 07:26:47 +00:00
</div>
2014-11-08 09:28:14 +00:00
<div class="form-group">
<label for="minScore">Minimum score</label>
<input class="form-control" type="number" step="0.01" value="0.25" id="minScore">
2014-11-08 09:28:14 +00:00
</div>
<div class="form-group">
2015-04-19 01:30:36 +00:00
<label for="resolution">Resolution</label>
<input class="form-control" type="number" value="20" min="1" id="resolution">
2014-11-08 09:28:14 +00:00
</div>
<div class="form-group">
2015-07-28 06:42:14 +00:00
<label for="maxResults">Maximum results</label>
2014-11-08 09:28:14 +00:00
<input class="form-control" type="number" value="100" id="maxResults">
</div>
2015-03-21 11:46:20 +00:00
<div class="form-group">
<label for="displayType">Display type</label>
<select id="displayType" class="form-control">
<option value="density">Density</option>
<option value="compatibility">Compatibility</option>
</select>
</div>
2014-09-30 08:40:31 +00:00
<div class="checkbox">
<label><input type="checkbox" id="useLocalScale">Use local scale</label>
2014-09-30 08:40:31 +00:00
</div>
2015-03-26 09:04:34 +00:00
<button type="button" data-toggle="modal" data-target="#profileDlg" class="btn btn-default">Launch profile editor</button>
2014-09-30 08:40:31 +00:00
</div>
</div>
</div>
2015-03-09 09:49:47 +00:00
<!-- visualizer -->
<div class="col-md-9">
2015-09-22 05:04:17 +00:00
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#semTab">Semantics</a></li>
<li><a data-toggle="tab" href="#mapTab">Map</a></li>
</ul>
<div class="tab-content">
<div id="semTab" class="tab-pane fade in active">
<h3>Semantic Tweaker</h3>
2015-09-22 11:02:34 +00:00
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>
2015-09-22 05:04:17 +00:00
</div>
<div id="mapTab" class="tab-pane fade">
<h3>Result Map</h3>
<div id="map"></div>
</div>
</div>
2015-03-09 09:49:47 +00:00
</div>
2014-09-30 08:40:31 +00:00
</div>
2014-11-08 09:28:14 +00:00
<!-- result listing -->
2014-11-08 10:16:35 +00:00
<div class="panel panel-default" style="display: none;" id="resultPanel">
2014-11-08 09:28:14 +00:00
<div class="panel-heading">
2014-11-08 10:16:35 +00:00
<big>Results (<span id="resultCount"></span>)</big>
2015-07-31 04:13:31 +00:00
<span class="pull-right text-muted" id="elapsedTime"></span>
2014-11-08 09:28:14 +00:00
</div>
<div class="panel-body">
<script id="template" type="text/x-handlers-template">
2015-03-25 11:25:27 +00:00
{{#if records}}
2014-11-08 09:28:14 +00:00
<table class="table table-striped table-condensed">
<thead>
<tr>
2015-03-27 03:46:59 +00:00
<th>
<a href="javascript:sortReviewsBy('name');">Name</a>
<span class="sort-icon glyphicon text-muted" data-sort="name"></span>
</th>
<th>
<a href="javascript:sortReviewsBy('distanceToUser');">Distance to user</a>
<span class="sort-icon glyphicon text-muted" data-sort="distanceToUser"></span>
</th>
<th>
<a href="javascript:sortReviewsBy('closestStn');">Closest station</a>
<span class="sort-icon glyphicon text-muted" data-sort="closestStn"></span>
</th>
<th>
<a href="javascript:sortReviewsBy('distanceToStn');">Distance to station</a>
<span class="sort-icon glyphicon text-muted" data-sort="distanceToStn"></span>
</th>
<th>
<a href="javascript:sortReviewsBy('compatibility');">Compatibility</a>
<span class="sort-icon glyphicon text-muted" data-sort="compatibility"></span>
</th>
<th>
<a href="javascript:sortReviewsBy('score');">Score</a>
<span class="sort-icon glyphicon text-muted" data-sort="score"></span>
</th>
2014-11-08 09:28:14 +00:00
</tr>
</thead>
2015-03-25 11:25:27 +00:00
{{#each records}}
2014-11-08 09:28:14 +00:00
<tr>
<td><a href="#" onclick="javascript:accessReview({{id}}, {{geo.latitude}}, {{geo.longitude}});">{{name}}</a></td>
2015-03-26 03:18:43 +00:00
<td>{{#prettyFloat 2}}{{distanceToUser}}{{/prettyFloat}} km</td>
2015-03-25 10:27:25 +00:00
<td>{{closestStn}}</td>
2015-08-24 08:24:57 +00:00
<td>{{#prettyFloat 2}}{{distanceToStn}}{{/prettyFloat}} km</td>
<td>{{#prettyFloat 4}}{{compatibility}}{{/prettyFloat}}</td>
2015-03-26 03:18:43 +00:00
<td>{{#prettyFloat 4}}{{score}}{{/prettyFloat}}</td>
2014-11-08 09:28:14 +00:00
</tr>
{{/each}}
</table>
{{/if}}
</script>
2015-03-25 11:25:27 +00:00
<div id="records"></div>
2014-11-08 09:28:14 +00:00
</div>
</div>
2014-11-08 09:54:39 +00:00
2014-09-30 08:40:31 +00:00
</div>
2015-03-09 09:50:24 +00:00
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/handlebars/handlebars.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/tinycolor/tinycolor.js"></script>
<script src="bower_components/snap.svg/dist/snap.svg-min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
2015-02-27 08:32:15 +00:00
<script src="scripts/search.js"></script>
<script src="scripts/grapher.js"></script>
2015-09-22 11:02:34 +00:00
<script src="https://maps.googleapis.com/maps/api/js"></script>
2015-03-09 09:50:24 +00:00
2014-09-30 08:40:31 +00:00
</body>
</html>