Skip to content

Commit

Permalink
Portal Search:
Browse files Browse the repository at this point in the history
- request: http://forum.yacy-websuche.de/viewtopic.php?f=15&t=1762&start=50#p14350
- window closes for empty query
- example for fancy input field

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5884 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
apfelmaennchen committed Apr 26, 2009
1 parent 42d9362 commit 4cf8b08
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
11 changes: 11 additions & 0 deletions htroot/yacy/ui/css/yacyui-portalsearch.css
Expand Up @@ -4,6 +4,17 @@
.ui-dialog .ui-dialog-buttonpane button {
font-size: 14px;
}
#ysearch .fancy {
background-image: url(/yacy/ui/img-2/magnify.png);
background-repeat: no-repeat;
background-position: 2px 1px;
padding-left: 20px;
border-width: small;
border-color: #239AFF;
border-style: solid;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
#ypopup * {
margin: 0;
padding: 0;
Expand Down
8 changes: 6 additions & 2 deletions htroot/yacy/ui/js/yacyui-portalsearch.js
Expand Up @@ -78,8 +78,12 @@ $(document).ready(function() {
});
$('#ysearch').keyup(function() {
startRecord = 0;
if(!submit) yacysearch(false);
else submit = false;
if ($("#yquery").getValue() == '') {
$("#ypopup").dialog('close');
} else {
if(!submit) yacysearch(false);
else submit = false;
}
return false;
});
$('#ysearch').submit(function() {
Expand Down
7 changes: 3 additions & 4 deletions htroot/yacy/ui/yacyui-portaltest.html
Expand Up @@ -15,11 +15,11 @@
};
$.getScript(yconf.url+'/yacy/ui/js/yacyui-portalsearch.js', function(){});
});
</script>
</script>
<h3>YaCy Portal Search:</h3>
<div id="yacy">
<form id="ysearch" method="get" accept-charset="UTF-8" action="http://localhost:8080/yacysearch.html">
<input name="search" id="yquery" type="text" size="15" maxlength="80" value=""/>
<input name="search" id="yquery" class="fancy" type="text" size="15" maxlength="80" value=""/>
<input type="hidden" name="verify" value="true" />
<input type="hidden" name="maximumRecords" value="10" />
<input type="hidden" name="resource" value="local" />
Expand All @@ -46,7 +46,7 @@ <h4>Code Snippet:</h4>
&lt;/script&gt;
&lt;div id="yacy"&gt;
&lt;form id="ysearch" method="get" accept-charset="UTF-8" action="http://localhost:8080/yacysearch.html"&gt;
&lt;input name="query" id="yquery" type="text" size="15" maxlength="80" value=""/&gt;
&lt;input name="query" id="yquery" class="fancy" type="text" size="15" maxlength="80" value=""/&gt;
&lt;input type="hidden" name="verify" value="true" /&gt;
&lt;input type="hidden" name="maximumRecords" value="10" /&gt;
&lt;input type="hidden" name="resource" value="local" /&gt;
Expand Down Expand Up @@ -93,4 +93,3 @@ <h4>Bookmarklet:</h4>
</p>
</body>
</html>

0 comments on commit 4cf8b08

Please sign in to comment.