Skip to main content
summaryrefslogtreecommitdiffstats
blob: 3cdcb425c546081e84b3d8bcc5e64d8ad600a35f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<%--
 Copyright (c) 2009 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials 
 are made available under the terms of the Eclipse Public License v1.0
 which accompanies this distribution, and is available at
 http://www.eclipse.org/legal/epl-v10.html
 
 Contributors:
     IBM Corporation - initial API and implementation
--%>
<%@ include file="header.jsp"%>

<% 
    SearchData data=new SearchData(application,request,response);
    WebappPreferences prefs = data.getPrefs();
%>

<html>
<head>
<title><%=ServletResources.getString("QuickSearch", request)%></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">

<style type="text/css">
HTML, BODY {
	width:100%;
	height:100%;
	margin:0px;
	padding:0px;
	border:0px;
}

BODY {
    font:<%=prefs.getViewFont()%>;
	background-color: <%=prefs.getToolbarBackground()%>;
	color:WindowText; 	
}

TABLE {
	width:auto;
	margin:0px;
	padding:0px;
}

TD, TR {
	margin:0px;
	padding:0px;
	border:0px;
}
#typeinContainer {
	overflow:auto; 	
	margin: 5px 5px 5px 5px;
	padding: 5px 5px 5px 5px;	
}

#searchWord {
    margin-top : 5px;
    padding-top : 5px;
	width:95%;
	font-size:1.0em;
}

BUTTON {
	font:<%=prefs.getViewFont()%>;
	margin:5px;
    font-size:1.0em; 
}

FORM {
    margin: 0px;
    border: 0px;
}

#buttonArea {
    height:4em; 
    position:absolute;
    bottom : 0px;
<%
if (data.isMozilla()) {
%>
    padding-bottom:5px;
<%
}
%>
}

</style>

<script language="JavaScript" src="resize.js"></script>
<script language="JavaScript" src="utils.js"></script>
<script language="JavaScript" src="list.js"></script>
<script language="JavaScript">

function onloadHandler() {
<%
if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
// buttons are not resized immediately on mozilla before 1.3
%>
	sizeButtons();
<%}%>
	document.getElementById("searchWord").value = '<%=UrlUtil.JavaScriptEncode(data.getSearchWord())%>';
	document.getElementById("searchWord").focus();
}

function sizeButtons() {
	var minWidth=60;

	if(document.getElementById("ok").offsetWidth < minWidth){
		document.getElementById("ok").style.width = minWidth+"px";
	}
	if(document.getElementById("cancel").offsetWidth < minWidth){
		document.getElementById("cancel").style.width = minWidth+"px";
	}
}

function doQuickSearch(){
	var searchWord = document.getElementById("searchWord").value;
	window.opener.searchFor(searchWord);		
	window.close();
}

</script>

</head>

<body dir="<%=direction%>" onload="onloadHandler()" >
<form onsubmit="doQuickSearch();return false;">
    <div id="typeinContainer" >
        <label id="searchLabel"
		        for="searchWord"
		        accesskey="<%=ServletResources.getAccessKey("SearchExpressionColon", request)%>">
		      <%=ServletResources.getLabel("SearchExpressionColon", request)%> </label>
    	 <br/>
		<input type="text" id="searchWord" name="searchWord"
			value='' size='<%=data.isIE()?"32":"24"%>' maxlength="256"
			alt='<%=ServletResources.getString("SearchExpression", request)%>'
			title='<%=ServletResources.getString("SearchExpression", request)%>'/>
   </div>

	<div id="buttonArea">
		<table align="<%=isRTL?"left":"right"%>" style="background:<%=prefs.getToolbarBackground()%>">
			<tr id="buttonsTable"><td align="<%=isRTL?"left":"right"%>">
	  			<table cellspacing=0 cellpadding=0 border=0 style="background:transparent;">
					<tr>
						<td>
							<button type="submit" id="ok"><%=ServletResources.getString("OK", request)%></button>
						</td>
						<td>
						  	<button type="reset" onclick="window.close()" id="cancel"><%=ServletResources.getString("Cancel", request)%></button>
						</td>
					</tr>
	  			</table>
			</td></tr>
		</table>
	</div>
</form>
</body>
</html>

Back to the top