Skip to content

Commit

Permalink
hit doSearch with Enter in addition to click on search button
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuochuan Huang committed Jan 28, 2011
1 parent 2cb7c41 commit b8db915
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions example/conf/zoie.spring
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
http://www.springframework.org/schema/beans/spring-beans.xsd">

<import resource="propertyLoader.spring" />

<bean id="fileInterpreter" class="proj.zoie.impl.indexing.FileIndexableInterpreter" />


<bean id="indexingSystem" class="proj.zoie.impl.indexing.SimpleZoieSystem" init-method="start" destroy-method="shutdown">
<constructor-arg value="file:${index.directory}"/>
<constructor-arg ref="fileInterpreter" />
Expand Down
2 changes: 1 addition & 1 deletion example/webapp/index.html
Expand Up @@ -13,7 +13,7 @@
<center>
<div id="header">Zoie</div>
<br/>
<input id="query" maxlength="2048" size="55" value=""/>
<input id="query" maxlength="2048" size="55" value="" onkeypress="javascript:onEnter(event)"/>
<input id="search" type="button" value="search" onclick="javascript:doSearch()"/>
</center>
<br/>
Expand Down
6 changes: 6 additions & 0 deletions example/webapp/search.js
Expand Up @@ -5,6 +5,12 @@ function handler(errorString, exception)

DWREngine.setErrorHandler(handler);

function onEnter(event)
{
if (event.keyCode == 13)
doSearch();
}

// doSearch method
function doSearch()
{
Expand Down

0 comments on commit b8db915

Please sign in to comment.