|
| 1 | +<%@ Page Language="C#" EnableViewState="False" %> |
| 2 | + |
| 3 | +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 4 | +<html> |
| 5 | + |
| 6 | +<head> |
| 7 | +<title>.NET Framework Class Library - Table of Content</title> |
| 8 | +<link rel="stylesheet" href="TOC.css"> |
| 9 | +<link rel="shortcut icon" href="favicon.ico"/> |
| 10 | +<script type="text/javascript" src="TOC.js"></script> |
| 11 | +</head> |
| 12 | + |
| 13 | +<body onload="javascript: Initialize();" onresize="javascript: ResizeTree();"> |
| 14 | +<form id="IndexForm" runat="server"> |
| 15 | + |
| 16 | +<div id="TOCDiv" class="TOCDiv"> |
| 17 | + |
| 18 | +<div id="divSearchOpts" class="SearchOpts" style="height: 100px; display: none;"> |
| 19 | +<img class="TOCLink" onclick="javascript: ShowHideSearch(false);" |
| 20 | + src="CloseSearch.png" height="17" width="17" alt="Hide search" style="float: right;"/> |
| 21 | +Keyword(s) for which to search: |
| 22 | +<input id="txtSearchText" type="text" style="width: 100%;" |
| 23 | + onkeypress="javascript: return OnSearchTextKeyPress(event);" /><br /> |
| 24 | +<input id="chkSortByTitle" type="checkbox" /><label for="chkSortByTitle"> Sort results by title</label><br /> |
| 25 | +<input type="button" value="Search" onclick="javascript: return PerformSearch();" /> |
| 26 | +</div> |
| 27 | + |
| 28 | +<div id="divIndexOpts" class="IndexOpts" style="height: 25px; display: none;"> |
| 29 | +<img class="TOCLink" onclick="javascript: ShowHideIndex(false);" |
| 30 | + src="CloseSearch.png" height="17" width="17" alt="Hide index" style="float: right;"/> |
| 31 | +Keyword Index |
| 32 | +</div> |
| 33 | + |
| 34 | +<div id="divNavOpts" class="NavOpts" style="height: 20px;"> |
| 35 | + <img class="TOCLink" onclick="javascript: SyncTOC();" src="SyncTOC.gif" |
| 36 | + height="16" width="16" alt="Sync to TOC"/> |
| 37 | + <img class="TOCLink" onclick="javascript: ExpandOrCollapseAll(true);" |
| 38 | + src="ExpandAll.bmp" height="16" width="16" alt="Expand all "/> |
| 39 | + <img class="TOCLink" onclick="javascript: ExpandOrCollapseAll(false);" |
| 40 | + src="CollapseAll.bmp" height="16" width="16" alt="Collapse all" /> |
| 41 | + <img class="TOCLink" onclick="javascript: ShowHideIndex(true);" |
| 42 | + src="Index.gif" height="16" width="16" alt="Index" /> |
| 43 | + <img class="TOCLink" onclick="javascript: ShowHideSearch(true);" |
| 44 | + src="Search.gif" height="16" width="16" alt="Search" /> |
| 45 | +</div> |
| 46 | + |
| 47 | +<div class="Tree" id="divSearchResults" style="display: none;" |
| 48 | + onselectstart="javascript: return false;"> |
| 49 | +</div> |
| 50 | + |
| 51 | +<div class="Tree" id="divIndexResults" style="display: none;" |
| 52 | + onselectstart="javascript: return false;"> |
| 53 | +</div> |
| 54 | + |
| 55 | +<div class="Tree" id="divTree" onselectstart="javascript: return false;"> |
| 56 | +<asp:Literal ID="lcTOC" runat="server" /> |
| 57 | +</div> |
| 58 | + |
| 59 | +</div> |
| 60 | + |
| 61 | +<div id="TOCSizer" class="TOCSizer" onmousedown="OnMouseDown(event)" onselectstart="javascript: return false;"></div> |
| 62 | + |
| 63 | +<iframe id="TopicContent" name="TopicContent" class="TopicContent" src="html/N_Rally_RestApi.htm"> |
| 64 | +This page uses an IFRAME but your browser does not support it. |
| 65 | +</iframe> |
| 66 | + |
| 67 | +</form> |
| 68 | + |
| 69 | +</body> |
| 70 | + |
| 71 | +</html> |
| 72 | + |
| 73 | +<script runat="server"> |
| 74 | +//============================================================================= |
| 75 | +// System : Sandcastle Help File Builder |
| 76 | +// File : Index.aspx |
| 77 | +// Author : Eric Woodruff ([email protected]) |
| 78 | +// Updated : 04/10/2008 |
| 79 | +// Note : Copyright 2007-2008, Eric Woodruff, All rights reserved |
| 80 | +// Compiler: Microsoft C# |
| 81 | +// |
| 82 | +// This file contains the code used to display the index page for a website |
| 83 | +// produced by the help file builder. The root nodes are loaded for the table |
| 84 | +// of content. Child nodes are loaded dynamically when first expanded using |
| 85 | +// an Ajax call. |
| 86 | +// |
| 87 | +// This code is published under the Microsoft Public License (Ms-PL). A copy |
| 88 | +// of the license should be distributed with the code. It can also be found |
| 89 | +// at the project website: http://SHFB.CodePlex.com. This notice, the |
| 90 | +// author's name, and all copyright notices must remain intact in all |
| 91 | +// applications, documentation, and source files. |
| 92 | +// |
| 93 | +// Version Date Who Comments |
| 94 | +// ============================================================================ |
| 95 | +// 1.5.0.0 06/21/2007 EFW Created the code |
| 96 | +//============================================================================= |
| 97 | +
|
| 98 | +protected void Page_Load(object sender, EventArgs e) |
| 99 | +{ |
| 100 | + StringBuilder sb = new StringBuilder(10240); |
| 101 | + string id, url, target, title; |
| 102 | +
|
| 103 | + XPathDocument toc = new XPathDocument(Server.MapPath("WebTOC.xml")); |
| 104 | + XPathNavigator navToc = toc.CreateNavigator(); |
| 105 | + XPathNodeIterator root = navToc.Select("HelpTOC/*"); |
| 106 | +
|
| 107 | + foreach(XPathNavigator node in root) |
| 108 | + { |
| 109 | + if(node.HasChildren) |
| 110 | + { |
| 111 | + // Write out a parent TOC entry |
| 112 | + id = node.GetAttribute("Id", String.Empty); |
| 113 | + title = node.GetAttribute("Title", String.Empty); |
| 114 | + url = node.GetAttribute("Url", String.Empty); |
| 115 | +
|
| 116 | + if(!String.IsNullOrEmpty(url)) |
| 117 | + target = " target=\"TopicContent\""; |
| 118 | + else |
| 119 | + { |
| 120 | + url = "#"; |
| 121 | + target = String.Empty; |
| 122 | + } |
| 123 | +
|
| 124 | + sb.AppendFormat("<div class=\"TreeNode\">\r\n" + |
| 125 | + "<img class=\"TreeNodeImg\" " + |
| 126 | + "onclick=\"javascript: Toggle(this);\" " + |
| 127 | + "src=\"Collapsed.gif\"/><a class=\"UnselectedNode\" " + |
| 128 | + "onclick=\"javascript: return Expand(this);\" " + |
| 129 | + "href=\"{0}\"{1}>{2}</a>\r\n" + |
| 130 | + "<div id=\"{3}\" class=\"Hidden\"></div>\r\n</div>\r\n", |
| 131 | + url, target, HttpUtility.HtmlEncode(title), id); |
| 132 | + } |
| 133 | + else |
| 134 | + { |
| 135 | + title = node.GetAttribute("Title", String.Empty); |
| 136 | + url = node.GetAttribute("Url", String.Empty); |
| 137 | +
|
| 138 | + if(String.IsNullOrEmpty(url)) |
| 139 | + url = "about:blank"; |
| 140 | +
|
| 141 | + // Write out a TOC entry that has no children |
| 142 | + sb.AppendFormat("<div class=\"TreeItem\">\r\n" + |
| 143 | + "<img src=\"Item.gif\"/>" + |
| 144 | + "<a class=\"UnselectedNode\" " + |
| 145 | + "onclick=\"javascript: return SelectNode(this);\" " + |
| 146 | + "href=\"{0}\" target=\"TopicContent\">{1}</a>\r\n" + |
| 147 | + "</div>\r\n", url, HttpUtility.HtmlEncode(title)); |
| 148 | + } |
| 149 | + } |
| 150 | +
|
| 151 | + lcTOC.Text = sb.ToString(); |
| 152 | +} |
| 153 | +</script> |
0 commit comments