diff --git a/htroot/yacy/ui/js/yacyui-portalsearch.js b/htroot/yacy/ui/js/yacyui-portalsearch.js index 6ed3152b5..4d2ff049b 100644 --- a/htroot/yacy/ui/js/yacyui-portalsearch.js +++ b/htroot/yacy/ui/js/yacyui-portalsearch.js @@ -4,6 +4,7 @@ $(document).ready(function() { cache: false }) // apply default properties + ycurr = ''; startRecord = 0; maximumRecords = 10; submit = false; @@ -202,14 +203,14 @@ function yrun() { }); } -function yacysearch(global) { +function yacysearch(global) { var url = yconf.url + '/yacysearch.json?callback=?' $('#ypopup').empty(); - $('#ypopup').append("
"+item.pubDate.substring(0,16); var size = " | "+item.sizename+"
"; $(title+desc+url+date+size).appendTo("#ypopup"); - } + } + count++; } ); $("#ypopup .linktitle a").faviconize({ position: "before", defaultImage: yconf.url + "/yacy/ui/img-2/article.png", className: "favicon" - }); - + }); $('#yside').empty(); $.each ( data.channels[0].navigation, @@ -278,7 +280,6 @@ function yacysearch(global) { } } ); - $('#ynav1 .ui-accordion-header').trigger('click'); $('#yside a').click(function() { var modifier = $(this).attr('modifier'); modifier = modifier.replace(/^#/,''); @@ -286,6 +287,19 @@ function yacysearch(global) { $("#yquery").setValue(query); $("#yquery").trigger('keyup'); }); + if(count>0) + autoOpenSidebar(); } ); + function autoOpenSidebar() { + window.setTimeout(function() { + if( $("#yquery").getValue() == ycurr) { + if (!$("#yside").dialog('isOpen')) { + $("#yside").dialog('open'); + $('#ynav1').accordion('activate', false); + $("#yquery").focus(); + } + } + } , 3000); + } } \ No newline at end of file