From beb65437d2410d8dbb0a1890f8878e7be55b0155 Mon Sep 17 00:00:00 2001 From: apfelmaennchen Date: Tue, 12 Oct 2010 21:55:24 +0000 Subject: [PATCH] additional fix for the widget - now a second result page is loaded automatically in case of too little search results for the scroll event to trigger git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7245 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacy/ui/js/yacyui-portalsearch.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htroot/yacy/ui/js/yacyui-portalsearch.js b/htroot/yacy/ui/js/yacyui-portalsearch.js index 850a68594..19ca09481 100644 --- a/htroot/yacy/ui/js/yacyui-portalsearch.js +++ b/htroot/yacy/ui/js/yacyui-portalsearch.js @@ -171,6 +171,7 @@ function yrun() { if(e.which == 27) { // ESC $("#ypopup").dialog('close'); + $("#yquery").setValue(""); } else if(e.which == 39) { // Right startRecord = startRecord + maximumRecords; yacysearch(submit, false); @@ -309,8 +310,15 @@ function yacysearch(global, clear) { } } ); - if(count>0) + if(count>0) { autoOpenSidebar(); + if ($("#ypopup").dialog('isOpen')) { + if($("#ypopup h3 :last").position().top < yconf.height) { + startRecord = startRecord + maximumRecords; + yacysearch(submit, false); + } + } + } } } );