1
restaurant-search/client/index.html

178 lines
9.2 KiB
HTML
Raw Normal View History

2014-07-08 04:35:52 +00:00
<!DOCTYPE html>
<html>
<head>
2014-07-14 23:23:49 +00:00
<title>Reactive Search</title>
2014-07-08 04:35:52 +00:00
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="bower_components/bootstrap-select/dist/css/bootstrap-select.min.css">
2014-09-04 02:47:15 +00:00
<link rel="stylesheet" href="style.css">
2014-07-08 04:35:52 +00:00
</head>
<body>
<div class="container">
2014-09-20 09:11:13 +00:00
<!-- busy spinner -->
2014-07-08 04:35:52 +00:00
<div class="page-header">
<h1><img id="spinner" class="pull-right" src="images/spinner.gif" style="display: none;" width="32" height="32">Reactive Search</h1>
2014-07-08 04:35:52 +00:00
</div>
2014-09-20 09:11:13 +00:00
<!-- query input -->
<div id="input" class="form-horizontal">
<div class="form-group">
2014-09-19 11:26:46 +00:00
<label for="keywordsToSearch" class="col-md-2 control-label">Keywords</label>
<div class="col-md-10">
2014-09-20 09:11:13 +00:00
<select id="keywordsToSearch" class="form-control" multiple="multiple" data-max-options="4" data-live-search="data-live-search"></select>
2014-07-08 04:35:52 +00:00
</div>
</div>
<div class="form-group">
<label for="minScore" class="col-md-2 control-label">Minimum score</label>
<div class="col-md-10">
2014-09-20 09:11:13 +00:00
<input class="form-control" type="number" step="any" value="0.25" id="minScore">
2014-07-08 04:35:52 +00:00
</div>
</div>
<div class="form-group">
<label for="hintSteps" class="col-md-2 control-label">Hint steps</label>
<div class="col-md-10">
2014-09-20 09:11:13 +00:00
<input class="form-control" type="number" value="20" id="hintSteps">
2014-07-08 04:35:52 +00:00
</div>
</div>
<div class="form-group">
<label for="maxResults" class="col-md-2 control-label">Max results</label>
<div class="col-md-10">
2014-09-20 09:11:13 +00:00
<input class="form-control" type="number" value="100" id="maxResults">
2014-07-08 04:35:52 +00:00
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
2014-09-19 11:26:46 +00:00
<button class="btn btn-primary" id="searchKeywords" type="button" disabled="disabled">
<span class="glyphicon glyphicon-search"></span> Search
</button>
2014-07-08 04:35:52 +00:00
</div>
</div>
2014-07-08 04:35:52 +00:00
</div>
2014-09-20 09:11:13 +00:00
<!-- options dialog -->
2014-09-19 11:15:34 +00:00
<div class="modal fade" id="optionsDialog" tabindex="-1">
2014-09-18 06:01:56 +00:00
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header"><big>Visualization Options</big></div>
2014-09-18 06:01:56 +00:00
<div class="modal-body">
2014-09-19 08:34:04 +00:00
<div class="checkbox">
2014-09-20 09:11:13 +00:00
<label><input type="checkbox" id="useLocalScale" checked="checked">Use local scale</label>
</div>
2014-09-19 08:34:04 +00:00
<div class="checkbox">
2014-09-20 09:11:13 +00:00
<label><input type="checkbox" id="useRelativeScale" checked="checked">Use relative scale</label>
</div>
2014-09-18 06:01:56 +00:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
2014-09-18 06:01:56 +00:00
</div>
</div>
</div>
</div>
2014-09-20 09:11:13 +00:00
<!-- learn keyword dialog -->
2014-09-19 11:15:34 +00:00
<div class="modal fade" id="learnDialog" tabindex="-1">
2014-09-18 06:18:04 +00:00
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header"><big>Learn Keyword</big></div>
<div class="modal-body">
2014-09-19 08:34:04 +00:00
<div class="form-group">
2014-09-19 08:40:47 +00:00
<label for="keyword" class="control-label">Learn keyword as</label>
2014-09-20 09:11:13 +00:00
<input class="form-control" type="text" id="keywordToLearn">
2014-09-18 07:40:18 +00:00
</div>
2014-09-20 09:11:13 +00:00
<div class="alert alert-danger" id="learnError" style="display: none;">Unable to learn keyword</div>
2014-09-18 06:18:04 +00:00
</div>
<div class="modal-footer">
2014-09-18 07:40:18 +00:00
<div class="btn-group">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
2014-09-19 11:15:34 +00:00
<button type="button" class="btn btn-success" id="learnKeyword" disabled="disabled">Learn</button>
2014-09-18 07:40:18 +00:00
</div>
2014-09-18 06:18:04 +00:00
</div>
</div>
</div>
</div>
2014-09-20 09:11:13 +00:00
<!-- forget keyword dialog -->
2014-09-19 11:15:34 +00:00
<div class="modal fade" id="forgetDialog" tabindex="-1">
2014-09-19 08:34:04 +00:00
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header"><big>Forget Keyword</big></div>
<div class="modal-body">
2014-09-19 08:40:47 +00:00
<div class="form-group">
2014-09-19 11:15:34 +00:00
<label for="keywordToForget">Keyword to forget</label>
2014-09-20 09:11:13 +00:00
<select id="keywordToForget" class="form-control"></select>
2014-09-19 08:40:47 +00:00
</div>
2014-09-20 09:11:13 +00:00
<div class="alert alert-danger" id="forgetError" style="display: none;">Unable to forget keyword</div>
2014-09-19 08:34:04 +00:00
</div>
<div class="modal-footer">
<div class="btn-group">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
2014-09-19 11:15:34 +00:00
<button type="button" class="btn btn-danger" id="forgetKeyword" disabled="disabled">Forget</button>
2014-09-19 08:34:04 +00:00
</div>
</div>
</div>
</div>
</div>
2014-09-20 09:11:13 +00:00
<!-- query output -->
2014-07-08 04:35:52 +00:00
<div id="output" style="display: none;">
2014-09-20 09:11:13 +00:00
<!-- semantic tweaker -->
2014-09-25 13:49:06 +00:00
<div class="panel panel-default unselectable">
2014-09-18 06:01:56 +00:00
<div class="panel-heading">
<big>Semantic tweaks to <span id="query" class="text-primary"></span></big>
<div class="btn-group pull-right">
<button class="btn btn-xs btn-success" data-toggle="modal" data-target="#learnDialog">Learn</button>
<button class="btn btn-xs btn-danger" data-toggle="modal" data-target="#forgetDialog">Forget</button>
<button class="btn btn-xs btn-default" data-toggle="modal" data-target="#optionsDialog">Options</button>
2014-07-08 04:35:52 +00:00
</div>
</div>
2014-09-25 13:49:06 +00:00
<div style="padding: 10px;">
2014-09-18 06:01:56 +00:00
<canvas id="grapher" width="800" height="550"></canvas>
</div>
</div>
2014-09-20 09:11:13 +00:00
<!-- result listing -->
2014-07-08 04:35:52 +00:00
<div class="panel panel-default">
<div class="panel-heading"><big>Query results (<span id="count" class="text-primary"></span>)</big></div>
<div style="padding: 10px;">
<script id="template" type="text/x-handlers-template">
{{#if results}}
2014-09-19 11:15:34 +00:00
<table class="table table-striped table-condensed">
<thead>
2014-09-19 11:15:34 +00:00
<tr>
<th>#</th>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
{{#each results}}
2014-09-19 11:15:34 +00:00
<tr>
<td>{{@index}}</td>
<td><a href="{{url}}">{{name}}</a></td>
<td>{{score}}</td>
</tr>
{{/each}}
2014-07-08 04:35:52 +00:00
</table>
{{/if}}
</script>
<div id="results"></div>
</div>
</div>
</div>
</div>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/handlebars/handlebars.min.js"></script>
<script src="bower_components/closurelibrary/closure/goog/base.js"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/fabric/dist/fabric.min.js"></script>
<script src="bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<script src="bower_components/tinycolor/tinycolor.js"></script>
2014-07-08 04:35:52 +00:00
2014-07-28 01:57:04 +00:00
<script src="application.js"></script>
2014-07-08 04:35:52 +00:00
<script src="grapher.js"></script>
</body>
</html>