Fix for search widget keyup event handling. ESC will close the widget window and RIGHT will load additional search results, especially when the scroll event won't work because of too litte results.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7244 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
apfelmaennchen 15 years ago
parent de722090b5
commit 2bb0c9b503

@ -167,20 +167,18 @@ function yrun() {
}
});
$('#ysearch').keyup(function(e) {
if(ycurr == $("#yquery").getValue()) {
return false;
}
$('#ysearch').keyup(function(e) {
if(e.which == 27) { // ESC
$("#ypopup").dialog('close');
} else if(e.which == 34) { // PageDown
} else if(e.which == 39) { // Right
startRecord = startRecord + maximumRecords;
} else if(e.which == 33) { // PageUp
startRecord = startRecord - maximumRecords;
if(startRecord < 0) startRecord = 0;
} else {
startRecord = 0;
yacysearch(submit, false);
}
if(ycurr == $("#yquery").getValue()) {
return false;
}
if ($("#yquery").getValue() == '') {
if($("#ypopup").dialog('isOpen'))
$("#ypopup").dialog('close');

Loading…
Cancel
Save