home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Eclipse SDK / eclipse-SDK-3.1.1-win32.exe / eclipse / plugins / org.eclipse.help.webapp_3.1.0 / advanced / help.jsp < prev    next >
Encoding:
Text File  |  2005-09-29  |  4.5 KB  |  151 lines

  1. <%--
  2.  Copyright (c) 2000, 2004 IBM Corporation and others.
  3.  All rights reserved. This program and the accompanying materials 
  4.  are made available under the terms of the Eclipse Public License v1.0
  5.  which accompanies this distribution, and is available at
  6.  http://www.eclipse.org/legal/epl-v10.html
  7.  
  8.  Contributors:
  9.      IBM Corporation - initial API and implementation
  10. --%>
  11. <%@ include file="fheader.jsp"%>
  12.  
  13. <% 
  14.     LayoutData data = new LayoutData(application,request, response);
  15.     WebappPreferences prefs = data.getPrefs();
  16. %>
  17.  
  18. <html>
  19.  
  20. <head>
  21. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  22. <title><%=ServletResources.getString("Help", request)%></title>
  23.  
  24. <style type="text/css">
  25.  
  26. HTML {
  27.     background:<%=prefs.getToolbarBackground()%>;
  28. <%
  29. if (data.isMozilla()){
  30. %>
  31.     padding:<%=isRTL?"0px 4px 2px 4px":"0px 4px 2px 4px"%>;
  32. <%
  33. }
  34. %>
  35. }
  36.  
  37. </style>
  38.  
  39. <script language="JavaScript">
  40. <%-- map of maximize listener functions indexed by name --%>
  41. var maximizeListeners=new Object();
  42. function registerMaximizeListener(name, listener){
  43.     maximizeListeners[name]=listener;
  44. }
  45. function notifyMaximizeListeners(maximizedNotRestored){
  46.     for(i in maximizeListeners){
  47.         try{
  48.             maximizeListeners[i](maximizedNotRestored);
  49.         }catch(exc){}
  50.     }
  51. }
  52. <%-- vars to keep track of frame sizes before max/restore --%>
  53. var leftCols = "<%=isRTL?"70.5%":"29.5%"%>";
  54. var rightCols = "<%=isRTL?"29.5%":"70.5%"%>";
  55. <%--
  56. param title "" for content frame
  57. --%>
  58. function toggleFrame(title)
  59. {
  60.     var frameset = document.getElementById("helpFrameset"); 
  61.     var navFrameSize = frameset.getAttribute("cols");
  62.     var comma = navFrameSize.indexOf(',');
  63.     var left = navFrameSize.substring(0,comma);
  64.     var right = navFrameSize.substring(comma+1);
  65.  
  66.     if (left == "*" || right == "*") {
  67.         // restore frames
  68.         frameset.frameSpacing="3";
  69.         frameset.setAttribute("border", "6");
  70.         frameset.setAttribute("cols", leftCols+","+rightCols);
  71.         notifyMaximizeListeners(false);
  72.     } else {
  73.         // the "cols" attribute is not always accurate, especially after resizing.
  74.         // offsetWidth is also not accurate, so we do a combination of both and 
  75.         // should get a reasonable behavior
  76. <%
  77. if(isRTL) {
  78. %>
  79.         var leftSize = ContentFrame.document.body.offsetWidth;
  80.         var rightSize = NavFrame.document.body.offsetWidth;
  81. <%
  82. } else {
  83. %>
  84.         var leftSize = NavFrame.document.body.offsetWidth;
  85.         var rightSize = ContentFrame.document.body.offsetWidth;
  86. <%
  87. }
  88. %>
  89.         
  90.         leftCols = leftSize * 100 / (leftSize + rightSize);
  91.         rightCols = 100 - leftCols;
  92.  
  93.         // maximize the frame.
  94.         //leftCols = left;
  95.         //rightCols = right;
  96.         // Assumption: the content toolbar does not have a default title.
  97. <%
  98. if(isRTL) {
  99. %>
  100.         if (title != "") // this is the right side for right-to-left rendering
  101.             frameset.setAttribute("cols", "*,100%");
  102.         else // this is the content toolbar
  103.             frameset.setAttribute("cols", "100%,*");
  104. <%
  105. } else {
  106. %>
  107.         if (title != "") // this is the left side for left-to-right rendering
  108.             frameset.setAttribute("cols", "100%,*");
  109.         else // this is the content toolbar
  110.             frameset.setAttribute("cols", "*,100%");
  111. <%
  112. }
  113. %>    
  114.         frameset.frameSpacing="0";
  115.         frameset.setAttribute("border", "1");
  116.         notifyMaximizeListeners(true);
  117.     }
  118. }
  119. </script>
  120. </head>
  121.  
  122. <frameset
  123. <% 
  124. if (data.isIE()) {
  125. %> 
  126.     style="border-top: 0px solid <%=prefs.getToolbarBackground()%>;"
  127.     style="border-right: 4px solid <%=prefs.getToolbarBackground()%>;"
  128.     style="border-bottom: 4px solid <%=prefs.getToolbarBackground()%>;"
  129.     style="border-left: 4px solid <%=prefs.getToolbarBackground()%>;"
  130. <%
  131. }
  132. %> 
  133.     id="helpFrameset" cols="<%=isRTL?"70.5%,29.5%":"29.5%,70.5%"%>" framespacing="3" border="6"  frameborder="1"   scrolling="no">
  134. <%
  135. if (isRTL) {
  136. %>
  137.        <frame name="ContentFrame" title="<%=ServletResources.getString("ignore", "ContentFrame", request)%>" class="content" src='<%="content.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" resize=yes>
  138.        <frame class="nav" name="NavFrame" title="<%=ServletResources.getString("ignore", "NavFrame", request)%>" src='<%="nav.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="1" resize=yes>
  139. <%
  140. } else {
  141. %>
  142.        <frame class="nav" name="NavFrame" title="<%=ServletResources.getString("ignore", "NavFrame", request)%>" src='<%="nav.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="1" resize=yes>
  143.        <frame name="ContentFrame" title="<%=ServletResources.getString("ignore", "ContentFrame", request)%>" class="content" src='<%="content.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" resize=yes>
  144. <%
  145. }
  146. %>
  147. </frameset>
  148.  
  149. </html>
  150.  
  151.