Skip to content

Commit

Permalink
minor search fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prsnca committed May 14, 2014
1 parent 887fe96 commit be213ee
Showing 1 changed file with 45 additions and 30 deletions.
75 changes: 45 additions & 30 deletions committeeVotes/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,18 @@
</a>
</li>
</ul>
<ul class="nav navbar-nav" role="search">
<div class="form-group">
<input type="text" id="search" class="typeahead form-control input-sm" data-provied="typehead" style="width:300px;">
</div>
<ul class="nav navbar-nav">
<li>
<form class="navbar-form" role="search">

<div id="search" class="form-group">
<input type="text" class="typeahead form-control input-sm"
placeholder="חפש שרים או הצעות חוק"
style="width:300px;"
dir="rtl">
</div>
</form>
</li>
</ul>
<ul class="nav navbar-nav navbar-left">
<li>
Expand All @@ -70,12 +78,14 @@
:)
{% endblock %}
<br/>

<div id="footer">
<div class="container">
<h4 class="text-muted">
<img src="http://www.hasadna.org.il/wp-content/themes/sadna2012/images/sadna-logo.png" alt="הסדנא לידע ציבורי"
width="30" height="30">
<span>פרוייקט של</span> <a href="http://www.hasadna.org.il">הסדנא לידע ציבורי</a>
<img src="http://www.hasadna.org.il/wp-content/themes/sadna2012/images/sadna-logo.png"
alt="הסדנא לידע ציבורי"
width="30" height="30">
<span>פרוייקט של</span> <a href="http://www.hasadna.org.il">הסדנא לידע ציבורי</a>
</h4>
</div>
</div>
Expand All @@ -87,30 +97,35 @@ <h4 class="text-muted">
<script src="{% static "js/hogan-2.0.0.js" %}"></script>
<script src="{% static "dist/js/bootstrap.min.js" %}"></script>
<script>
{% verbatim %}
$(function() {
$('#search').typeahead({
name: 'twitter-oss',
prefetch: {url: '../../search.json',
ttl: 0.1},
template: [
'<div class="search-option">',
' <span style="text-align: right;">',
' <span class="search-type">{{type}}</span>',
' <span class="search-name">{{name}}</span>',
' </span>',
'</div>'
].join(''),
engine: Hogan
});
{% verbatim %}
$(function () {
$('#search .typeahead').typeahead({
// hint: true,
// highlight: true,
// minLength: 1
// },
// {
name: 'twitter-oss',
prefetch: {url: '../../search.json',
ttl: 0.1},
template: [
'<div class="search-option">',
' <span style="text-align: right;">',
' <span class="search-type">{{type}}</span>',
' <span class="search-name">{{name}}</span>',
' </span>',
'</div>'
].join(''),
engine: Hogan
});

$('#search').on('typeahead:selected', function (object, datum) {
// Example: {value: "@JakeHarding", tokens: ['Jake', 'Harding'], name: "Jake Harding", profileImageUrl: "https://twitter.com/JakeHaridng/profile_img"}
//console.log(datum);
window.location.replace(datum.url);
});
});
{% endverbatim %}
$('#search').on('typeahead:selected', function (object, datum) {
// Example: {value: "@JakeHarding", tokens: ['Jake', 'Harding'], name: "Jake Harding", profileImageUrl: "https://twitter.com/JakeHaridng/profile_img"}
//console.log(datum);
window.location.replace(datum.url);
});
});
{% endverbatim %}
</script>


Expand Down

0 comments on commit be213ee

Please sign in to comment.