fix ConfigPortal jumps to iframe focus

add focus parameter to yacysearch.html too
pull/1/head
reger 10 years ago
parent c156548efe
commit 4ff018c9e4

@ -60,7 +60,7 @@
</script>
<style type="text/css">.twitter-typeahead {margin: 0px;padding: 0px;top:2px;}</style> <!-- fix for input window -->
</head>
<body id="yacysearch" onLoad="document.searchform.query.focus();">
<body id="yacysearch" #(focus)#::onLoad="document.searchform.query.focus();"#(/focus)#>
#(topmenu)#
#%env/templates/embeddedheader.template%#
@ -92,7 +92,7 @@ Use the RSS search result format to add static searches to your RSS reader, if y
<form class="search small" name="searchform" action="" method="get" accept-charset="UTF-8" style="position:fixed;top:8px;z-index:1052;max-width:500px;">
<div class="input-group">
<input type="text" class="form-control searchinput typeahead" size="40" maxlength="200" placeholder="#[promoteSearchPageGreeting]#" name="query" value="#[former]#" autofocus="autofocus" onFocus="this.select()" id="search" onclick="document.getElementById('Enter').innerHTML = 'search'"/>
<input type="text" class="form-control searchinput typeahead" size="40" maxlength="200" placeholder="#[promoteSearchPageGreeting]#" name="query" value="#[former]#" #(focus)#::autofocus="autofocus"#(/focus)# onFocus="this.select()" id="search" onclick="document.getElementById('Enter').innerHTML = 'search'"/>
<div class="input-group-btn">
<button id="Enter" class="btn btn-default" type="submit">search</button>
</div>

@ -118,7 +118,7 @@ public class yacysearch {
if (authenticated && sb.getThread(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL).getJobCount() > 0) {
sb.index.fulltext().commit(true);
}
final boolean focus = (post == null) ? true : post.get("focus", "1").equals("1");
// get query
final String originalquerystring = (post == null) ? "" : post.get("query", post.get("search", "")).trim();
String querystring = originalquerystring.replace('+', ' ').trim();
@ -867,7 +867,7 @@ public class yacysearch {
prop.put("depth", "0");
}
prop.put("focus", focus ? 1 : 0); // focus search field
prop.put("searchagain", global ? "1" : "0");
prop.putHTML("former", originalquerystring.replaceAll(Segment.catchallString, "*"));
prop.put("count", itemsPerPage);

Loading…
Cancel
Save