You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2006/12/16 17:21:09 UTC
svn commit: r487826 [4/7] - in
/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins:
./ org.apache.lucene_1.4.103.v20060510a/ org.apache.lucene_1.4.103.v20060601/
org.apache.lucene_1.4.103.v20060601/META-INF/ org.apache.lucene_1.4....
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchScoped.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchScoped.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchScoped.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchScoped.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,247 @@
+<%--
+ Copyright (c) 2000, 2004 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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<title><%=ServletResources.getString("Search", request)%></title>
+
+<style type="text/css">
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ background:<%=prefs.getToolbarBackground()%>;
+ border:0px;
+ text:white;
+ height:100%;
+}
+
+TABLE {
+ font: <%=prefs.getToolbarFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+ margin: 0px;
+ padding: 0px;
+ height:100%;
+}
+
+FORM {
+ background:<%=prefs.getToolbarBackground()%>;
+ height:100%;
+ margin:0px;
+}
+
+INPUT {
+ font: <%=prefs.getToolbarFont()%>;
+ margin:0px;
+ padding:0px;
+}
+
+A {
+ color:WindowText;
+ text-decoration:none;
+}
+
+#searchTD {
+ padding-<%=isRTL?"right":"left"%>:7px;
+ padding-<%=isRTL?"left":"right"%>:4px;
+}
+
+#searchWord {
+ padding-left:4px;
+ padding-right:4px;
+ border:1px solid ThreeDShadow;
+}
+
+#searchLabel {
+ color:WindowText;
+}
+
+#go {
+ background:ThreeDShadow;
+ color:Window;
+ font-weight:bold;
+ border:1px solid ThreeDShadow;
+ margin-left:1px;
+}
+
+#scopeLabel {
+ text-decoration:underline;
+ color:#0066FF;
+ cursor:hand;
+ padding-left:15px; /* This should be the same for both RTL and LTR. */
+}
+
+#scope {
+ text-align:<%=isRTL?"left":"right"%>;
+ margin-<%=isRTL?"right":"left"%>:5px;
+ border:0px;
+ color:WindowText;
+ text-decoration:none;
+}
+
+<%
+ if (data.isIE()) {
+%>
+#go {
+ padding-<%=isRTL?"right":"left"%>:1px;
+}
+<%
+ }
+%>
+</style>
+
+<script language="JavaScript">
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var isMozilla = navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+
+var advancedDialog;
+var w = 300;
+var h = 300;
+
+function openAdvanced()
+{
+ var scope = document.getElementById("scope").firstChild;
+ var workingSet = "";
+ if (scope != null)
+ workingSet = document.getElementById("scope").firstChild.nodeValue;
+
+<%
+if (data.isIE()){
+%>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+<%
+} else {
+%>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+<%
+}
+%>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+
+ window.location="javascript://needModal";
+ advancedDialog = window.open("workingSetManager.jsp?workingSet="+encodeURIComponent(workingSet), "advancedDialog", "resizeable=no,height="+h+",width="+w+",left="+l+",top="+t );
+ advancedDialog.focus();
+}
+
+function closeAdvanced()
+{
+ try {
+ if (advancedDialog)
+ advancedDialog.close();
+ }
+ catch(e) {}
+}
+
+/**
+ * This function can be called from this page or from
+ * the advanced search page. When called from the advanced
+ * search page, a query is passed.
+ */
+function doSearch(query)
+{
+ var workingSet = document.getElementById("scope").firstChild.nodeValue;
+
+ if (!query || query == "")
+ {
+ var form = document.forms["searchForm"];
+ var searchWord = form.searchWord.value;
+ var maxHits = form.maxHits.value;
+ if (!searchWord || searchWord == "")
+ return;
+ query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits;
+ if (workingSet != '<%=ServletResources.getString("All", request)%>')
+ query = query +"&scope="+encodeURIComponent(workingSet);
+ }
+
+ /******** HARD CODED VIEW NAME *********/
+ // do some tests to ensure the results are available
+ if (parent.HelpFrame &&
+ parent.HelpFrame.NavFrame &&
+ parent.HelpFrame.NavFrame.showView &&
+ parent.HelpFrame.NavFrame.ViewsFrame &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame)
+ {
+ parent.HelpFrame.NavFrame.showView("search");
+ var searchView = parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
+ searchView.location.replace("searchView.jsp?"+query);
+ }
+}
+
+function fixHeights()
+{
+ if (!isIE) return;
+
+ var h = document.getElementById("searchWord").offsetHeight;
+ document.getElementById("go").style.height = h;
+}
+
+function onloadHandler(e)
+{
+ var form = document.forms["searchForm"];
+ form.searchWord.value = '<%=UrlUtil.JavaScriptEncode(data.getSearchWord())%>';
+ fixHeights();
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()" onunload="closeAdvanced()">
+
+ <form name="searchForm" onsubmit="doSearch()">
+ <table id="searchTable" align="<%=isRTL?"right":"left"%>" valign="middle" cellspacing="0" cellpadding="0" border="0">
+ <tr nowrap valign="middle">
+ <td <%=isRTL?"nowrap":""%> id="searchTD">
+ <label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("Search", request)%>">
+ <%=ServletResources.getLabel("Search", request)%>:
+ </label>
+ </td>
+ <td>
+ <input type="text" id="searchWord" name="searchWord" value='' size="24" maxlength="256" alt='<%=ServletResources.getString("SearchExpression", request)%>' title='<%=ServletResources.getString("SearchExpression", request)%>'>
+ </td>
+ <td >
+ <input type="button" onclick="this.blur();doSearch()" value='<%=ServletResources.getString("GO", request)%>' id="go" alt='<%=ServletResources.getString("GO", request)%>' title='<%=ServletResources.getString("GO", request)%>'>
+ <input type="hidden" name="maxHits" value="500" >
+ </td>
+ <td nowrap>
+ <a id="scopeLabel" href="javascript:openAdvanced();" title='<%=ServletResources.getString("ScopeTooltip", request)%>' alt='<%=ServletResources.getString("ScopeTooltip", request)%>' onmouseover="window.status='<%=ServletResources.getString("ScopeTooltip", request)%>'; return true;" onmouseout="window.status='';"><%=ServletResources.getLabel("Scope", request)%>:</a>
+ </td>
+ <td nowrap>
+ <input type="hidden" name="workingSet" value='<%=data.getScope()%>'>
+ <div id="scope" ><%=data.getScope()%></div>
+ </td>
+ </tr>
+
+ </table>
+ </form>
+
+</body>
+</html>
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchSimple.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchSimple.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchSimple.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchSimple.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,225 @@
+<%--
+ Copyright (c) 2000, 2004 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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<title><%=ServletResources.getString("Search", request)%></title>
+
+<style type="text/css">
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ background:<%=prefs.getToolbarBackground()%>;
+ border:0px;
+ text:white;
+ height:100%;
+}
+
+TABLE {
+ font: <%=prefs.getToolbarFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+ margin: 0px;
+ padding: 0px;
+ height:100%;
+}
+
+FORM {
+ background:<%=prefs.getToolbarBackground()%>;
+ height:100%;
+ margin:0px;
+}
+
+INPUT {
+ font: <%=prefs.getToolbarFont()%>;
+ margin:0px;
+ padding:0px;
+}
+
+
+#searchTable {
+ padding-<%=isRTL?"right":"left"%>:5;
+}
+
+#searchWord {
+ padding-left:4px;
+ padding-right:4px;
+ border:1px solid ThreeDShadow;
+}
+
+#go {
+ background:ThreeDShadow;
+ color:Window;
+ font-weight:bold;
+ border:1px solid ThreeDShadow;
+}
+
+
+#advanced {
+ text-decoration:underline;
+ text-align:<%=isRTL?"left":"right"%>;
+ color:#0066FF;
+ cursor:hand;
+ margin-<%=isRTL?"right":"left"%>:4px;
+ border:0px;
+}
+
+<%
+ if (data.isIE()) {
+%>
+#go {
+ padding-<%=isRTL?"right":"left"%>:1px;
+}
+<%
+ }
+%>
+</style>
+
+<script language="JavaScript">
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var isMozilla = navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+
+<%
+ String[] selectedBooks = data.getSelectedTocs();
+%>
+// create list of books initilize selectedBooks variable used by advances search
+var selectedBooks = new Array(<%=selectedBooks.length%>);
+<%
+for (int i=0; i<selectedBooks.length; i++)
+{
+%>
+ selectedBooks[<%=i%>] = "<%=UrlUtil.JavaScriptEncode(selectedBooks[i])%>";
+<%
+}
+%>
+
+var advancedDialog;
+var w = 400;
+var h = 300;
+
+function saveSelectedBooks(books)
+{
+ selectedBooks = new Array(books.length);
+ for (var i=0; i<selectedBooks.length; i++){
+ selectedBooks[i] = new String(books[i]);
+ }
+}
+
+function openAdvanced()
+{
+ window.location="javascript://needModal";
+ advancedDialog = window.open("advanced.jsp?searchWord="+encodeURIComponent(document.getElementById("searchWord").value), "advancedDialog", "resizeable=no,height="+h+",width="+w );
+ advancedDialog.focus();
+}
+
+function closeAdvanced()
+{
+ try {
+ if (advancedDialog)
+ advancedDialog.close();
+ }
+ catch(e) {}
+}
+
+/**
+ * This function can be called from this page or from
+ * the advanced search page. When called from the advanced
+ * search page, a query is passed.
+ */
+function doSearch(query)
+{
+ if (!query || query == "")
+ {
+ var form = document.forms["searchForm"];
+ var searchWord = form.searchWord.value;
+ var maxHits = form.maxHits.value;
+ if (!searchWord || searchWord == "")
+ return;
+ query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits;
+ }
+
+ /******** HARD CODED VIEW NAME *********/
+ // do some tests to ensure the results are available
+ if (parent.HelpFrame &&
+ parent.HelpFrame.NavFrame &&
+ parent.HelpFrame.NavFrame.showView &&
+ parent.HelpFrame.NavFrame.ViewsFrame &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame)
+ {
+ parent.HelpFrame.NavFrame.showView("search");
+ var searchView = parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
+ searchView.location.replace("searchView.jsp?"+query);
+ }
+}
+
+function fixHeights()
+{
+ if (!isIE) return;
+
+ var h = document.getElementById("searchWord").offsetHeight;
+ document.getElementById("go").style.height = h;
+}
+
+function onloadHandler(e)
+{
+ var form = document.forms["searchForm"];
+ form.searchWord.value = '<%=UrlUtil.JavaScriptEncode(data.getSearchWord())%>';
+ fixHeights();
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()" onunload="closeAdvanced()">
+
+ <form name="searchForm" onsubmit="doSearch()">
+ <table id="searchTable" align="<%=isRTL?"right":"left"%>" valign="middle" cellspacing="0" cellpadding="0" border="0">
+ <tr nowrap valign="middle">
+ <td <%=isRTL?"nowrap":""%>>
+ <label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("Search", request)%>">
+ <%=ServletResources.getLabel("Search", request)%>:
+ </label>
+ </td>
+ <td>
+ <input type="text" id="searchWord" name="searchWord" value='' size="20" maxlength="256" alt='<%=ServletResources.getString("SearchExpression", request)%>' title='<%=ServletResources.getString("SearchExpression", request)%>'>
+ </td>
+ <td >
+ <input type="button" onclick="this.blur();doSearch()" value='<%=ServletResources.getString("GO", request)%>' id="go" alt='<%=ServletResources.getString("GO", request)%>' title='<%=ServletResources.getString("GO", request)%>'>
+ <input type="hidden" name="maxHits" value="500" >
+ </td>
+ <td nowrap>
+ <a id="advanced" href="javascript:openAdvanced();" alt='<%=ServletResources.getString("Advanced", request)%>' title='<%=ServletResources.getString("Advanced", request)%>' onmouseover="window.status='<%=ServletResources.getString("Advanced", request)%>'; return true;" onmouseout="window.status='';"><%=ServletResources.getString("Advanced", request)%></a>
+ </td>
+ </tr>
+
+ </table>
+ </form>
+
+</body>
+</html>
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchToolbar.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchToolbar.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchToolbar.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchToolbar.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,31 @@
+<%--
+ Copyright (c) 2000, 2004 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"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="navActions.js"/>
+ <jsp:param name="view" value="search"/>
+
+ <jsp:param name="name" value="show_all"/>
+ <jsp:param name="tooltip" value='show_all'/>
+ <jsp:param name="image" value="show_all.gif"/>
+ <jsp:param name="action" value="toggleShowAll"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value="<%=(new ActivitiesData(application, request, response)).getButtonState()%>"/>
+
+ <jsp:param name="name" value="synchnav"/>
+ <jsp:param name="tooltip" value='SynchNav'/>
+ <jsp:param name="image" value="synch_nav.gif"/>
+ <jsp:param name="action" value="resynchNav"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+</jsp:include>
\ No newline at end of file
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchView.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchView.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchView.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchView.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,164 @@
+<%--
+ Copyright (c) 2000, 2006 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);
+ // After each search we preserve the scope (working set), if any
+ // this need to be at the beginning, otherwise cookie is not written
+ if (data.isSearchRequest())
+ data.saveScope();
+
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<title><%=ServletResources.getString("SearchResults", request)%></title>
+
+<style type="text/css">
+<%@ include file="searchList.css"%>
+</style>
+
+
+<base target="ContentViewFrame">
+<script language="JavaScript" src="list.js"></script>
+<script language="JavaScript">
+
+function refresh()
+{
+ window.location.replace("searchView.jsp?<%=request.getQueryString()%>");
+}
+</script>
+
+
+</head>
+
+<body dir="<%=direction%>">
+
+<%
+if (!data.isSearchRequest()) {
+ out.write(ServletResources.getString("doSearch", request));
+} else if (data.getQueryExceptionMessage()!=null) {
+ out.write(data.getQueryExceptionMessage());
+} else if (data.isProgressRequest()) {
+%>
+
+<CENTER>
+<TABLE BORDER='0'>
+ <TR><TD><%=ServletResources.getString("Indexing", request)%></TD></TR>
+ <TR><TD ALIGN='<%=isRTL?"RIGHT":"LEFT"%>'>
+ <DIV STYLE='width:100px;height:16px;border:1px solid ThreeDShadow;'>
+ <DIV ID='divProgress' STYLE='width:<%=data.getIndexedPercentage()%>px;height:100%;background-color:Highlight'></DIV>
+ </DIV>
+ </TD></TR>
+ <TR><TD><%=data.getIndexedPercentage()%>% <%=ServletResources.getString("complete", request)%></TD></TR>
+ <TR><TD><br><%=ServletResources.getString("IndexingPleaseWait", request)%></TD></TR>
+</TABLE>
+</CENTER>
+<script language='JavaScript'>
+setTimeout('refresh()', 2000);
+</script>
+</body>
+</html>
+
+<%
+ return;
+} else if (data.getResultsCount() == 0){
+ out.write(ServletResources.getString("Nothing_found", request));
+} else {
+%>
+
+<table id='list' cellspacing='0' >
+
+<%
+ for (int topic = 0; topic < data.getResultsCount(); topic++)
+ {
+ if(data.isActivityFiltering() && !data.isEnabled(topic)){
+ continue;
+ }
+%>
+
+<tr class='list' id='r<%=topic%>'>
+ <td class='score' align='<%=isRTL?"left":"right"%>'>
+
+<%
+ boolean isPotentialHit = data.isPotentialHit(topic);
+ if (isPotentialHit) {
+%>
+
+
+ <img src="<%=prefs.getImagesDirectory()%>/d_topic.gif" alt=""/>
+
+<%
+ }
+ else {
+%>
+
+ <img src="<%=prefs.getImagesDirectory()%>/topic.gif" alt=""/>
+
+<%
+ }
+%>
+
+ </td>
+ <td align='<%=isRTL?"right":"left"%>'>
+ <a class='link' id='a<%=topic%>'
+ href="<%=data.getTopicHref(topic)%>"
+ onmouseover="showStatus(event);return true;"
+ onmouseout="clearStatus();return true;"
+ onclick='parent.parent.parent.setContentToolbarTitle(this.title)'
+ title="<%=data.getTopicTocLabel(topic)%>">
+
+<%
+ String label = null;
+ if (isPotentialHit) {
+ label = ServletResources.getString("PotentialHit", data.getTopicLabel(topic), request);
+ }
+ else {
+ label = data.getTopicLabel(topic);
+ }
+%>
+
+ <%=label%></a>
+ </td>
+</tr>
+
+<%
+ String desc = data.getTopicDescription(topic);
+ if (desc!=null) {
+%>
+<tr class='description' id='d<%=topic%>'>
+ <td class='score'>
+ </td>
+ <td align='<%=isRTL?"right":"left"%>' class='label'>
+ <%=desc%>
+ </td>
+<%
+ }
+ }
+%>
+</table>
+
+<%
+}
+%>
+
+<script language="JavaScript">
+ selectTopicById('<%=data.getSelectedTopicId()%>');
+</script>
+
+</body>
+</html>
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tabs.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tabs.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tabs.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tabs.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,296 @@
+<%--
+ Copyright (c) 2000, 2004 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"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+ View[] views = data.getViews();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Tabs", request)%></title>
+
+<style type="text/css">
+
+
+BODY {
+ margin:0px;
+ padding:0px;
+ background:<%=prefs.getToolbarBackground()%>;
+ height:100%;
+<%
+if (data.isMozilla()){
+%>
+ height:21px;
+<%
+}
+%>
+}
+
+/* tabs at the bottom */
+.tab {
+ font-size:5px;<%-- needed to verticaly center icon image --%>
+ margin:0px;
+ padding:0px;
+ border-top:1px solid ThreeDShadow;
+ border-bottom:1px solid <%=data.isMozilla()?prefs.getToolbarBackground():"ThreeDShadow"%>;
+ cursor:default;
+}
+
+.pressed {
+ font-size:5px;<%-- needed to verticaly center icon image (on IE--%>
+ margin:0px;
+ padding:0px;
+ cursor:default;
+ background-color:<%=prefs.getViewBackground()%>;
+ border-top:1px solid <%=prefs.getViewBackground()%>;
+ border-bottom:1px solid ThreeDShadow;
+}
+
+.separator {
+ height:100%;
+ background-color:ThreeDShadow;
+ border-bottom:1px solid <%=prefs.getToolbarBackground()%>;
+}
+
+.separator_pressed {
+ height:100%;
+ background-color:ThreeDShadow;
+ border-top:1px solid <%=prefs.getViewBackground()%>;
+ border-bottom:1px solid <%=prefs.getToolbarBackground()%>;
+}
+
+A {
+ text-decoration:none;
+ vertical-align:middle;
+ height:16px;
+ width:16px;
+<%
+if (data.isIE()){
+%>
+ writing-mode:tb-rl; <%-- needed to verticaly center icon image on IE--%>
+<%
+} else {
+%>
+ display:block;<%-- needed to verticaly center icon image (remove extra pixels below) on Mozilla--%>
+<%
+}
+%>
+}
+
+IMG {
+ border:0px;
+ margin:0px;
+ padding:0px;
+ height:16px;
+ width:16px;
+}
+
+</style>
+
+<script language="JavaScript">
+
+var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var linksArray = new Array ("linktoc", "linksearch", "linklinks", "linkbookmarks");
+
+if (isMozilla) {
+ document.addEventListener('keydown', keyDownHandler, true);
+}
+else if (isIE){
+ document.onkeydown = keyDownHandler;
+}
+
+/**
+ * Returns the target node of an event
+ */
+function getTarget(e) {
+ var target;
+ if (isMozilla)
+ target = e.target;
+ else if (isIE)
+ target = window.event.srcElement;
+
+ return target;
+}
+
+<%
+for (int i=0; i<views.length; i++) {
+%>
+ var <%=views[i].getName()%> = new Image();
+ <%=views[i].getName()%>.src = "<%=views[i].getOnImage()%>";
+<%
+}
+%>
+
+var lastTab = "";
+/*
+ * Switch tabs.
+ */
+function showTab(tab)
+{
+ if (tab == lastTab)
+ return;
+
+ lastTab = tab;
+
+ // show the appropriate pressed tab
+ var buttons = document.body.getElementsByTagName("TD");
+ for (var i=0; i<buttons.length; i++)
+ {
+ if (buttons[i].id == tab) {
+ buttons[i].className = "pressed";
+ if (i > 0)
+ buttons[i-1].className = "separator_pressed";
+ if (i<buttons.length-1)
+ buttons[i+1].className = "separator_pressed";
+ } else if (buttons[i].className == "pressed") {
+ buttons[i].className = "tab";
+ if (i > 0)
+ if (i > 1 && buttons[i-2].id == tab)
+ buttons[i-1].className = "separator_pressed";
+ else
+ buttons[i-1].className = "separator";
+ if (i<buttons.length-1)
+ if (i<buttons.length-2 && buttons[i+2].id == tab)
+ buttons[i+1].className = "separator_pressed";
+ else
+ buttons[i+1].className = "separator";
+ }
+ }
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(e)
+{
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ if (key <37 || key > 39)
+ return true;
+
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return true;
+
+ var linkId="";
+ if (clickedNode.tagName == 'A')
+ linkId=clickedNode.id;
+ else if(clickedNode.tagName == 'TD')
+ linkId="link"+clickedNode.id;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+ if (key == 38 ) { // up arrow
+ if(linkId.length>4){
+ parent.showView(linkId.substring(4, linkId.length));
+ clickedNode.blur();
+ parent.frames.ViewsFrame.focus();
+ }
+ } else if (key == 39) { // Right arrow, expand
+ var nextLink=getNextLink(linkId);
+ if(nextLink!=null){
+ document.getElementById(nextLink).focus();
+ }
+ } else if (key == 37) { // Left arrow,collapse
+ var previousLink=getPreviousLink(linkId);
+ if(previousLink!=null){
+ document.getElementById(previousLink).focus();
+ }
+ }
+
+ return false;
+}
+
+function getNextLink(currentLink){
+ for(i=0; i<linksArray.length; i++){
+ if(currentLink==linksArray[i]){
+ if((i+1)<linksArray.length)
+ return linksArray[i+1];
+ }
+ }
+ return linksArray[0];
+}
+
+function getPreviousLink(currentLink){
+ for(i=0; i<linksArray.length; i++){
+ if(currentLink==linksArray[i]){
+ if(i>0)
+ return linksArray[i-1];
+ }
+ }
+ return linksArray[linksArray.length-1];
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>">
+
+ <table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%" valign="middle">
+ <tr>
+
+<%
+ for (int i=0; i<views.length; i++)
+ {
+ String title = ServletResources.getString(views[i].getName(), request);
+ if (i != 0) {
+%>
+ <td width="1px" class="separator"><div style="width:1px;height:1px;display:block;"></div></td>
+ <%-- div inside separator cell fixes top separator pixel that was not white on IE, or first separator not displayed when frame width happens to be even number of pixels --%>
+<%
+ }
+%>
+ <td title="<%=title%>"
+ align="center"
+ valign="middle"
+ class="tab"
+ id="<%=views[i].getName()%>"
+ onclick="parent.showView('<%=views[i].getName()%>')"
+ onmouseover="window.status='<%=title%>';return true;"
+ onmouseout="window.status='';">
+ <a href='javascript:parent.showView("<%=views[i].getName()%>");'
+ onclick='this.blur();return false;'
+ onmouseover="window.status='<%=title%>';return true;"
+ onmouseout="window.status='';"
+ id="link<%=views[i].getName()%>"
+ <%=views[i].getKey()==View.NO_SHORTCUT?"":"ACCESSKEY=\""+views[i].getKey()+"\""%>>
+ <img alt="<%=title%>"
+ title="<%=title%>"
+ src="<%=views[i].getOnImage()%>"
+ id="img<%=views[i].getName()%>"
+ height="16"
+ >
+ </a>
+ </td>
+<%
+ }
+%>
+
+ </tr>
+ </table>
+
+</body>
+</html>
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toc.js
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toc.js?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toc.js (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toc.js Sat Dec 16 08:21:01 2006
@@ -0,0 +1,607 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 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
+ *******************************************************************************/
+
+// Common scripts for IE and Mozilla.
+
+var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+
+var oldActive;
+var oldActiveClass = "";
+
+
+// Preload images
+// **********************************************************
+// Note: code moved into the jsp, for dynamic image preferences
+
+/**
+ * Returns the target node of an event
+ */
+function getTarget(e) {
+ var target;
+ if (isMozilla)
+ target = e.target;
+ else if (isIE)
+ target = window.event.srcElement;
+
+ return target;
+}
+
+/**
+ * Returns the next tree node "down" from current one
+ */
+function getNextDown(node)
+{
+ var a = getAnchorNode(node);
+ if (!a) return null;
+
+ // Try visible child first
+ var li = a.parentNode;
+ var ul = getChildNode(li, "UL");
+ if (ul && ul.className == "expanded")
+ return getDescendantNode(ul, "A");
+
+ // Try next sibling
+ var li_sib = getNextSibling(li);
+ if (li_sib != null)
+ return getDescendantNode(li_sib, "A");
+
+ // Try looking to parent's sibling
+ while(li_sib == null) {
+ var ul = li.parentNode;
+ li = ul.parentNode;
+ if (li.tagName != "LI") // reached the top, nothing else to do
+ return null;
+
+ li_sib = getNextSibling(li);
+ }
+
+ // found the next down sibling
+ return getDescendantNode(li_sib, "A");
+}
+
+/**
+ * Returns the next tree node "down" from current one
+ */
+function getNextUp(node)
+{
+ var a = getAnchorNode(node);
+ if (!a) return null;
+
+ // Get previous sibling first
+ var li = a.parentNode;
+ var li_sib = getPrevSibling(li);
+ if (li_sib != null) {
+ // try to get the deepest node that preceeds this current node
+ var candidate = getDescendantNode(li_sib, "A");
+ var nextDown = getNextDown(candidate);
+ while(nextDown != null && nextDown != node){
+ candidate = nextDown;
+ nextDown = getNextDown(nextDown);
+ }
+ return getDescendantNode(candidate, "A"); ;
+ } else {
+ // get the parent
+ var li = li.parentNode.parentNode;
+ if (li && li.tagName == "LI")
+ return getDescendantNode(li, "A");
+ else
+ return null;
+ }
+}
+
+/**
+ * Returns the next sibling element
+ */
+function getNextSibling(node)
+{
+ var sib = node.nextSibling;
+ while (sib && (sib.nodeType == 3 || sib.tagName=="SCRIPT")) // text or script node
+ sib = sib.nextSibling;
+ return sib;
+}
+
+/**
+ * Returns the next sibling element
+ */
+function getPrevSibling(node)
+{
+ var sib = node.previousSibling;
+ while (sib && (sib.nodeType == 3 || sib.tagName=="SCRIPT")) // text or script node
+ sib = sib.previousSibling;
+ return sib;
+}
+
+
+/**
+ * Returns the child node with specified tag
+ */
+function getChildNode(parent, childTag)
+{
+ var list = parent.childNodes;
+ if (list == null) return null;
+ for (var i=0; i<list.length; i++)
+ if (list.item(i).tagName == childTag)
+ return list.item(i);
+ return null;
+}
+
+/**
+ * Returns the descendat node with specified tag (depth-first searches)
+ */
+function getDescendantNode(parent, childTag)
+{
+ if (parent == null) return null;
+
+ if (parent.tagName == childTag)
+ return parent;
+
+ var list = parent.childNodes;
+ if (list == null) return null;
+ for (var i=0; i<list.length; i++) {
+ var child = list.item(i);
+ if(child.tagName == childTag)
+ return child;
+
+ child = getDescendantNode(child, childTag);
+ if (child != null)
+ return child;
+ }
+ return null;
+}
+
+
+/**
+ * Returns the anchor of this click
+ * NOTE: MOZILLA BUG WITH A:focus and A:active styles
+ */
+function getAnchorNode(node) {
+ if (node == null) return null;
+
+ if (node.nodeType == 3) //"Node.TEXT_NODE")
+ return node.parentNode;
+ else if (node.tagName == "A")
+ return node;
+ else if (node.tagName == "IMG")
+ return getChildNode(node.parentNode, "A");
+ return null;
+}
+
+/**
+ * Returns the plus/minus icon for this tree node
+ */
+function getPlusMinus(node)
+{
+ if (isPlusMinus(node))
+ return node;
+ else if (node.nodeType == 3) //"Node.TEXT_NODE")
+ return getChildNode(node.parentNode.parentNode, "IMG");
+ else if (node.tagName == "IMG")
+ return getChildNode(node.parentNode.parentNode, "IMG");
+ else if (node.tagName == "A")
+ return getChildNode(node.parentNode, "IMG");
+
+ return null;
+}
+
+
+/**
+ * Returns true when the node is the plus or minus icon
+ */
+function isPlusMinus(node)
+{
+ return (node.nodeType != 3 && node.tagName == "IMG" && (node.className == "expanded" || node.className == "collapsed"));
+}
+
+/**
+ * Collapses a tree rooted at the specified element
+ */
+function collapse(node) {
+ node.className = "collapsed";
+ node.src = plus.src;
+ node.alt = altTopicClosed;
+ // set the UL as well
+ var ul = getChildNode(node.parentNode, "UL");
+ if (ul != null) ul.className = "collapsed";
+}
+
+/**
+ * Expands a tree rooted at the specified element
+ */
+function expand(node) {
+ node.className = "expanded";
+ node.src = minus.src;
+ node.alt = altTopicOpen;
+ // set the UL as well
+ var ul = getChildNode(node.parentNode, "UL");
+ if (ul != null){
+ ul.className = "expanded";
+ if (ul.id.length > 0){
+ if (!frames.dynLoadFrame) {
+ return;
+ }
+ var ix = window.location.href.indexOf('?');
+ if (ix < 0) {
+ return;
+ }
+ var query = window.location.href.substr(ix);
+ frames.dynLoadFrame.location = "tocFragment.jsp" + query + "&path=" + ul.id;
+ }
+ }
+}
+
+/**
+ * Expands the nodes from root to the specified node
+ */
+function expandPathTo(node, inclusive)
+{
+ // when the node is a link, get the plus/minus image
+ if (node.tagName == "A")
+ {
+ var img = getChildNode(node.parentNode, "IMG")
+ if (img == null) return;
+ expandPathTo(img, inclusive);
+ return;
+ }
+
+ if (inclusive && isCollapsed(node))
+ expand(node);
+
+ var li = node.parentNode;
+ if (li == null) return;
+ var ul = li.parentNode;
+ if (ul == null) return;
+ li = ul.parentNode;
+ if (li == null) return;
+ var img = getChildNode(li, "IMG");
+ if (img == null) return;
+
+ expandPathTo(img, true);
+}
+
+/**
+ * Returns true when this is an expanded tree node
+ */
+function isExpanded(node) {
+ return node.className == "expanded";
+}
+
+/**
+ * Returns true when this is a collapsed tree node
+ */
+function isCollapsed(node) {
+ return node.className == "collapsed";
+}
+
+/**
+ * Highlights link
+ */
+function highlightTopic(topic)
+{
+ if (isMozilla)
+ window.getSelection().removeAllRanges();
+
+ var a = getAnchorNode(topic);
+ if (a != null)
+ {
+ parent.parent.parent.setContentToolbarTitle(tocTitle);
+ if (oldActive)
+ oldActive.className = oldActiveClass;
+
+ oldActive = a;
+ oldActiveClass = a.className;
+ a.className = "active";
+ // it looks like the onclick event is not handled in mozilla
+ // *** TO DO: handle failed synchronization, do not select in that case
+ if (isMozilla && a.onclick)
+ a.onclick()
+ //if (isIE)
+ // a.hideFocus = "true";
+ }
+}
+
+/**
+ * Selects a topic in the tree: expand tree and highlight it
+ * returns true if success
+ */
+function selectTopic(topic)
+{
+ if (!topic)
+ return false;
+
+ // remove the query, if any
+ var i = topic.indexOf('?');
+ if (i != -1)
+ topic = topic.substring(0, i);
+
+ var links = document.getElementsByTagName("a");
+
+ for (var i=0; i<links.length; i++)
+ {
+ if (topic == links[i].href)
+ {
+ expandPathTo(links[i], false);
+ highlightTopic(links[i]);
+ scrollIntoView(links[i]);
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Selects a topic in the tree: expand tree and highlight it
+ * returns true if success
+ */
+function selectTopicById(id)
+{
+ var topic = document.getElementById(id);
+ if (topic)
+ {
+ expandPathTo(topic, false);
+ highlightTopic(topic);
+ scrollIntoView(topic);
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Scrolls the page to show the specified element
+ */
+function scrollIntoView(node)
+{
+ var scroll = getVerticalScroll(node);
+ if (scroll != 0)
+ window.scrollBy(0, scroll);
+}
+
+/**
+ * Scrolls the page to show the specified element
+ */
+function getVerticalScroll(node)
+{
+ var nodeTop = node.offsetTop;
+ var nodeBottom = nodeTop + node.offsetHeight;
+ var pageTop = 0;
+ var pageBottom = 0;
+
+ if (isIE)
+ {
+ pageTop = document.body.scrollTop;
+ pageBottom = pageTop + document.body.clientHeight;
+
+ }
+ else if (isMozilla)
+ {
+ pageTop = window.pageYOffset;
+ pageBottom = pageTop + window.innerHeight - node.offsetHeight;
+ }
+
+ var scroll = 0;
+ if (nodeTop >= pageTop )
+ {
+ if (nodeBottom <= pageBottom)
+ scroll = 0; // already in view
+ else
+ scroll = nodeBottom - pageBottom;
+ }
+ else
+ {
+ scroll = nodeTop - pageTop;
+ }
+
+ return scroll;
+}
+
+/*
+ * Currently called on IE only
+ */
+function focusHandler(e)
+{
+ /*if (isMozilla)
+ return;
+ */
+
+ try{
+ if (oldActive){
+ // only focus when the element is visible
+ var scroll = getVerticalScroll(oldActive);
+ if (scroll == 0)
+ oldActive.focus();
+ }
+ }
+ catch(e){}
+}
+
+
+/**
+ * display topic label in the status line on mouse over topic
+ */
+function mouseMoveHandler(e) {
+ var overNode = getTarget(e);
+ if (!overNode) return;
+
+ overNode = getAnchorNode(overNode);
+ if (overNode == null){
+ window.status = "";
+ return;
+ }
+
+ if (isMozilla)
+ e.cancelBubble = false;
+
+ if (overNode.title == "") {
+ if (overNode.innerText)
+ overNode.title = overNode.innerText;
+ else if (overNode.text)
+ overNode.title = overNode.text;
+ }
+ window.status = overNode.title;
+}
+
+/**
+ * handler for expanding / collapsing topic tree
+ */
+function mouseClickHandler(e) {
+
+ var clickedNode = getTarget(e);
+
+ if (isPlusMinus(clickedNode) )
+ {
+ if (isCollapsed(clickedNode))
+ expand(clickedNode);
+ else if (isExpanded(clickedNode))
+ collapse(clickedNode);
+ }
+ else
+ {
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ highlightTopic(plus_minus);
+ }
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+}
+
+/**
+ * handler for expanding / collapsing topic tree
+ */
+function mouseDblClickHandler(e) {
+
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ {
+ if (isCollapsed(plus_minus))
+ expand(plus_minus);
+ else if (isExpanded(plus_minus))
+ collapse(plus_minus);
+
+ highlightTopic(plus_minus);
+ }
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(e)
+{
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ if (key <37 || key > 40)
+ return true;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+
+ if (key == 39) { // Right arrow, expand
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+ if (isIE){
+ if(clickedNode.id!=null){
+ if(clickedNode.id.charAt(0)=='b'){
+ if(clickedNode.name!="opened"){
+ loadTOC(clickedNode.name);
+ return true;
+ }
+ }
+ }
+ }
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ {
+ if (isCollapsed(plus_minus))
+ expand(plus_minus);
+
+ highlightTopic(plus_minus);
+ scrollIntoView(clickedNode);
+ }
+ } else if (key == 37) { // Left arrow,collapse
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ if(clickedNode.id!=null){
+ if(clickedNode.id.charAt(0)=='b'){
+ if(clickedNode.name=="opened"){
+ loadTOC(" ");
+ return true;
+ }
+ else{
+ return true;
+ }
+ }
+
+ }
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ {
+ if (isExpanded(plus_minus))
+ collapse(plus_minus);
+
+ highlightTopic(plus_minus);
+ scrollIntoView(clickedNode);
+ }
+ } else if (key == 40 ) { // down arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextDown(clickedNode);
+ if (next)
+ next.focus();
+
+ } else if (key == 38 ) { // up arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextUp(clickedNode);
+ if (next)
+ next.focus();
+ }
+
+
+ return true;
+}
+
+if (isMozilla) {
+ document.addEventListener('click', mouseClickHandler, true);
+ document.addEventListener('dblclick', mouseDblClickHandler, true);
+ document.addEventListener('mousemove', mouseMoveHandler, true);
+ document.addEventListener('keydown', keyDownHandler, true);
+}
+else if (isIE){
+ document.onclick = mouseClickHandler;
+ document.ondblclick = mouseDblClickHandler;
+ document.onmousemove = mouseMoveHandler;
+ document.onkeydown = keyDownHandler;
+ //window.onfocus = focusHandler;
+}
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocFragment.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocFragment.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocFragment.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocFragment.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,54 @@
+<%--
+ Copyright (c) 2000, 2004 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"%>
+<%
+ TocData data = new TocData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString("partialContent", request)%></title>
+<script language="JavaScript">
+plus = new Image();
+plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
+folder_img = new Image();
+folder_img.src = "<%=prefs.getImagesDirectory()%>"+"/container_obj.gif";
+topic_img = new Image();
+topic_img.src = "<%=prefs.getImagesDirectory()%>"+"/topic.gif";
+
+function onloadHandler()
+{
+ var fragment = null;
+ for (var i=0; i < document.body.childNodes.length; i++)
+ if (document.body.childNodes[i].nodeName == "UL"){
+ fragment = document.body.childNodes[i];
+ break;
+ }
+ if(fragment == null) return;
+ var path = fragment.id;
+ var oldFragment = window.parent.document.getElementById(path);
+ oldFragment.innerHTML = fragment.innerHTML;
+ oldFragment.id = "";
+}
+</script>
+</head>
+<body dir="<%=direction%>" onload="onloadHandler()">
+<%
+ int toc=data.getSelectedToc();
+ // Only generate the selected toc
+ if (toc != -1 && data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc)))
+ {
+ data.generateToc(toc, out);
+ }
+%>
+</body>
+</html>
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocToolbar.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocToolbar.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocToolbar.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocToolbar.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,30 @@
+<%--
+ Copyright (c) 2000, 2004 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"%>
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="navActions.js"/>
+ <jsp:param name="view" value="toc"/>
+
+ <jsp:param name="name" value="show_all"/>
+ <jsp:param name="tooltip" value='show_all'/>
+ <jsp:param name="image" value="show_all.gif"/>
+ <jsp:param name="action" value="toggleShowAll"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value="<%=(new ActivitiesData(application, request, response)).getButtonState()%>"/>
+
+ <jsp:param name="name" value="synchnav"/>
+ <jsp:param name="tooltip" value='SynchNav'/>
+ <jsp:param name="image" value="synch_nav.gif"/>
+ <jsp:param name="action" value="resynchNav"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value="off"/>
+</jsp:include>
\ No newline at end of file
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocView.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocView.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocView.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocView.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,218 @@
+<%--
+ Copyright (c) 2000, 2004 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"%>
+
+<%
+ TocData data = new TocData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Content", request)%></title>
+
+<style type="text/css">
+<%@ include file="tree.css"%>
+</style>
+
+<base target="ContentViewFrame">
+<script language="JavaScript">
+
+// Preload images
+minus = new Image();
+minus.src = "<%=prefs.getImagesDirectory()%>"+"/minus.gif";
+plus = new Image();
+plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
+toc_open_img = new Image();
+toc_open_img.src = "<%=prefs.getImagesDirectory()%>"+"/toc_open.gif";
+toc_closed_img = new Image();
+toc_closed_img.src = "<%=prefs.getImagesDirectory()%>"+"/toc_closed.gif";
+folder_img = new Image();
+folder_img.src = "<%=prefs.getImagesDirectory()%>"+"/container_obj.gif";
+topic_img = new Image();
+topic_img.src = "<%=prefs.getImagesDirectory()%>"+"/topic.gif";
+altTopicClosed = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("topicClosed", request))%>";
+altTopicOpen = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("topicOpen", request))%>";
+</script>
+
+<script language="JavaScript" src="toc.js"></script>
+<script language="JavaScript">
+
+/**
+ * Loads the specified table of contents
+ */
+function loadTOC(tocHref)
+{
+ // navigate to this toc, if not already loaded
+ if (window.location.href.indexOf("tocView.jsp?toc="+tocHref) != -1)
+ return;
+ window.location.replace("tocView.jsp?toc="+tocHref);
+}
+
+var tocTitle = "";
+var tocId = "";
+
+function onloadHandler()
+{
+<%
+ if (data.getSelectedToc() != -1)
+ {
+%>
+ tocTitle = '<%=UrlUtil.JavaScriptEncode(data.getTocLabel(data.getSelectedToc()))%>';
+ var tocTopic = "<%=data.getTocDescriptionTopic(data.getSelectedToc())%>";
+
+ // set title on the content toolbar
+ parent.parent.parent.setContentToolbarTitle(tocTitle);
+
+ var topicSelected=false;
+ // select specified topic, or else the book
+ var topic = "<%=data.getSelectedTopic()%>";
+ if (topic != "about:blank" && topic != tocTopic) {
+ if (topic.indexOf(window.location.protocol) != 0 && topic.length > 2) {
+ // remove the .. from topic
+ topic = topic.substring(2);
+ // remove advanced/tocView.jsp from path to obtain contextPath
+ var contextPath = window.location.pathname;
+ var slash = contextPath.lastIndexOf('/');
+ if(slash > 0) {
+ slash = contextPath.lastIndexOf('/', slash-1);
+ if(slash >= 0) {
+ contextPath = contextPath.substr(0, slash);
+ topic = window.location.protocol + "//" +window.location.host + contextPath + topic;
+ }
+ }
+ }
+ topicSelected = selectTopic(topic);
+ } else {
+ topicSelected = selectTopicById(tocId);
+ }
+<%
+ // if topic failed to be selected, but we know it exist in some book,
+ // offer to turn on "show all"
+
+ // do not offer to show all just after it was manually turned off
+ if (null==request.getParameter("showAll")) {
+%>
+ if(!topicSelected){
+ if(parent.parent.activityFiltering){
+ askShowAll();
+ }
+ }
+<%
+ }
+%>
+<%
+ } else if ("yes".equals(request.getParameter("synch"))) {
+%>
+ var message='<%=UrlUtil.JavaScriptEncode(ServletResources.getString("CannotSync", request))%>';
+ // when we don't find the specified toc, we just restore navigation
+ parent.parent.parent.restoreNavigation(message);
+<%
+ }
+%>
+ focusHandler("e");
+}
+
+var askShowAllDialog;
+var w = 470;
+var h = 270;
+
+function askShowAll(){
+<%
+if (data.isIE()){
+%>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+<%
+} else {
+%>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+<%
+}
+%>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+
+ window.location="javascript://needModal";
+ askShowAllDialog = window.open("askShowAll.jsp", "askShowAllDialog", "resizeable=no,height="+h+",width="+w+",left="+l+",top="+t );
+ askShowAllDialog.focus();
+}
+
+function yesShowAll(){
+ window.parent.parent.showAll();
+}
+
+function closeAskShowAllDialog(){
+ try {
+ if (askShowAllDialog){
+ askShowAllDialog.close();
+ }
+ }
+ catch(e) {}
+}
+
+function onunloadHandler() {
+ closeAskShowAllDialog();
+<%
+// for large books, we want to avoid a long unload time
+if (data.isIE()){
+%>
+ document.body.innerHTML = "";
+<%
+}
+%>
+}
+
+</script>
+</head>
+
+
+<body dir="<%=direction%>" onload="onloadHandler()" onunload="onunloadHandler()">
+ <ul dir="<%=direction%>" class='expanded' id='root'>
+<%
+ for (int toc=0; toc<data.getTocCount(); toc++) {
+ boolean isSelected =data.getSelectedToc() != -1 &&
+ data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc));
+ if(!data.isEnabled(toc)){
+ // do not show
+ continue;
+ }
+ if(isSelected) {
+%>
+ <li>
+ <img src="<%=prefs.getImagesDirectory()%>/toc_open.gif" alt="<%=ServletResources.getString("bookOpen", request)%>"><a id="b<%=toc%>" name="opened" style="font-weight: bold;" href="<%=data.getTocDescriptionTopic(toc)%>" onclick=''><%=data.getTocLabel(toc)%></a>
+<%
+ // Only generate the selected toc
+ data.generateToc(toc, out);
+ // keep track of the selected toc id
+%>
+ <script language="JavaScript">tocId="b"+<%=toc%></script>
+<%
+ } else {
+%>
+ <li>
+ <img src="<%=prefs.getImagesDirectory()%>/toc_closed.gif" alt="<%=ServletResources.getString("bookClosed", request)%>"><a id="b<%=toc%>" name="<%=data.getTocHref(toc)%>" style="font-weight: bold;" href="<%=data.getTocDescriptionTopic(toc)%>" onclick='loadTOC("<%=data.getTocHref(toc)%>")'><%=data.getTocLabel(toc)%></a>
+<%
+ }
+%>
+ </li>
+<%
+ }
+%>
+ </ul>
+ <iframe name="dynLoadFrame" title="<%=ServletResources.getString("ignore", "dynLoadFrame", request)%>" style="visibility:hidden" tabindex="-1" frameborder="no" width="0" height="0" scrolling="no">
+ </iframe>
+</body>
+</html>
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toolbar.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toolbar.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toolbar.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toolbar.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,328 @@
+<%--
+ Copyright (c) 2000, 2004 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"%>
+
+<%
+ ToolbarData data = new ToolbarData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Toolbar", request)%></title>
+
+<style type="text/css">
+
+/* need this one for Mozilla */
+HTML {
+ margin:0px;
+ padding:0px;
+}
+
+BODY {
+ background:<%=prefs.getToolbarBackground()%>;
+}
+
+#titleText {
+ font-weight:bold;
+ color:WindowText;
+}
+
+.buttonOn a {
+ display:block;
+ margin-left:2px;
+ margin-right:2px;
+ width:<%=data.isMozilla()?18:20%>px;
+ height:<%=data.isMozilla()?18:20%>px;
+ border:1px solid Highlight;
+ writing-mode:tb-rl;
+ vertical-align:middle;
+ background: <%=prefs.getViewBackground()%>;
+}
+
+.button a {
+ display:block;
+ margin-left:2px;
+ margin-right:2px;
+ width:<%=data.isMozilla()?18:20%>px;
+ height:<%=data.isMozilla()?18:20%>px;
+ border:1px solid <%=prefs.getToolbarBackground()%>;
+ writing-mode:tb-rl;
+ vertical-align:middle;
+}
+
+.button a:hover {
+ border-top:1px solid ButtonHighlight;
+ border-<%=isRTL?"right":"left"%>:1px solid ButtonHighlight;
+ border-<%=isRTL?"left":"right"%>:1px solid ButtonShadow;
+ border-bottom:1px solid ButtonShadow;
+}
+
+<% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
+// maximize (last) button should not jump
+%>
+#b<%=data.getButtons().length-1%>:hover{
+ border:1px solid <%=prefs.getToolbarBackground()%>;
+}
+<%}%>
+
+.separator {
+ background-color: ThreeDShadow;
+ height:100%;
+ width: 1px;
+ border-top:2px solid <%=prefs.getToolbarBackground()%>;
+ border-bottom:2px solid <%=prefs.getToolbarBackground()%>;
+ border-left:3px solid <%=prefs.getToolbarBackground()%>;
+ border-right:3px solid <%=prefs.getToolbarBackground()%>;
+
+}
+
+#container {
+ border-bottom:1px solid ThreeDShadow;
+<%
+if (data.isIE()) {
+%>
+<%
+}else if (data.isMozilla()){
+%>
+ border-top:1px solid ThreeDShadow;
+ height:24px;
+<%
+}
+%>
+}
+
+<%
+// workaround for adding right border on mozilla (ugly..)
+if (data.isMozilla() && "content".equals(request.getParameter("toolbar"))) {
+%>
+
+/* need this one for Mozilla */
+HTML {
+ margin:0px;
+ padding:0px;
+}
+<%
+}
+%>
+
+</style>
+
+<script language="JavaScript">
+
+var bRestore = false;
+// Preload images
+<%
+ToolbarButton[] buttons = data.getButtons();
+for (int i=0; i<buttons.length; i++) {
+ if (!buttons[i].isSeparator()) {
+%>
+ var <%=buttons[i].getName()%> = new Image();
+ <%=buttons[i].getName()%>.src = "<%=buttons[i].getOnImage()%>";
+<%
+ }
+}
+%>
+
+function setTitle(label)
+{
+ if( label == null) label = "";
+ var title = document.getElementById("titleText");
+ if (title == null) return;
+ var text = title.lastChild;
+ if (text == null) return;
+ text.nodeValue = label;
+}
+
+<% if (data.isIE()
+ || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0
+ || (data.isSafari() && "120".compareTo(data.getSafariVersion()) <= 0) ){
+%>
+function registerMaximizedChangedListener(){
+ // get to the frameset
+ var p = parent;
+ while (p && !p.registerMaximizeListener)
+ p = p.parent;
+
+ if (p!= null){
+ p.registerMaximizeListener('<%=data.getName()%>Toolbar', maximizedChanged);
+ }
+}
+registerMaximizedChangedListener();
+
+/**
+ * Handler for double click: maximize/restore this view
+ * Note: Mozilla browsers prior to 1.2.1 do not support programmatic frame resizing well.
+ */
+function mouseDblClickHandler(e) {
+ // ignore double click on buttons
+ var target=<%=data.isIE()?"window.event.srcElement":"e.target"%>;
+ if (target.tagName && (target.tagName == "A" || target.tagName == "IMG"))
+ return;
+ toggleFrame();
+ return false;
+}
+function restore_maximize(button)
+{
+ toggleFrame();
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+function toggleFrame(){
+ // get to the frameset
+ var p = parent;
+ while (p && !p.toggleFrame)
+ p = p.parent;
+
+ if (p!= null){
+ p.toggleFrame('<%=data.getTitle()%>');
+ }
+ document.selection.clear;
+}
+
+function maximizedChanged(maximizedNotRestored){
+ if(maximizedNotRestored){
+ document.getElementById("maximize_restore").src="<%=data.getRestoreImage()%>";
+ document.getElementById("maximize_restore").setAttribute("title", "<%=data.getRestoreTooltip()%>");
+ document.getElementById("maximize_restore").setAttribute("alt", "<%=data.getRestoreTooltip()%>");
+ bRestore = true;
+ }else{
+ document.getElementById("maximize_restore").src="<%=data.getMaximizeImage()%>";
+ document.getElementById("maximize_restore").setAttribute("title", "<%=data.getMaximizeTooltip()%>");
+ document.getElementById("maximize_restore").setAttribute("alt", "<%=data.getMaximizeTooltip()%>");
+ bRestore = false;
+ }
+}
+
+<%=( data.isIE() || data.isSafari() )?
+ "document.ondblclick = mouseDblClickHandler;"
+:
+ "document.addEventListener('dblclick', mouseDblClickHandler, true);"%>
+<%}%>
+
+function setButtonState(buttonName, pressed) {
+ if(!document.getElementById("tdb_"+buttonName))
+ return;
+ if(pressed){
+ document.getElementById("tdb_"+buttonName).className="buttonOn";
+ }else{
+ document.getElementById("tdb_"+buttonName).className="button";
+ }
+}
+
+function setWindowStatus(buttonName){
+ <%
+ for (int i=0; i<buttons.length; i++) {
+ String name = buttons[i].getName();%>
+ if (buttonName == "<%=name%>"){
+ if (buttonName == "maximize_restore"){
+ if (bRestore){
+ window.status = "<%=data.getRestoreTooltip()%>";
+ }else{
+ window.status = "<%=data.getMaximizeTooltip()%>";
+ }
+ }else{
+ window.status = "<%=buttons[i].getTooltip()%>";
+ }
+ }
+ <%
+ }
+ %>
+}
+</script>
+
+<%
+if (data.getScript() != null) {
+%>
+<script language="JavaScript" src="<%=data.getScript()%>"></script>
+<%
+}
+%>
+
+</head>
+
+<%
+if(buttons.length > 0){
+%>
+ <body dir="<%=direction%>">
+<%
+}else{
+%>
+ <body dir="<%=direction%>" tabIndex="-1">
+<%
+}
+%>
+
+<table id="container" width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" style='padding-<%=isRTL?"right":"left"%>:<%=data.isIE()?"5px":"8px"%>;'>
+
+ <tr>
+ <td nowrap style="font: <%=prefs.getToolbarFont()%>" valign="middle">
+ <div id="titleTextTableDiv" style="overflow:hidden; height:22px;"><table><tr><td nowrap style="font:<%=prefs.getToolbarFont()%>"><div id="titleText" > <%=data.getTitle()%></div></td></tr></table>
+ </div>
+
+
+ <div style="position:absolute; top:1px; <%=isRTL?"left":"right"%>:0px;">
+ <table width="100%" border="0" cellspacing="1" cellpadding="0" height="100%">
+ <tr>
+ <td align="<%=isRTL?"left":"right"%>">
+ <table align="<%=isRTL?"left":"right"%>" border="0" cellspacing="0" cellpadding="0" height="100%" style="background:<%=prefs.getToolbarBackground()%>">
+ <tr>
+<%
+ for (int i=0; i<buttons.length; i++) {
+ if (buttons[i].isSeparator()) {
+%>
+ <td align="middle" class="separator" valign="middle">
+ </td>
+<%
+ } else {
+%>
+ <td align="middle" id="tdb_<%=buttons[i].getName()%>" class="<%=buttons[i].isOn()?"buttonOn":"button"%>" height=18>
+ <a href="javascript:<%=buttons[i].getAction()%>('b<%=i%>', '<%=buttons[i].getParam()%>');"
+ onmouseover="javascript:setWindowStatus('<%=buttons[i].getName()%>');return true;"
+ onmouseout="window.status='';"
+ id="b<%=i%>">
+ <img src="<%=buttons[i].getOnImage()%>"
+ alt='<%=buttons[i].getTooltip()%>'
+ title='<%=buttons[i].getTooltip()%>'
+ border="0"
+ id="<%=buttons[i].getName()%>">
+ </a>
+ </td>
+<%
+ }
+ }
+%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+</table>
+
+<%// special case for content toolbar - internally used live help frame
+if ("content".equals(request.getParameter("toolbar"))) {
+%>
+ <iframe name="liveHelpFrame" title="<%=ServletResources.getString("ignore", "liveHelpFrame", request)%>" style="visibility:hidden" tabindex="-1" frameborder="no" width="0" height="0" scrolling="no">
+ </iframe>
+<%
+}
+%>
+
+</body>
+</html>
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tree.css
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tree.css?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tree.css (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tree.css Sat Dec 16 08:21:01 2006
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 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
+ *******************************************************************************/
+
+BODY {
+ background-color: <%=prefs.getViewBackground()%>;
+ font: <%=prefs.getViewFont()%>;
+ margin:0;
+ padding:0;
+ border:0;
+}
+
+UL {
+ border-width:0;
+ margin-<%=isRTL?"right":"left"%>:20px;
+}
+
+#root {
+ margin-top:5px;
+ margin-<%=isRTL?"right":"left"%>:5px;
+}
+
+UL.expanded {
+ display:block;
+}
+
+UL.collapsed {
+ display: none;
+}
+
+LI {
+ margin-top:3px;
+ list-style-image:none;
+ list-style-type:none;
+ white-space: nowrap;
+}
+
+IMG {
+ border:0px;
+ margin:0px;
+ padding:0px;
+ margin-<%=isRTL?"left":"right"%>:4px;
+}
+
+
+A {
+ text-decoration:none;
+ color:WindowText;
+ padding-<%=isRTL?"left":"right"%>:2px;
+ /* this works in ie5.5, but not in ie5.0 */
+ white-space: nowrap;
+}
+
+A:hover{
+ text-decoration:underline;
+}
+
+A.active{
+ background:Highlight;
+ color:HighlightText;
+ width:100%;
+}
+
+A.active:hover{
+ text-decoration:underline;
+ background:Highlight;
+ color:HighlightText;
+ width:100%;
+}
+
+<%
+if (data.isMozilla()){
+%>
+UL {
+ margin-<%=isRTL?"right":"left"%>:-20px;
+}
+#root{
+ margin-<%=isRTL?"right":"left"%>:-35px;
+ margin-top:5px;
+}
+
+<%
+}
+%>
+
+.h {
+ visibility:hidden;
+}
+
\ No newline at end of file
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/view.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/view.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/view.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/view.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,49 @@
+<%--
+ Copyright (c) 2000, 2004 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="fheader.jsp"%>
+
+<%
+ new ActivitiesData(application, request, response); // here it can turn filtering on or off
+ LayoutData data = new LayoutData(application,request, response);
+ View view = data.getCurrentView();
+ if (view == null) return;
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString(view.getName(), request)%></title>
+
+<script language="JavaScript">
+
+function onloadHandler(e)
+{
+<% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
+%> var h=window.<%=view.getName()%>ToolbarFrame.document.getElementById("titleText").offsetHeight; <%-- default 13 --%>
+ if(h<=19){
+ return; <%-- no need to resize up to 19px --%>
+ }
+ document.getElementById("viewFrameset").setAttribute("rows", (11+h)+",*"); <%-- default 24 --%>
+ window.<%=view.getName()%>ToolbarFrame.document.getElementById("titleTextTableDiv").style.height=(9+h)+"px"; <%-- default 22 --%>
+<%}%>
+}
+</script>
+
+</head>
+
+<frameset id="viewFrameset" onload="onloadHandler()" rows="24,*" frameborder="0" framespacing="0" border=0 >
+ <frame id="toolbar" name="<%=view.getName()%>ToolbarFrame" title="<%=ServletResources.getString(view.getName()+"ViewToolbar", request)%>" src='<%=view.getURL()+view.getName()+"Toolbar.jsp"%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+ <frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" src='<%=view.getURL()+view.getName()+"View.jsp?"+request.getQueryString()%>' marginwidth="10" marginheight="0" frameborder="0" >
+</frameset>
+
+</html>
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/views.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/views.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/views.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/views.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,221 @@
+<%--
+ Copyright (c) 2000, 2006 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"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+ View[] views = data.getViews();
+%>
+
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+<title><%=ServletResources.getString("Views", request)%></title>
+
+<style type="text/css">
+
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ margin:0px;
+ padding:0px;
+ /* Mozilla does not like width:100%, so we set height only */
+ height:100%;
+}
+
+IFRAME {
+ width:100%;
+ height:100%;
+}
+
+.hidden {
+ visibility:hidden;
+ width:0;
+ height:0;
+}
+
+.visible {
+ visibility:visible;
+ width:100%;
+ height:100%;
+}
+
+</style>
+
+<script language="Javascript">
+
+var lastView = "";
+/**
+ * Switches to specified view
+ */
+function showView(view)
+{
+ if (view == lastView)
+ return;
+
+ lastView = view;
+
+ // show appropriate frame
+ var iframes = parent.ViewsFrame.document.body.getElementsByTagName("IFRAME");
+ for (var i=0; i<iframes.length; i++)
+ {
+ if (iframes[i].id != view){
+ iframes[i].className = "hidden";
+ iframes[i].style.visibility="hidden";
+ }else{
+ iframes[i].className = "visible";
+ iframes[i].style.visibility="visible";
+ }
+ }
+}
+
+var activityFiltering = <%=(new ActivitiesData(application, request, response)).isActivityFiltering()?"true":"false"%>;
+var displayShowAllConfirmation = <%=prefs.isDontConfirmShowAll()?"false":"true"%>;
+var regExp=/&(showAll|synch)=(on|off|yes|no)/gi;
+function toggleShowAll(){
+ if(activityFiltering){
+ if( displayShowAllConfirmation ){
+ confirmShowAll();
+ }else{
+ showAll();
+ }
+ } else {
+ dontShowAll();
+ }
+}
+
+function dontAskAgain(){
+ displayShowAllConfirmation = false;
+}
+function showAll(){
+ var displayConfirmParam;
+ if(displayShowAllConfirmation){
+ displayConfirmParam="";
+ }else{
+ displayConfirmParam="&showconfirm=false";
+ }
+ activityFiltering=false;
+ try{
+ window.frames.toc.tocToolbarFrame.setButtonState("show_all", true);
+ }catch(ex) {}
+ try{
+ window.frames.index.indexToolbarFrame.setButtonState("show_all", true);
+ }catch(ex) {}
+ try{
+ window.frames.search.searchToolbarFrame.setButtonState("show_all", true);
+ }catch(ex) {}
+ try{
+ window.frames.toc.tocViewFrame.location.replace(window.frames.toc.tocViewFrame.location.href.replace(regExp, "")+"&showAll=on"+displayConfirmParam);
+ }catch(ex) {}
+ try{
+ window.frames.index.indexViewFrame.location.replace(window.frames.index.indexViewFrame.location.href.replace(regExp, "")+"&showAll=on"+displayConfirmParam);
+ }catch(ex) {}
+ try{
+ window.frames.search.searchViewFrame.location.replace(window.frames.search.searchViewFrame.location.href.replace(regExp, "")+"&showAll=on");
+ }catch(ex) {}
+}
+
+function dontShowAll(){
+ activityFiltering=true;
+ try{
+ window.frames.toc.tocToolbarFrame.setButtonState("show_all", false);
+ }catch(ex) {}
+ try{
+ window.frames.index.indexToolbarFrame.setButtonState("show_all", false);
+ }catch(ex) {}
+ try{
+ window.frames.search.searchToolbarFrame.setButtonState("show_all", false);
+ }catch(ex) {}
+ try{
+ window.frames.toc.tocViewFrame.location.replace(window.frames.toc.tocViewFrame.location.href.replace(regExp, "")+"&showAll=off");
+ }catch(ex) {}
+ try{
+ window.frames.index.indexViewFrame.location.replace(window.frames.index.indexViewFrame.location.href.replace(regExp, "")+"&showAll=off");
+ }catch(ex) {}
+ try{
+ window.frames.search.searchViewFrame.location.replace(window.frames.search.searchViewFrame.location.href.replace(regExp, "")+"&showAll=off");
+ }catch(ex) {}
+}
+
+var confirmShowAllDialog;
+var w = 470;
+var h = 240;
+
+function confirmShowAll()
+{
+<%
+if (data.isIE()){
+%>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+<%
+} else {
+%>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+<%
+}
+%>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+
+ window.location="javascript://needModal";
+ confirmShowAllDialog = window.open("confirmShowAll.jsp", "confirmShowAllDialog", "resizeable=no,height="+h+",width="+w+",left="+l+",top="+t );
+ confirmShowAllDialog.focus();
+}
+
+function closeConfirmShowAllDialog(){
+ try {
+ if (confirmShowAllDialog){
+ confirmShowAllDialog.close();
+ }
+ }
+ catch(e) {}
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" tabIndex="-1" onunload="closeConfirmShowAllDialog()">
+<%
+ for (int i=0; i<views.length; i++)
+ {
+ // normally we would hide the views first, but mozilla needs all iframes to be visible to load
+ // other frames
+ String className = data.getVisibleView().equals(views[i].getName()) || data.isMozilla() ? "visible" : "hidden";
+%>
+ <iframe frameborder="0"
+ class="<%=className%>"
+ name="<%=views[i].getName()%>"
+ title="<%=ServletResources.getString("ignore", views[i].getName(), request)%>"
+ id="<%=views[i].getName()%>"
+ src='<%="view.jsp?view="+views[i].getName()+(request.getQueryString()==null?"":("&"+request.getQueryString()))%>'>
+ </iframe>
+<%
+ }
+%>
+
+ <iframe frameborder="0" style="visibility:hidden" tabindex="-1" name="temp" id="temp" title="<%=ServletResources.getString("ignore", "temp", request)%>"></iframe>
+
+</body>
+</html>
+
Added: directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSet.jsp
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSet.jsp?view=auto&rev=487826
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSet.jsp (added)
+++ directory/sandbox/pamarcelot/ldapstudio/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSet.jsp Sat Dec 16 08:21:01 2006
@@ -0,0 +1,430 @@
+<%--
+ Copyright (c) 2000, 2004 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"%>
+
+<%
+ WorkingSetData data = new WorkingSetData(application, request, response);
+ TocData tocData = new TocData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<title><%=ServletResources.getString(data.isEditMode()?"EditWorkingSet":"NewWorkingSet", 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">
+
+/* need this one for Mozilla */
+HTML, BODY {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+BODY {
+ font: <%=prefs.getViewFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+ color: WindowText;
+}
+
+TABLE {
+ font:<%=prefs.getViewFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+}
+
+TD, TR {
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+
+#workingSet {
+ width:100%;
+ font:<%=prefs.getViewFont()%>;
+}
+
+#booksContainer {
+ background:Window;
+ color:WindowText;
+ border: 2px inset ThreeDHighlight;
+ margin:10px;
+ margin-top:2px;
+ padding-<%=isRTL?"right":"left"%>:5px;
+ overflow:auto;
+ height:350px;
+<%if (data.isIE()) {%>
+ width:100%;
+<%}%>
+}
+
+.book {
+ margin:0xp;
+ border:0px;
+ padding:0px;
+ white-space: nowrap;
+}
+
+.topic {
+ margin-<%=isRTL?"right":"left"%>:30px;
+ border:0px;
+ padding:0px;
+ white-space: nowrap;
+}
+
+BUTTON {
+ font:<%=prefs.getViewFont()%>;
+}
+
+.expanded {
+ display:block;
+}
+
+.collapsed {
+ display:none;
+}
+
+.grayed {
+ background-color: <%=prefs.getToolbarBackground()%>;
+}
+
+<%
+if (data.isMozilla()) {
+%>
+input[type="checkbox"] {
+ border:2px solid WindowText;
+ margin:0xp;
+ padding:0px;
+ height:12px;
+ width:12px;
+}
+
+.grayed {
+ background: <%=prefs.getToolbarBackground()%>;
+}
+<%
+}
+%>
+</style>
+
+<script language="JavaScript">
+
+// Preload images
+var minus = new Image();
+minus.src = "<%=prefs.getImagesDirectory()%>"+"/minus.gif";
+var plus = new Image();
+plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
+
+var oldName = '<%=data.isEditMode()?data.getWorkingSetName():""%>';
+var altBookClosed = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("bookClosed", request))%>";
+var altBookOpen = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("bookOpen", request))%>";
+
+function onloadHandler() {
+<%if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
+// buttons are not resized immediately on mozilla before 1.3
+%>
+ sizeButtons();
+<%}%>
+ document.getElementById("workingSet").focus();
+ enableOK();
+<%-- event handlers that call enableOK() are not invoked properly on Japanese --%>
+ setInterval("enableOK()", 250);
+
+}
+
+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 doSubmit()
+{
+ try
+ {
+ var workingSet = document.getElementById("workingSet").value;
+ if (!workingSet || workingSet == "")
+ return false;
+
+ var hrefs = getSelectedResources();
+ if (!hrefs || hrefs == "")
+ return false;
+
+ var query = "operation="+'<%=data.getOperation()%>'+"&workingSet="+encodeURIComponent(workingSet)+ hrefs+"&oldName="+encodeURIComponent(oldName);
+ window.opener.location.replace("workingSetManager.jsp?"+query);
+ window.opener.focus();
+ window.close();
+ } catch(ex) {alert("Error..." + ex.message)}
+}
+
+function getSelectedResources() {
+ var hrefs = "";
+ var inputs = document.getElementsByTagName("INPUT");
+ for (var i=0; i<inputs.length; i++)
+ {
+ if (inputs[i].type != "checkbox") continue;
+ if (inputs[i].checked == false) continue;
+ if (getGrayed(inputs[i])) continue;
+ if (isToc(inputs[i].name)) {
+ hrefs += "&hrefs="+encodeURIComponent(inputs[i].name);
+ } else if (!isParentTocSelected(inputs[i].name)) {
+ hrefs += "&hrefs="+encodeURIComponent(inputs[i].name);
+ }
+ }
+ return hrefs;
+}
+
+// Assumption: last character of a toc reference cannot be underscore _
+function isToc(name) {
+ return name.charAt(name.length-1) != "_";
+}
+
+function isParentTocSelected(name) {
+ var parentCheckbox = getParentCheckbox(name);
+ return (parentCheckbox.checked && !getGrayed(parentCheckbox));
+}
+
+function getParentCheckbox(name) {
+ var parentId = name.substring(0, name.lastIndexOf("_", name.length-2));
+ return document.getElementById(parentId);
+}
+
+function collapseOrExpand(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ var img = document.getElementById("img"+nodeId);
+ if (!node || !img) return;
+ if (node.className == "expanded") {
+ node.className = "collapsed";
+ img.src = plus.src;
+ img.alt = altBookClosed;
+ } else {
+ node.className = "expanded";
+ img.src = minus.src;
+ img.alt = altBookOpen;
+ }
+}
+
+function collapse(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ var img = document.getElementById("img"+nodeId);
+ if (!node || !img) return;
+ node.className = "collapsed";
+ img.src = plus.src;
+ img.alt = altBookClosed;
+}
+
+function expand(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ var img = document.getElementById("img"+nodeId);
+ if (!node || !img) return;
+ node.className = "expanded";
+ img.src = minus.src;
+ img.alt = altBookOpen;
+}
+
+function getParent(child) {
+ var id = child.name;
+ var parentId = id.substring(0, id.lastIndexOf("_", id.length-2));
+ return document.getElementById(parentId);
+}
+
+function updateParentState(checkbox,parentDiv) {
+
+ if (checkbox == null)
+ return;
+
+ var baseChildState = checkbox.checked;
+ var parent = getParent(checkbox);
+ if (parent == null)
+ return;
+
+ var allSameState = true;
+ var children = document.getElementById(parentDiv).getElementsByTagName("INPUT");
+ for (var i = children.length - 1; i >= 0; i--) {
+ if (children[i].checked != baseChildState ) {
+ allSameState = false;
+ break;
+ }
+ }
+
+ setGrayed(parent, !allSameState);
+ parent.checked = !allSameState || baseChildState;
+}
+
+function setSubtreeChecked(checkbox, parentDiv) {
+ var state = checkbox.checked;
+ var children = document.getElementById(parentDiv).getElementsByTagName("INPUT");
+ for (var i = children.length - 1; i >= 0; i--) {
+ var element = children[i];
+ if (state) {
+ element.checked = true;
+ } else {
+ element.checked = false;
+ }
+ }
+ setGrayed(checkbox, false);
+}
+
+function setGrayed(node, enableGray) {
+ if (enableGray)
+ node.className = "grayed";
+ else
+ node.className = "checkbox";
+}
+
+function getGrayed(node) {
+ return node.className == "grayed";
+}
+
+function isExpanded(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ if (node == null) return false;
+ return node.className == "expanded";
+}
+
+function isCollapsed(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ if (node == null) return false;
+ return node.className == "collapsed";
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(folderId, key, target)
+{
+ if (key != 37 && key != 39)
+ return true;
+
+ if (key == 39) { // Right arrow, expand
+ if (isCollapsed(folderId))
+ expand(folderId);
+ target.focus();
+ } else if (key == 37) { // Left arrow,collapse
+ if (isExpanded(folderId))
+ collapse(folderId);
+ var parentCheckbox = getParentCheckbox(target.name);
+ if (parentCheckbox != null)
+ parentCheckbox.focus();
+ else
+ target.focus();
+ }
+
+ return false;
+}
+
+function enableOK() {
+ var value = document.getElementById("workingSet").value;
+ if (!value || value.length == 0 || value.charAt(0) == " ")
+ document.getElementById("ok").disabled = true;
+ else
+ document.getElementById("ok").disabled = false;
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()">
+<form onsubmit="doSubmit();return false;">
+ <table id="wsTable" width="100%" cellspacing=0 cellpading=0 border=0 align=center >
+ <tr><td style="padding:5px 10px 0px 10px;"><label for="workingSet" accesskey="<%=ServletResources.getAccessKey("WorkingSetName", request)%>"><%=ServletResources.getLabel("WorkingSetName", request)%>:</label>
+ </td></tr>
+ <tr><td style="padding:0px 10px;"><input type="text" id="workingSet" name="workingSet" value='<%=data.isEditMode()?data.getWorkingSetName():""%>' maxlength=256 alt='<%=ServletResources.getString("WorkingSetName", request)%>' title='<%=ServletResources.getString("WorkingSetName", request)%>' onkeyup="enableOK();return true;">
+ </td></tr>
+ <tr><td><div id="selectBook" style="padding-top:5px; margin-<%=isRTL?"right":"left"%>:10px;"><%=ServletResources.getString("WorkingSetContent", request)%>:</div>
+ </td></tr>
+ </table>
+
+<div id="booksContainer" style="background:<%=prefs.getViewBackground()%>;">
+
+<%
+for (int i=0; i<data.getTocCount(); i++)
+{
+ if(!tocData.isEnabled(i)){
+ // do not show
+ continue;
+ }
+ String label = data.getTocLabel(i);
+ short state = data.getTocState(i);
+ String checked = state == WorkingSetData.STATE_CHECKED || state == WorkingSetData.STATE_GRAYED ? "checked" : "";
+ String className = state == WorkingSetData.STATE_GRAYED ? "grayed" : "checkbox";
+%>
+ <div class="book" id='<%="id"+i%>' >
+ <img id='<%="img"+i%>' alt="<%=ServletResources.getString("bookClosed", request)%>" src="<%=prefs.getImagesDirectory()%>/plus.gif" onclick="collapseOrExpand('<%=i%>')">
+ <input class='<%=className%>'
+ type="checkbox"
+ id='<%=data.getTocHref(i)%>'
+ name='<%=data.getTocHref(i)%>'
+ alt="<%=label%>" <%=checked%>
+ onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
+ onclick="setSubtreeChecked(this, '<%="div"+i%>')">
+ <label for="<%=data.getTocHref(i)%>"><%=label%></label>
+ <div id='<%="div"+i%>' class="collapsed">
+<%
+ for (int topic=0; topic<data.getTopicCount(i); topic++)
+ {
+ String topicLabel = data.getTopicLabel(i, topic);
+ String topicChecked = (state == WorkingSetData.STATE_CHECKED) ||
+ (state == WorkingSetData.STATE_GRAYED && data.getTopicState(i,topic) == WorkingSetData.STATE_CHECKED)
+ ? "checked" : "";
+%>
+ <div class="topic" id='<%="id"+i+"_"+topic%>'>
+ <input class="checkbox"
+ type="checkbox"
+ id='<%=data.getTocHref(i)+"_"+topic+"_"%>'
+ name='<%=data.getTocHref(i)+"_"+topic+"_"%>'
+ alt="<%=topicLabel%>" <%=topicChecked%>
+ onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
+ onclick="updateParentState(this, '<%="div"+i%>')">
+ <label for="<%=data.getTocHref(i)+"_"+topic+"_"%>"><%=topicLabel%></label>
+ </div>
+<%
+ }
+%>
+ </div>
+ </div>
+<%
+}
+%>
+
+</div>
+<div style="height:50px;">
+ <table valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <tr id="buttonsTable" valign="bottom"><td valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <table cellspacing=10 cellpading=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>
+