Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

379 lines
10 KiB

  1. <HTML XMLNS:helpcenter>
  2. <HEAD>
  3. <!--
  4. Copyright (c) 2000 Microsoft Corporation
  5. -->
  6. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1252">
  7. <META HTTP-EQUIV=PICS-Label CONTENT='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l comment "RSACi North America Server" by "[email protected]" r (n 0 s 0 v 0 l 0))'>
  8. <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
  9. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  10. <LINK ID=Stylesheet_Ref0 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css>
  11. <LINK ID=Stylesheet_Ref1 href="hcp://system/css/Behaviors.css" rel=STYLESHEET type=text/css>
  12. <SCRIPT ID=Script1_noloc SRC="hcp://system/scripts/Common.js"></SCRIPT>
  13. <STYLE>
  14. .sys-font-body-gray
  15. {
  16. color : graytext;
  17. }
  18. .layout-checkbox
  19. {
  20. padding-left : 7px;
  21. }
  22. .layout-index1
  23. {
  24. padding-left : 11px;
  25. padding-right : 5px;
  26. }
  27. .layout-index2
  28. {
  29. padding-right : 11px;
  30. }
  31. </STYLE>
  32. </HEAD>
  33. <BODY SCROLL=NO>
  34. <IFRAME NAME='HelpCtrContents' style='position:absolute; display:none'></IFRAME>
  35. <TABLE border=0 cellpadding=0 cellspacing=0 WIDTH=100% HEIGHT=100% style="table-layout: fixed">
  36. <TR class="sys-font-body" style="height: 3em;padding-top:11px;" id=idContextAreaOuter>
  37. <TD class="sys-lhp-bgcolor-scope">
  38. <DIV id=idContextAreaOuter2 NOWRAP style='width: 100%; text-overflow: ellipsis; overflow: hidden;'>
  39. <DIV id=idSubsite class='sys-font-body sys-color-body layout-checkbox' style='display: none'>
  40. <INPUT id=idSubsite_State TYPE=checkbox onclick='context_subsite_onclick()'>
  41. <LABEL id=idSubsite_State_l FOR="idSubsite" class="sys-font-body">Search only <SPAN id=idSubsite_Title></SPAN></LABEL>
  42. </DIV>
  43. <DIV id=idIndex class='sys-font-body sys-color-body' style='display: none'>
  44. <TABLE border=0 cellpadding=0 cellspacing=0 WIDTH=100% HEIGHT=100%>
  45. <TR>
  46. <TD id=noloc1 class='layout-index1'><DIV NOWRAP class="sys-font-body" id=locIndex>Current index&nbsp</DIV></TD>
  47. <TD id=noloc2 class='layout-index2' WIDTH=100%>
  48. <SELECT id=idIndex_State NAME="INDEX" TITLE="Select one index" SIZE="1" onchange='context_index_onchange()' style="width: 100%"></SELECT>
  49. </TD>
  50. </TR>
  51. </TABLE>
  52. </DIV>
  53. </DIV>
  54. </TD>
  55. <TD class="sys-lhp-divcolor-upper" WIDTH=3px>
  56. </TD>
  57. </TR>
  58. <TR>
  59. <TD>
  60. <IFRAME id=idSubpanels NAME='SubPanels' WIDTH=100% HEIGHT=100%></IFRAME>
  61. </TD>
  62. <TD WIDTH=3px HEIGHT=100% style='cursor: col-resize' class="sys-header-gradient-V" id=noloc3>
  63. <SPAN style='width: 3px; height: 100%; behavior : url(#default#pch_handle)'>&nbsp;</SPAN>
  64. </TD>
  65. </TR>
  66. </TABLE>
  67. </BODY>
  68. <SCRIPT>
  69. //
  70. // localizable variables/filenames
  71. //
  72. var L_SystemIndex_Text = "Main Index";
  73. var L_SubsiteEnabled_Text = "Specifies whether to search only the topics that reside in this category. This option only limits the search results displayed under 'Suggested Topics'.";
  74. var L_SubsiteDisabled_Text = "Specifies whether to search only the topics that reside in this category. To use this option, click 'Set search options', and then select 'Suggested Topics'.";
  75. var L_SubsiteSearch_Text = "Search only ";
  76. ////////////////////////////////////////////////////////////////////////////////
  77. var g_SUBSITE_node = "";
  78. var g_SUBSITE_visible = false;
  79. var g_SUBSITE_checked = (pchealth.UserSettings.IsDesktopVersion);
  80. var g_INDEX_visible = false;
  81. var g_INDEX_selection = [];
  82. var g_INDEX_current = -1;
  83. var g_INDEX_system = "<SYSTEM>";
  84. var g_NAVBAR = pchealth.UI_NavBar.content.parentWindow;
  85. var REGKEY_INDEXES_DISPLAYED = "HKLM\\SOFTWARE\\Microsoft\\PCHealth\\HelpCtr\\IndexDisplay";
  86. idSubsite_State.status = g_SUBSITE_checked;
  87. function SubsiteStatus()
  88. {
  89. // Check if semgr has been initialized
  90. if(g_NAVBAR.GetWrapperVar( "SEMgrInit" ) == "true")
  91. {
  92. // If already initialized, get the search engine manager and extract keyword engine to see if it is enabled
  93. var oWrapper = g_NAVBAR.FindWrapper( g_NAVBAR.ID_KEYWORD );
  94. if(oWrapper)
  95. {
  96. EnableSubsite( oWrapper.Enabled );
  97. }
  98. }
  99. else
  100. {
  101. // If not initialized, read the value from the registry
  102. var fEnabled;
  103. try { fEnabled = pchealth.RegRead( GetSearchEngineConfig() + g_NAVBAR.ID_KEYWORD + "\\" + "Enabled" ) != "false"; } catch(e) { fEnabled = true; }
  104. EnableSubsite( fEnabled );
  105. }
  106. }
  107. function EnableSubsite(bEnable)
  108. {
  109. if (bEnable)
  110. {
  111. idSubsite.title = L_SubsiteEnabled_Text;
  112. idSubsite_State.disabled = false;
  113. idSubsite_State_l.className = "sys-font-body";
  114. }
  115. else
  116. {
  117. idSubsite.title = L_SubsiteDisabled_Text;
  118. idSubsite_State.disabled = true;
  119. idSubsite_State_l.className = "sys-font-body sys-font-body-gray";
  120. }
  121. }
  122. ////////////////////////////////////////
  123. function context_UpdateBanner()
  124. {
  125. var ctx = pchealth.HelpSession.CurrentContext;
  126. if(ctx.ContextName == "SUBSITE")
  127. {
  128. if(ctx.ContextInfo)
  129. {
  130. var arr = ctx.ContextInfo.split( " " );
  131. if(arr[0] != "")
  132. {
  133. try
  134. {
  135. var node = pchealth.Database.LookupNode( arr[0] );
  136. idSubsite_State.title = L_SubsiteSearch_Text + node(1).Title;
  137. idSubsite_Title.innerText = node(1).Title;
  138. g_SUBSITE_node = arr[0];
  139. g_SUBSITE_visible = true;
  140. g_INDEX_visible = false;
  141. //
  142. // Server DCR : remove subsite
  143. //
  144. if (pchealth.UserSettings.IsDesktopVersion)
  145. SubsiteStatus();
  146. }
  147. catch(e)
  148. {
  149. }
  150. }
  151. }
  152. }
  153. else if(ctx.ContextName == "SEARCH")
  154. {
  155. ; // Maintain state.
  156. }
  157. else
  158. {
  159. g_SUBSITE_node = null;
  160. g_SUBSITE_visible = false;
  161. }
  162. if(ctx.ContextName == "INDEX")
  163. {
  164. g_SUBSITE_visible = false;
  165. if(ctx.ContextInfo)
  166. {
  167. g_INDEX_selection = ctx.ContextInfo.split( " " );
  168. }
  169. else if(pchealth.UserSettings.Scope)
  170. {
  171. g_INDEX_selection = [ pchealth.UserSettings.Scope, g_INDEX_system ];
  172. }
  173. else
  174. {
  175. g_INDEX_selection = [];
  176. }
  177. try
  178. {
  179. // Add global scopes listed in the registry
  180. var arrSafe = pchealth.RegRead( REGKEY_INDEXES_DISPLAYED );
  181. var arrVB = new VBArray(arrSafe);
  182. var arrJS = arrVB.toArray();
  183. var numScopes = arrJS.length;
  184. if((numScopes > 0) && (g_INDEX_selection.length == 0))
  185. {
  186. // If the default system index was going to be displayed,
  187. // make sure that it will still be displayed.
  188. g_INDEX_selection = [ g_INDEX_system ];
  189. }
  190. for (var i=0; i<numScopes; i++)
  191. {
  192. var strScope = arrJS[i].toLowerCase();
  193. // If the scope is not already in g_INDEX_selection, then add it.
  194. var numIndexes = g_INDEX_selection.length;
  195. var fExists = false;
  196. for (var j=0; j<numIndexes; j++)
  197. {
  198. if (g_INDEX_selection[j].toLowerCase() == strScope)
  199. {
  200. fExists = true;
  201. break;
  202. }
  203. }
  204. if (!fExists)
  205. {
  206. g_INDEX_selection[numIndexes] = strScope;
  207. }
  208. }
  209. }
  210. catch (e)
  211. {
  212. }
  213. if(g_INDEX_selection.length > 0)
  214. {
  215. g_INDEX_visible = true;
  216. }
  217. else
  218. {
  219. g_INDEX_visible = false;
  220. }
  221. }
  222. else
  223. {
  224. g_INDEX_visible = false;
  225. g_INDEX_selection = null;
  226. g_INDEX_current = -1;
  227. }
  228. context_update();
  229. }
  230. function context_subsite_onclick()
  231. {
  232. g_SUBSITE_checked = idSubsite_State.status;
  233. idSubsite.title = g_SUBSITE_checked ? L_SubsiteEnabled_Text : L_SubsiteDisabled_Text;
  234. context_update();
  235. }
  236. function context_index_onchange()
  237. {
  238. g_INDEX_current = idIndex_State.options[idIndex_State.selectedIndex].value;
  239. context_update();
  240. }
  241. function context_update()
  242. {
  243. var ctx = pchealth.HelpSession.CurrentContext;
  244. var i;
  245. pchealth.UI_NavBar.content.parentWindow.SetWrapperVar( "SUBSITE", g_SUBSITE_checked ? g_SUBSITE_node : "" );
  246. {
  247. var options = idIndex_State.options;
  248. while(options.length) options.remove( 0 );
  249. for(i in g_INDEX_selection)
  250. {
  251. var text;
  252. try
  253. {
  254. var id = g_INDEX_selection[i];
  255. var fSys = (id == g_INDEX_system);
  256. text = pchealth.UserSettings.IndexDisplayName( fSys ? null : id );
  257. if(text == "")
  258. {
  259. text = fSys ? L_SystemIndex_Text : null;
  260. }
  261. }
  262. catch(e)
  263. {
  264. text = null;
  265. }
  266. if(text)
  267. {
  268. var oOption = document.createElement("OPTION");
  269. options.add( oOption );
  270. oOption.innerText = text;
  271. oOption.value = i;
  272. if(g_INDEX_current == -1) g_INDEX_current = i;
  273. if(i == g_INDEX_current)
  274. {
  275. oOption.selected = true;
  276. }
  277. }
  278. }
  279. if(options.length < 2) g_INDEX_visible = false;
  280. }
  281. if(ctx.ContextName == "INDEX")
  282. {
  283. try
  284. {
  285. idSubpanels.index_Show( g_INDEX_current != -1 ? g_INDEX_selection[g_INDEX_current] : null );
  286. }
  287. catch(e)
  288. {
  289. }
  290. }
  291. //
  292. // Server DCR : remove subsite
  293. //
  294. if (pchealth.UserSettings.IsDesktopVersion)
  295. {
  296. idContextAreaOuter.style.display = (g_SUBSITE_visible | g_INDEX_visible) ? "" : "none";
  297. idSubsite .style.display = g_SUBSITE_visible ? "" : "none";
  298. idIndex .style.display = g_INDEX_visible ? "" : "none";
  299. }
  300. else
  301. {
  302. idContextAreaOuter.style.display = g_INDEX_visible ? "" : "none";
  303. idIndex .style.display = g_INDEX_visible ? "" : "none";
  304. }
  305. }
  306. </SCRIPT>
  307. <helpcenter:events id=idEvents onContextSwitch="context_UpdateBanner();" onPersistLoad="context_UpdateBanner();" onTravelDone="context_UpdateBanner();" />
  308. <helpcenter:state id=idState identity="Context" />
  309. </HTML>