@@ -5,13 +5,16 @@
= endblock
= endblock
= block head
= block head
{{ assets.tag("index .css") }}
{{ assets.tag("jqueryui.custom.m in.css") }}
{{ assets.tag("jquery.min.js") }}
{{ assets.tag("jquery.min.js") }}
{{ assets.tag("jquery-ui.min.js") }}
{{ assets.tag("typeahead.bundle.min.js") }}
{{ assets.tag("index.css") }}
= endblock
= endblock
= block body
= block body
<div id="search-field" class="partly-visible">
<div id="search-field" class="partly-visible">
<div id="title">
<div id="title">
<span id="title-bit">bit</span
<span id="title-bit">bit</span
><span id="title-angle">«</span
><span id="title-angle">«</span
@@ -21,38 +24,34 @@
<form id="search-bar">
<form id="search-bar">
<input type="text" name="query">
<input type="text" name="query">
<div id="advanced-search">
<div id="advanced-search">
<!-- Tags are closed on the following line to remove whitespace between divs. -->
<!-- Tags are closed on the following line to remove whitespace between divs. -->
<div id="col1">
<div id="col1">
+ Add group
+ Add group <!-- Placeholder. -->
</div><div id="col2">
</div><div id="col2">
<div id="upper-half">
<div id="upper-half">
<div id="col1">
<div id="col1">
<ul>
<ul>
<li>
<li>
<label for="languages">Languages</label>
<label for="languages">Languages</label>
<input type="text" name="languages" id="languages"><br>
<input class="typeahead" type="text" name="languages" id="languages"><br>
</li>
</li>
<li>
<li>
<label for="authors">Authors</label>
<label for="authors">Authors</label>
<input type="text" name="authors" id="authors"><br>
<input type="text" name="authors" id="authors"><br>
</li>
</li>
</ul>
</ul>
</div><div id="col2">
</div><div id="col2">
<ul>
<ul>
<li>
<li>
<label for="date">Date last modified</label>
<input type="text" name="date-last-modifi id="date" ed">
<label for="date-last-modified ">Date last modified</label>
<input type="text" name="date-last-modified" id="date-last-modifi ed">
</li>
</li>
<li>
<li>
<label for="date">Date created</label>
<input type="text" name="date-creat id="date" ed">
<label for="date-created ">Date created</label>
<input type="text" name="date-created" id="date-creat ed">
</li>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
@@ -78,16 +77,41 @@
<label for="variables">Variables</label>
<label for="variables">Variables</label>
<input type="text" name="variables" id="variables"><br>
<input type="text" name="variables" id="variables"><br>
</li>
</li>
<u/l>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</form>
</div>
</div>
<div id="results">
</div>
<div id="results"></div>
{{ assets.tag("index.js") }}
{{ assets.tag("index.js") }}
<script>
TYPEAHEAD_LANGUAGES = {{ typeahead_languages | safe }};
$(function() {
$("#date-last-modified").datepicker();
$("#date-created").datepicker();
});
var languages = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace("value"),
queryTokenizer: Bloodhound.tokenizers.whitespace,
local: $.map(TYPEAHEAD_LANGUAGES, function(state){
return {value : state};
})
});
languages.initialize();
$(".typeahead").typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: "languages",
displayKey: 'value',
source: languages.ttAdapter()
});
</script>
= endblock
= endblock