forked from publiclab/plots2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change /questions page layout (publiclab#2358)
The /questions page was displaying too much information. Now the page has a clean layout.
- Loading branch information
Showing
3 changed files
with
56 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<div> | ||
<h4>Filter questions by topic</h4> | ||
<p>Refine questions by entering tags to search or answer questions on specific topics.</p> | ||
|
||
<form id="tagform" class="form" method="GET" action="/questions/tag/"> | ||
<div class="control-group"> | ||
<input autocomplete="off" id="taginput" name="id" type="text" placeholder="water-quality,dust" data-provide="typeahead" class="form-control" /> | ||
<script> | ||
jQuery(document).ready(function() { | ||
|
||
$('#taginput').typeahead({ | ||
items: 8, | ||
minLength: 3, | ||
source: function (query, process) { | ||
return $.post('/tag/suggested/' + query, {}, function (data) { | ||
return process(data) | ||
}) | ||
}, | ||
updater: function(text) { | ||
$('#taginput').val(text) | ||
window.location = "/questions/tag/" + text; | ||
} | ||
}); | ||
<h4>View questions by topic</h4> | ||
<form id="tagform" class="form-horizontal" method="GET" action="/questions/tag/"> | ||
<div class="input-group"> | ||
<input tabindex="1" autocomplete="off" id="taginput" name="id" type="text" placeholder="type your topic" data-provide="typeahead" class="form-control" /> | ||
<span class="input-group-btn" > | ||
<button type="submit" rel="tooltip" title="View questions with the entered title" class="btn btn-primary">Search</button> | ||
</span> | ||
</div> | ||
</form> | ||
<script> | ||
jQuery(document).ready(function() { | ||
|
||
$('#tagform').submit(function(e) { | ||
e.preventDefault(); | ||
window.location = "/questions/tag/" + $('#taginput').val(); | ||
}); | ||
$('#taginput').typeahead({ | ||
items: 8, | ||
minLength: 3, | ||
source: function (query, process) { | ||
return $.post('/tag/suggested/' + query, {}, function (data) { | ||
return process(data) | ||
}) | ||
}, | ||
updater: function(text) { | ||
$('#taginput').val(text) | ||
window.location = "/questions/tag/" + text; | ||
} | ||
}); | ||
|
||
$('#tagform').submit(function(e) { | ||
e.preventDefault(); | ||
window.location = "/questions/tag/" + $('#taginput').val(); | ||
}); | ||
</script> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
}); | ||
</script> | ||
|