Changing behavior of project search textbox to navigate to first displayed project

This commit is contained in:
Nathan Adams 2014-12-19 22:53:27 -06:00
parent 69c03cef15
commit f892363613

View File

@ -33,12 +33,7 @@ $(document).ready(function() {
$("#prjname").keydown(function(ev) { $("#prjname").keydown(function(ev) {
if(ev.which === 13) { if(ev.which === 13) {
var elements = $('.projectitem :visible'); window.location.replace($('.projectitem :visible').first().attr("href"));
var count = elements.size();
if (count > 0 && (count / 2) == 1)
{
window.location.replace($('.projectitem :visible').attr("href"));
}
} }
}); });