Fixing issue 78
This commit is contained in:
32
indefero/www/media/idf/js/projectsearch.js
Normal file
32
indefero/www/media/idf/js/projectsearch.js
Normal file
@@ -0,0 +1,32 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$("#prjname").keydown(function(ev) {
|
||||
if(ev.which === 13) {
|
||||
window.location.replace($('.projectitem :visible').first().attr("href"));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#prjname').keyup(function(){
|
||||
var valThis = $(this).val().toLowerCase();
|
||||
if(valThis == ""){
|
||||
$('.prjlistclass > li').show();
|
||||
} else {
|
||||
$('.prjlistclass > li').each(function(){
|
||||
if ($(this).attr('id') && $(this).attr('id') == "searchkeep")
|
||||
return true;
|
||||
var text = $(this).text().toLowerCase();
|
||||
(text.indexOf(valThis) >= 0) ? $(this).show() : $(this).hide();
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
$('#project-list').bind('mouseenter', function(ev) {
|
||||
$(this).find('ul').show();
|
||||
$("#prjname").focus();
|
||||
}).bind('mouseleave', function(ev) {
|
||||
$(this).find('ul').hide();
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user