menu.jspf revision 59b6a8c0cc6ef741a7180504b3c371e67c2aa338
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeCDDL HEADER START
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeThe contents of this file are subject to the terms of the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenCommon Development and Distribution License (the "License").
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeYou may not use this file except in compliance with the License.
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeSee LICENSE.txt included in this distribution for the specific
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyelanguage governing permissions and limitations under the License.
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeWhen distributing Covered Code, include this CDDL HEADER in each
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyefile and include the License file at LICENSE.txt.
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeIf applicable, add the following below this CDDL HEADER, with the
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyefields enclosed by brackets "[]" replaced with your own identifying
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyeinformation: Portions Copyright [yyyy] [name of copyright owner]
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeCDDL HEADER END
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeCopyright 2007 Sun Microsystems, Inc. All rights reserved.
9ec7787531611654e8f50932473aa48963eaba55Trond NorbyeUse is subject to license terms.
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerPortions Copyright 2011 Jens Elkner.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner--%><%@page import="
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- menu.jspf start --------------------- */
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen // PageConfig cfg = PageConfig.get(request);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen List<Project> projects = cfg.getEnv().getProjects();
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen if (projects == null) {
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen projects = new ArrayList<Project>(0);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen TreeMap<String, String> pMap = new TreeMap<String, String>();
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen QueryBuilder queryParams = cfg.getQueryBuilder();
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen for (Project p : projects) {
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen String esc = Util.formQuoteEscape(p.getDescription());
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen StringBuilder jsProjects = new StringBuilder(64);
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen for (String name : cfg.getRequestedProjects()) {
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen jsProjects.append(name).append("','");
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen jsProjects.setLength(jsProjects.length()-2);
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco<script type="text/javascript">/* <![CDATA[ */
73100f4d1c412f00eb2568969d935cf3182b0d77Lubos Kosco document.projects = [ <%= Util.encode(jsProjects.toString())
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen %> ];document.xrefPath = '<%= request.getContextPath() + Prefix.XREF_P
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen %>';document.domReady.push(function() { domReadyMenu(); });
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<form action="search" id="sbox">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<div id="qtbl">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><label for="s1">Full Search</label></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><input tabindex="1" class="q" name="q" id="s1" value="<%=
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Util.formQuoteEscape(queryParams.getFreetext()) %>"/></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><label for="s2">Definition</label></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><input class="q" tabindex="2" name="defs" id="s2" value="<%=
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Util.formQuoteEscape(queryParams.getDefs()) %>"/></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><label for="s3">Symbol</label></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><input class="q" tabindex="3" name="refs" id="s3" value="<%=
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Util.formQuoteEscape(queryParams.getRefs()) %>"/></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><label for="s4">File Path</label></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><input class="q" tabindex="4" name="path" id="s4" value="<%=
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Util.formQuoteEscape(queryParams.getPath()) %>"/></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><label for="s5">History</label></td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td><input class="q" tabindex="5" name="hist" id="s5" value="<%=
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Util.formQuoteEscape(queryParams.getHist()) %>"/></td>
ff32508916722fc0e579f39b5bf22936116b8829Lubos Kosco<%-- TODO Bug 11749
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen String imgDir = cfg.getCssDir() + "/img/";
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td>Project(s)</td>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <table class="combo_table" id="combotable">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td class="combo_td1"><div class="combo_div4"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen style="background: transparent url(<%=
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen repeat scroll 0% 0%;"><input
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen class="combo_input1 combo_input" id="project"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen name="project" size="25"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen value="<%= cfg.getRequestedProjectsAsString()
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <td valign="top" align="left" class="combo_td2"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen id="combotable_button"><a
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen onclick='javascript: $("#project").click();
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen $("#project").click();'/><img style="display: none;"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen alt="" src="<%= imgDir %>button2.png"/>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<div id="ptbl">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <p><label for="project">In Project(s)</label> <button tabindex="6" type="button"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen onclick="javascript: selectAllProjects(); return false;"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen >select all</button> <button tabindex="7" type="button"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen onclick="javascript: invertAllProjects(); return false;"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen >invert selection</button> </p>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <select tabindex="8" ondblclick="javascript: goFirstProject();"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen onkeyup="javascript: checkEnter(event);" class="q" id="project"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen name="project" multiple="multiple" size="<%=
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen SortedSet<String> pRequested = cfg.getRequestedProjects();
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen for (Entry<String,String> e : pMap.entrySet()) {
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen // TODO below "selected" has no effect if one refreshes the page
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen // with F5 also below ondblclick doesn't work in IE ...
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen // ondblclick="javascript:goFirstProject();"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <option value="<%= e.getValue() %>"<%
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen %> selected="selected"<%
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen %>><%= e.getValue() %></option><%
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen tabindex="9" class="submit" type="submit" value="Search"/> <input
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen tabindex="10" class="submit" onclick="javascript: sbox.q.value='';
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen sbox.defs.value = ''; sbox.refs.value = ''; sbox.path.value = '';
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen sbox.hist.value = ''; sbox.project.value ='';" type="button"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen value=" Clear "/> <button class="help"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen tabindex="11" onclick="window.open('help.jsp')">Help</button>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- menu.jspf end --------------------- */