Source code of Windows XP (NT5)
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.

1574 lines
41 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. <LINK ID=Stylesheet_Ref2 href="hcp://system/css/Layout.css" rel=STYLESHEET type=text/css>
  13. <TITLE>Share Windows Help</TITLE>
  14. <SCRIPT ID=Script1_noloc SRC="hcp://system/scripts/Common.js"></SCRIPT>
  15. <helpcenter:events id=idEvents />
  16. <STYLE>
  17. .cell-border
  18. {
  19. border: 1pt solid;
  20. }
  21. .cell-border-left
  22. {
  23. border-bottom: 1pt solid;
  24. }
  25. .cell-border-right
  26. {
  27. border-left : 1pt solid;
  28. border-bottom : 1pt solid;
  29. }
  30. </STYLE>
  31. </HEAD>
  32. <BODY id=noloc0 style="margin: 16px; margin-top: 11px" SCROLL=auto class="sys-rhp-bgcolor sys-color-body">
  33. <!-- ######################################## -->
  34. <DIV id=idMODE_change class="sys-font-body" style="display: none; margin-right:0px">
  35. <DIV id=locCHANGE1 class="sys-font-heading3 sys-rhp-color-title">
  36. <SPAN>Switch Help version</SPAN>
  37. </DIV>
  38. <BR>
  39. <DIV id=locCHANGE2 CLASS="sys-font-body">
  40. Select a version of Help from the list, and click <B>Switch</B>.
  41. </DIV>
  42. <BR>
  43. <TABLE cellspacing=0 cellpadding=0 width=100% class=sys-table-color-border style="border: 1pt solid; padding: 0.5em">
  44. <THEAD CLASS=sys-inlineform-bgcolor3>
  45. <TR>
  46. <TD CLASS="sys-font-body-bold sys-rhp-splash-color-title" id=locCHANGE3>
  47. Available Help:
  48. </TD>
  49. </TR>
  50. </THEAD>
  51. <TBODY id=idCHANGE_resultTable CLASS="sys-font-body">
  52. </TBODY>
  53. <TFOOT CLASS=sys-table-header-bgcolor1>
  54. <TR>
  55. <TD id=noloc1_1 ALIGN=right>
  56. <BUTTON tabIndex=20 id=idCHANGE_exec class="Context-Button sys-font-body" accesskey="w" onClick="CHANGE_onClick();" DISABLED>S<U>w</U>itch</BUTTON>
  57. </TD>
  58. </TR>
  59. </TFOOT>
  60. </TABLE>
  61. </DIV>
  62. <!-- ######################################## -->
  63. <DIV id=idMODE_server class="sys-font-body" style="display: none; margin-right:0px">
  64. <DIV id=locSERVER1 class="sys-font-heading3 sys-rhp-color-title">
  65. <SPAN>Install shared Help</SPAN>
  66. </DIV>
  67. <BR>
  68. <DIV id=locSERVER2 CLASS="sys-font-body">
  69. To find Help content on another Windows computer, enter the computer name, and then click <B>Find</B>.
  70. </DIV>
  71. <BR>
  72. <TABLE cellspacing=0 cellpadding=0 width=100%>
  73. <TR>
  74. <TD WIDTH=100%>
  75. <INPUT ALIGN=baseline tabIndex=1 id=idSERVER_share style="width:100%" onPropertyChange="SERVER_onChange_share();" onKeyUp="SERVER_onKey_share();" class="Context-Input sys-font-body">
  76. </TD>
  77. </TR>
  78. </TABLE>
  79. <DIV id=noloc2_1 style="text-align: right; margin-top: .5em">
  80. <BUTTON tabIndex=3 id=idSERVER_query class="Context-Button sys-font-body" accesskey="F" onClick="SERVER_onClick_query();" DISABLED><U>F</U>ind</BUTTON>
  81. </DIV>
  82. <BR>
  83. <DIV id=locSERVER3 style="height: 2em">Pick a version of Help from the list, and click <B>Install</B>. To start using the newly installed Help content, you can
  84. <ID id=locSERVER3a><A id=locSERVER3b class="sys-link-normal sys-font-body" href="hcp://system/panels/remotehelp.htm?mode=Change" title="Start using Help content you've installed from another computer running Windows XP or related Windows server products.">switch from one operating system's Help content to another</A>.</ID>
  85. </DIV><BR>
  86. <DIV id=locSERVER4 style="height: 2em">The following versions of Help are available on <SPAN id=idSERVER_serverSelected></SPAN>:</DIV> <!-- computername -->
  87. <TABLE cellspacing=0 cellpadding=0 width=100% class="sys-table-color-border cell-border" style="padding: 0.5em">
  88. <THEAD CLASS=sys-inlineform-bgcolor3>
  89. <TR>
  90. <TD CLASS="sys-font-body-bold sys-rhp-splash-color-title cell-border-left" id=locSERVER5 width="100%">Name</TD>
  91. <TD CLASS="sys-font-body-bold sys-rhp-splash-color-title cell-border-right" id=locSERVER6>Status</TD>
  92. </TR>
  93. </THEAD>
  94. <TBODY id=idSERVER_resultTable CLASS="sys-font-body">
  95. </TBODY>
  96. <TFOOT CLASS="sys-table-header-bgcolor1 sys-font-body">
  97. <TR>
  98. <TD COLSPAN=2>
  99. <TABLE cellspacing=0 cellpadding=0 width=100%>
  100. <TR>
  101. <TD id=noloc2_2 WIDTH=100% style="font-size: 8pt">
  102. <SPAN CLASS='sys-toppane-header-color' id=idSERVER_status></SPAN>
  103. </TD>
  104. <TD id=noloc2_3 ALIGN=right>
  105. <DIV NOWRAP>
  106. <BUTTON tabIndex=20 id=idSERVER_abort class="Context-Button sys-font-body" accesskey="C" onClick="SERVER_onClick_abort();" style="display: none"><U>C</U>ancel</BUTTON>
  107. <SPAN id=noloc2_4 style="width: 15px"></SPAN>
  108. <BUTTON tabIndex=21 id=idSERVER_install class="Context-Button sys-font-body" accesskey="I" onClick="SERVER_onClick_install();" DISABLED><U>I</U>nstall</BUTTON>
  109. </DIV>
  110. </TD>
  111. </TR>
  112. </TABLE>
  113. </TR>
  114. </TFOOT>
  115. </TABLE>
  116. </DIV>
  117. <!-- ######################################## -->
  118. <DIV id=idMODE_disk class="sys-font-body" style="display: none; margin-right:0px">
  119. <DIV id=locDISK1 class="sys-font-heading3 sys-rhp-color-title">
  120. <SPAN>Install Help from disk</SPAN>
  121. </DIV>
  122. <BR>
  123. <DIV id=locDISK2 CLASS="sys-font-body">
  124. To find Help content on a CD or disk image, enter the location, and then click <B>Find</B>.
  125. </DIV>
  126. <BR>
  127. <TABLE cellspacing=0 cellpadding=0 width=100%>
  128. <TR>
  129. <TD WIDTH=100%>
  130. <INPUT tabIndex=1 id=idDISK_dir style="width:100%" onPropertyChange="DISK_onChange_dir();" onKeyUp="DISK_onKey_dir();" class="Context-Input sys-font-body">
  131. </TD>
  132. <TD id=noloc3_1 style="padding-left: .2em">
  133. <BUTTON tabIndex=2 id=idDISK_browse class="Context-Button sys-font-body" accesskey="B" onClick="DISK_onClick_browse();"><U>B</U>rowse...</BUTTON>
  134. </TD>
  135. </TR>
  136. </TABLE>
  137. <DIV id=noloc3_2 style="text-align: right; margin-top: .5em">
  138. <BUTTON tabIndex=3 id=idDISK_query class="Context-Button sys-font-body" accesskey="F" onClick="DISK_onClick_query();" DISABLED><U>F</U>ind</BUTTON>
  139. </DIV>
  140. <BR>
  141. <DIV id=locDISK3 style="height: 2em">Pick a version of Help from the list, and click <B>Install</B>. To start using the newly installed Help content, you can
  142. <ID id=locDISK3a><A id=locDISK3b class="sys-link-normal sys-font-body" href="hcp://system/panels/remotehelp.htm?mode=Change" title="Start using Help content you've installed from another computer running Windows XP or related Windows server products.">switch from one operating system's Help content to another</A>.</ID>
  143. </DIV><BR>
  144. <DIV id=locDISK4 style="height: 2em">The following versions of Help are available on <SPAN id=idDISK_dirSelected></SPAN>:</DIV>
  145. <TABLE cellspacing=0 cellpadding=0 width=100% class="sys-table-color-border cell-border" style="padding: 0.5em">
  146. <THEAD CLASS=sys-inlineform-bgcolor3>
  147. <TR>
  148. <TD CLASS="sys-font-body-bold sys-rhp-splash-color-title cell-border-left" id=locDISK5 width="100%">Name</TD>
  149. <TD CLASS="sys-font-body-bold sys-rhp-splash-color-title cell-border-right" id=locDISK6>Status</TD>
  150. </TR>
  151. </THEAD>
  152. <TBODY id=idDISK_resultTable CLASS="sys-font-body">
  153. </TBODY>
  154. <TFOOT CLASS="sys-table-header-bgcolor1 sys-font-body">
  155. <TR>
  156. <TD COLSPAN=2>
  157. <TABLE cellspacing=0 cellpadding=0 width=100%>
  158. <TR>
  159. <TD id=noloc3_3 WIDTH=100% style="font-size: 8pt">
  160. <SPAN CLASS='sys-toppane-header-color' id=idDISK_status></SPAN>
  161. </TD>
  162. <TD id=noloc3_4 ALIGN=right>
  163. <DIV NOWRAP>
  164. <BUTTON tabIndex=20 id=idDISK_abort class="Context-Button sys-font-body" accesskey="C" onClick="DISK_onClick_abort();" style="display: none"><U>C</U>ancel</BUTTON>
  165. <SPAN id=noloc3_5 style="width: 15px"></SPAN>
  166. <BUTTON tabIndex=21 id=idDISK_install class="Context-Button sys-font-body" accesskey="I" onClick="DISK_onClick_install();" DISABLED><U>I</U>nstall</BUTTON>
  167. </DIV>
  168. </TD>
  169. </TR>
  170. </TABLE>
  171. </TR>
  172. </TFOOT>
  173. </TABLE>
  174. </DIV>
  175. <!-- ######################################## -->
  176. <DIV id=idMODE_share class="sys-font-body" style="display: none; margin-right:0px">
  177. <DIV id=locSHARE1 class="sys-font-heading3 sys-rhp-color-title">
  178. <SPAN>Share Help</SPAN>
  179. </DIV>
  180. <BR>
  181. <DIV id=locSHARE2 CLASS="sys-font-body">
  182. You can share the Help content on your computer with other users on your network. To share Help, click <B>Shared</B> or <B>Not Shared</B> next to the appropriate Help content, and then click <B>Apply</B>.
  183. </DIV>
  184. <BR>
  185. <TABLE cellspacing=0 cellpadding=0 width=100% class="sys-table-color-border cell-border" style="padding: 0.5em">
  186. <THEAD CLASS=sys-inlineform-bgcolor3>
  187. <TR>
  188. <TD CLASS="sys-font-body-bold sys-rhp-splash-color-title cell-border-left" id=locSHARE3 COLSPAN=3>Currently installed Help</TD>
  189. </TR>
  190. </THEAD>
  191. <TBODY id=idSHARE_resultTable CLASS="sys-font-body">
  192. </TBODY>
  193. <TFOOT CLASS="sys-table-header-bgcolor1 sys-font-body">
  194. <TR>
  195. <TD id=noloc4_1 ALIGN=right COLSPAN=3>
  196. <DIV NOWRAP>
  197. <BUTTON tabIndex=31 id=idSHARE_submit class="Context-Button sys-font-body" accesskey="A" onClick="SHARE_onClick_submit();" DISABLED><U>A</U>pply</BUTTON>
  198. <SPAN id=noloc4_2 style="width: 15px"></SPAN>
  199. <BUTTON tabIndex=32 id=idSHARE_reset class="Context-Button sys-font-body" accesskey="C" onClick="SHARE_onClick_reset();" DISABLED><U>C</U>ancel</BUTTON>
  200. </DIV>
  201. </TD>
  202. </TR>
  203. </TFOOT>
  204. </TABLE>
  205. <BR>
  206. <DIV id=idSHARE_tsblock>
  207. <SELECT id=idSHARE_ts NAME="ts" TITLE="Select a Help" SIZE="1" onchange='SHARE_onChange_ts()' CLASS="sys-font-body"></SELECT>
  208. <LABEL id=locSHARE4 class="sys-font-body" FOR=idSHARE_ts> : default Help for users who connect to this computer remotely</LABEL>
  209. </DIV>
  210. </DIV>
  211. <!-- ######################################## -->
  212. <DIV id=idMODE_remove class="sys-font-body" style="display: none; margin-right:0px">
  213. <DIV id=locREMOVE1 class="sys-font-heading3 sys-rhp-color-title">
  214. <SPAN>Remove Help</SPAN>
  215. </DIV>
  216. <BR>
  217. <DIV id=locREMOVE2 CLASS="sys-font-body">
  218. To uninstall Help from your computer, pick a version of Help from the list, and click <B>Remove</B>. You cannot uninstall Help that is currently in use.
  219. </DIV>
  220. <BR>
  221. <TABLE cellspacing=0 cellpadding=0 width=100% class=sys-table-color-border style="border: 1pt solid; padding: 0.5em">
  222. <THEAD CLASS=sys-inlineform-bgcolor3>
  223. <TR>
  224. <TD CLASS="sys-font-body-bold sys-rhp-splash-color-title" id=locREMOVE3>
  225. The following Help can be uninstalled
  226. </TD>
  227. </TR>
  228. </THEAD>
  229. <TBODY id=idREMOVE_resultTable CLASS="sys-font-body">
  230. </TBODY>
  231. <TFOOT CLASS=sys-table-header-bgcolor1>
  232. <TR>
  233. <TD id=noloc5_1 ALIGN=right>
  234. <BUTTON tabIndex=20 id=idREMOVE_exec class="Context-Button sys-font-body" accesskey="R" onClick="REMOVE_onClick();" DISABLED><U>R</U>emove</BUTTON>
  235. </TD>
  236. </TR>
  237. </TFOOT>
  238. </TABLE>
  239. </DIV>
  240. <DIV id=idWARNING style="display: none">
  241. <DIV id=locWARNING1 CLASS="sys-font-body">
  242. <BR>
  243. <B>Note</B> Help for other operating systems contains references to some features that are not on your
  244. computer. Links to these features will not respond when clicked.
  245. </DIV>
  246. </DIV>
  247. </BODY>
  248. <SCRIPT DEFER>
  249. //
  250. // localizable variables/filenames
  251. //
  252. var L_NOTACTIVE_Message = "" ;
  253. var L_QUERYING_Message = "Collecting information..." ;
  254. var L_QUERIED_Message = "Ready to execute." ;
  255. var L_COPYINGDB_Message = "Copying the database..." ;
  256. var L_COPYINGFILES_Message = "Copying file: " ;
  257. var L_INSTALLING_Message = "Finalizing installation..." ;
  258. var L_INSTALLED_Message = "Installation complete." ;
  259. var L_UNINSTALLING_Message = "Finalizing uninstallation...";
  260. var L_UNINSTALLED_Message = "Uninstallation complete." ;
  261. var L_ABORTING_Message = "Cancelling..." ;
  262. var L_ABORTED_Message = "Cancelled." ;
  263. var L_FAILED_Message = "Operation failed: " ;
  264. var L_AlreadyInstalled_Text = "Already Installed";
  265. var L_Available_Text = "Available";
  266. var L_NotAvailable_Text = "Not Available";
  267. var L_Shared_Text = "Shared";
  268. var L_NotShared_Text = "Not Shared";
  269. var L_AbortInstall_Message = "Do you want to cancel the installation?";
  270. var L_DenyUninstall1_Message = "You are currently using ";
  271. var L_DenyUninstall2_Message = ". Please select another view before uninstalling.";
  272. var L_DenyUninstall3_Message = "This Help Version is in use, it cannot be uninstalled.";
  273. var L_NoExport_Message = "The specified server doesn't export any Help version.";
  274. var L_Error80004004_Message = "The operation has been cancelled.";
  275. var L_Error800706BA_Message = "Windows XP cannot connect to the specified Help server. Either the server name was typed incorrectly, or the Help server has lost its connection to the network.";
  276. var L_Error80040154_Message = "Windows XP Help content has not been shared from this server.";
  277. var L_Error8007007B_Message = "You entered an incorrect path.";
  278. var L_Error80070043_Message = "You don't have enough permissions to access the network.";
  279. var L_Error80070005_Message = "You don't have enough permissions to access the resource.";
  280. var L_Error80070002_Message = "Windows could not find Help content in this location. Either the location name was typed incorrectly, or there is no Help content available.";
  281. var g_StatusLookup = [];
  282. g_StatusLookup[pchealth.SHT_NOTACTIVE ] = L_NOTACTIVE_Message;
  283. g_StatusLookup[pchealth.SHT_QUERYING ] = L_QUERYING_Message;
  284. g_StatusLookup[pchealth.SHT_QUERIED ] = L_QUERIED_Message;
  285. g_StatusLookup[pchealth.SHT_COPYING_DB ] = L_COPYINGDB_Message;
  286. g_StatusLookup[pchealth.SHT_INSTALLING ] = L_INSTALLING_Message;
  287. g_StatusLookup[pchealth.SHT_INSTALLED ] = L_INSTALLED_Message;
  288. g_StatusLookup[pchealth.SHT_UNINSTALLING] = L_UNINSTALLING_Message;
  289. g_StatusLookup[pchealth.SHT_UNINSTALLED ] = L_UNINSTALLED_Message;
  290. g_StatusLookup[pchealth.SHT_ABORTING ] = L_ABORTING_Message;
  291. g_StatusLookup[pchealth.SHT_ABORTED ] = L_ABORTED_Message;
  292. ////////////////////
  293. var REG_DEFAULTTERMINALSERVERSKU = "HKLM\\SOFTWARE\\Microsoft\\PCHealth\\HelpCtr\\DefaultTerminalServerSKU";
  294. var REG_DEFAULTTERMINALSERVERLANGUAGE = "HKLM\\SOFTWARE\\Microsoft\\PCHealth\\HelpCtr\\DefaultTerminalServerLanguage";
  295. var REG_PERSIST_DISK = "HKLM\\SOFTWARE\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\RemoteHelp_Disk";
  296. var REG_PERSIST_SERVER = "HKLM\\SOFTWARE\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\RemoteHelp_Server";
  297. ////////////////////////////////////////////////////////////////////////////////
  298. var g_db = pchealth.Database;
  299. var g_skuMachine = pchealth.UserSettings.MachineSKU;
  300. var g_skuUser = pchealth.UserSettings.CurrentSKU;
  301. var g_fTS = pchealth.UserSettings.IsTerminalServer;
  302. var g_collLocal = null;
  303. var g_collServer = null;
  304. var g_collDisk = null;
  305. var g_executing = false;
  306. var g_SelectedRow = null;
  307. var g_SelectedSKU = null;
  308. var g_SelectedSKU_TS = null;
  309. try
  310. {
  311. g_TS_DefaultSKU = pchealth.RegRead( REG_DEFAULTTERMINALSERVERSKU );
  312. g_TS_DefaultLanguage = pchealth.RegRead( REG_DEFAULTTERMINALSERVERLANGUAGE );
  313. }
  314. catch(e)
  315. {
  316. }
  317. if(!g_TS_DefaultSKU ) g_TS_DefaultSKU = "";
  318. if(!g_TS_DefaultLanguage) g_TS_DefaultLanguage = "";
  319. if(g_fTS == false)
  320. {
  321. idSHARE_tsblock.style.display = "none";
  322. }
  323. ////////////////////////////////////////////////////////////////////////////////
  324. function CancelEvent( event )
  325. {
  326. event.cancelBubble = true;
  327. event.returnValue = false;
  328. }
  329. function HideAll()
  330. {
  331. idMODE_change.style.display = "none";
  332. idMODE_server.style.display = "none";
  333. idMODE_disk .style.display = "none";
  334. idMODE_share .style.display = "none";
  335. idWARNING .style.display = "none";
  336. }
  337. function GetSKUDisplayName( sku )
  338. {
  339. var text = sku.DisplayName;
  340. if(g_skuMachine.Language != sku.Language) text += " / " + pchealth.TextHelpers.GetLCIDDisplayString( sku.Language );
  341. return text;
  342. }
  343. function SameSKU( a, b )
  344. {
  345. try
  346. {
  347. return (a.SKU == b.SKU && a.Language == b.Language);
  348. }
  349. catch(e)
  350. {
  351. }
  352. return false;
  353. }
  354. function GetErrorMessage( hr )
  355. {
  356. switch(hr)
  357. {
  358. case -2147467260/*0x80004004*/: return L_Error80004004_Message;
  359. case -2147023174/*0x800706BA*/: return L_Error800706BA_Message;
  360. case -2147024773/*0x8007007B*/: return L_Error8007007B_Message;
  361. case -2147024829/*0x80070043*/: return L_Error80070043_Message;
  362. case -2147024891/*0x80070005*/: return L_Error80070005_Message;
  363. case -2147024894/*0x80070002*/: return L_Error80070002_Message;
  364. case -2147221164/*0x80040154*/: return L_Error80040154_Message;
  365. }
  366. return pchealth.FormatError( hr );
  367. }
  368. function GetStatus( obj, status, hr, file )
  369. {
  370. if(status == pchealth.SHT_COPYING_FILES)
  371. {
  372. status = L_COPYINGFILES_Message + file;
  373. }
  374. else
  375. {
  376. status = g_StatusLookup[status];
  377. }
  378. if(!status) status = L_FAILED_Message + GetErrorMessage( hr );
  379. return status;
  380. }
  381. ////////////////////
  382. function onKeyPress_Click()
  383. {
  384. if(event.keyCode == 13 || event.keyCode == 32)
  385. {
  386. var obj = this;
  387. while(obj)
  388. {
  389. if(obj.onclick) { obj.onclick(); return; }
  390. obj = obj.parentElement;
  391. }
  392. }
  393. }
  394. function onClick_Select()
  395. {
  396. CancelEvent( event ); if(g_executing) return;
  397. if(this.state_Selectable == false) return;
  398. // Unselect the previous selection.
  399. if(g_SelectedRow) g_SelectedRow.className = "";
  400. // Save the newly selected element.
  401. g_SelectedRow = this;
  402. g_SelectedSKU = this.state_SKU;
  403. g_SelectedRow.className = "sys-inlineform-bgcolor2";
  404. switch(mode)
  405. {
  406. case "Change" : CHANGE_select(); break;
  407. case "AddServer" : SERVER_select(); break;
  408. case "AddDisk" : DISK_select(); break;
  409. case "SetSharing": SHARE_select(); break;
  410. case "Remove" : REMOVE_select(); break;
  411. }
  412. }
  413. function onDblClick_Select()
  414. {
  415. CancelEvent( event ); if(g_executing) return;
  416. if(this.state_Selectable == false) return;
  417. switch(mode)
  418. {
  419. case "Change" : CHANGE_onClick(); break;
  420. case "AddServer" : break;
  421. case "AddDisk" : break;
  422. case "SetSharing": break;
  423. case "Remove" : break;
  424. }
  425. }
  426. function CancelEventDirect()
  427. {
  428. CancelEvent( event );
  429. }
  430. function SetupRowEvents( oRow )
  431. {
  432. oRow.onclick = onClick_Select;
  433. oRow.ondblclick = onDblClick_Select;
  434. oRow.onselect = CancelEventDirect;
  435. oRow.onselectstart = CancelEventDirect;
  436. }
  437. function CreateRowForSKU( sku, table, fSelectable )
  438. {
  439. var oRow = table.insertRow();
  440. var oCell;
  441. var text;
  442. var status;
  443. var className;
  444. oRow.state_SKU = sku;
  445. oRow.state_Selectable = false;
  446. if(sku)
  447. {
  448. if(fSelectable) SetupRowEvents( oRow );
  449. if(sku.IsInstalled)
  450. {
  451. status = L_AlreadyInstalled_Text;
  452. className = "sys-color-body-alert";
  453. }
  454. else if(sku.CanInstall)
  455. {
  456. status = L_Available_Text;
  457. className = "";
  458. oRow.state_Selectable = true;
  459. }
  460. else
  461. {
  462. status = L_NotAvailable_Text;
  463. className = "sys-color-body-sec sys-inlineform-bgcolor1";
  464. }
  465. text = GetSKUDisplayName( sku );
  466. status = pchealth.TextHelpers.HTMLEscape( status );
  467. }
  468. else
  469. {
  470. text = " ";
  471. status = "&nbsp;";
  472. className = "sys-inlineform-bgcolor1";
  473. }
  474. oCell = oRow.insertCell();
  475. oCell.innerText = text;
  476. oCell.className = "cell-border-left";
  477. oCell.style.width = "100%";
  478. if(oRow.state_Selectable) oCell.tabIndex = 10;
  479. if(sku) oCell.onkeypress = onKeyPress_Click;
  480. oCell = oRow.insertCell();
  481. oCell.innerHTML = "<DIV NOWRAP>" + status + "</DIV>";
  482. oCell.className = "sys-table-color-border cell-border-right";
  483. oRow.className = className;
  484. }
  485. function CreateRowForSelect( sku, table )
  486. {
  487. var oRow = table.insertRow();
  488. var oCell = oRow.insertCell();
  489. var text;
  490. var className;
  491. SetupRowEvents( oRow );
  492. oRow.state_SKU = sku;
  493. oRow.state_Selectable = false;
  494. if(sku)
  495. {
  496. text = GetSKUDisplayName( sku );
  497. if(SameSKU( sku, g_skuUser ))
  498. {
  499. className = "sys-inlineform-bgcolor2";
  500. g_SelectedRow = oRow;
  501. g_SelectedSKU = sku;
  502. }
  503. else
  504. {
  505. className = "";
  506. }
  507. oRow.state_Selectable = true;
  508. }
  509. else
  510. {
  511. text = " ";
  512. className = "sys-inlineform-bgcolor1";
  513. }
  514. oCell.innerText = text;
  515. oCell.className = "cell-border-left";
  516. oCell.tabIndex = 10;
  517. oCell.onkeypress = onKeyPress_Click;
  518. oRow.className = className;
  519. }
  520. function CreateRowForShare( sku, table, options )
  521. {
  522. var oRow = table.insertRow();
  523. var oCell;
  524. var oOption;
  525. var text;
  526. var status1;
  527. var status2;
  528. var className;
  529. oRow.state_SKU = sku;
  530. oRow.state_Selectable = false;
  531. if(sku)
  532. {
  533. var id = sku.SKU + sku.Language;
  534. oRow.state_SKU = sku;
  535. oRow.state_Exported = sku.Exported;
  536. oRow.state_Selectable = true;
  537. status1 = "<INPUT type=radio tabIndex=10 name='" + id + "'" + ( sku.Exported ? " CHECKED" : "") + ">" + L_Shared_Text;
  538. status2 = "<INPUT type=radio tabIndex=10 name='" + id + "'" + (!sku.Exported ? " CHECKED" : "") + ">" + L_NotShared_Text;
  539. className = "";
  540. text = GetSKUDisplayName( sku );
  541. oOption = document.createElement("OPTION");
  542. options.add( oOption );
  543. oOption.innerText = text;
  544. oOption.value = id;
  545. if(sku.SKU == g_TS_DefaultSKU && sku.Language == g_TS_DefaultLanguage)
  546. {
  547. g_SelectedSKU_TS = sku;
  548. oOption.selected = true;
  549. }
  550. }
  551. else
  552. {
  553. text = " ";
  554. status1 = null;
  555. status2 = null;
  556. className = "sys-inlineform-bgcolor1";
  557. }
  558. oCell = oRow.insertCell();
  559. oCell.innerText = text;
  560. oCell.className = "cell-border-left";
  561. if(oRow.state_Selectable) oCell.tabIndex = 10;
  562. oCell = oRow.insertCell();
  563. oCell.className = "sys-table-color-border cell-border-right";
  564. oCell.style.width = "7em";
  565. if(status1)
  566. {
  567. oCell.innerHTML = status1;
  568. oCell.firstChild.payload = oRow;
  569. oCell.firstChild.payload_state = true;
  570. }
  571. else
  572. {
  573. oCell.innerText = " ";
  574. }
  575. oCell = oRow.insertCell();
  576. oCell.className = "sys-table-color-border cell-border-left";
  577. oCell.style.width = "8em";
  578. if(status2)
  579. {
  580. oCell.innerHTML = status2;
  581. oCell.firstChild.payload = oRow;
  582. oCell.firstChild.payload_state = false;
  583. }
  584. else
  585. {
  586. oCell.innerText = " ";
  587. }
  588. oRow.className = className;
  589. if(sku) oRow.onclick = SHARE_onClick_radio;
  590. }
  591. ////////////////////////////////////////////////////////////////////////////////
  592. function CHANGE_init()
  593. {
  594. HideAll(); idMODE_change.style.display = ""; idWARNING.style.display = "";
  595. CHANGE_display();
  596. }
  597. function CHANGE_display()
  598. {
  599. var count = 0;
  600. Common_ClearTable( idCHANGE_resultTable );
  601. idCHANGE_exec.disabled = true;
  602. g_collLocal = g_db.InstalledSKUs;
  603. for(var e = new Enumerator( g_collLocal ); !e.atEnd(); e.moveNext())
  604. {
  605. var sku = e.item();
  606. CreateRowForSelect( sku, idCHANGE_resultTable ); count++;
  607. }
  608. while(count < 4)
  609. {
  610. CreateRowForSelect( null, idCHANGE_resultTable ); count++;
  611. }
  612. }
  613. function CHANGE_select()
  614. {
  615. idCHANGE_exec.disabled = SameSKU( g_SelectedSKU, g_skuUser );
  616. }
  617. ////////////////////
  618. function CHANGE_onClick()
  619. {
  620. CancelEvent( event ); if(g_executing) return;
  621. if(idCHANGE_exec.disabled == false && g_SelectedSKU)
  622. {
  623. pchealth.UserSettings.Select( g_SelectedSKU.SKU, g_SelectedSKU.Language );
  624. pchealth.HelpSession.ChangeContext( "HomePage", "refresh" );
  625. }
  626. }
  627. ////////////////////////////////////////////////////////////////////////////////
  628. var g_SERVER_state;
  629. function SERVER_init()
  630. {
  631. HideAll(); idMODE_server.style.display = ""; idWARNING.style.display = "";
  632. SERVER_reset();
  633. }
  634. function SERVER_reset()
  635. {
  636. var value;
  637. try
  638. {
  639. value = pchealth.RegRead( REG_PERSIST_SERVER );
  640. }
  641. catch(e)
  642. {
  643. }
  644. if(!value) value = "";
  645. idSERVER_share.value = value;
  646. idSERVER_serverSelected.value = "";
  647. SERVER_display( true );
  648. SERVER_setstate( "idle" );
  649. }
  650. function SERVER_setstate( state )
  651. {
  652. var fINPUT = false;
  653. var fQUERY = false;
  654. var fABORT = false;
  655. var fACTION = false;
  656. g_executing = false;
  657. switch( g_SERVER_state = state )
  658. {
  659. case "idle":
  660. fINPUT = true;
  661. fQUERY = (idSERVER_share.value.length != 0);
  662. break;
  663. case "query":
  664. fABORT = true;
  665. g_collServer = null;
  666. SERVER_display( false );
  667. break;
  668. case "ready":
  669. fINPUT = true;
  670. fQUERY = true;
  671. SERVER_display( true );
  672. break;
  673. case "installing":
  674. fABORT = true;
  675. g_executing = true;
  676. break;
  677. }
  678. idSERVER_share.disabled = fINPUT ? false : true;
  679. idSERVER_query.disabled = fQUERY ? false : true;
  680. idSERVER_abort.style.display = fABORT ? "" : "none";
  681. idSERVER_install.disabled = fACTION ? false : true;
  682. }
  683. function SERVER_display( fSelectable )
  684. {
  685. var count = 0;
  686. g_SelectedRow = null;
  687. g_SelectedSKU = null;
  688. Common_ClearTable( idSERVER_resultTable );
  689. if(g_collServer)
  690. {
  691. for(var e = new Enumerator( g_collServer ); !e.atEnd(); e.moveNext())
  692. {
  693. CreateRowForSKU( e.item(), idSERVER_resultTable, fSelectable ); count++;
  694. }
  695. }
  696. while(count < 4)
  697. {
  698. CreateRowForSKU( null, idSERVER_resultTable, false ); count++;
  699. }
  700. }
  701. function SERVER_select()
  702. {
  703. if(g_SelectedRow)
  704. {
  705. idSERVER_install.disabled = false;
  706. }
  707. else
  708. {
  709. idSERVER_install.disabled = true;
  710. }
  711. }
  712. function SERVER_onChange_share()
  713. {
  714. if(event.propertyName == 'value')
  715. {
  716. var fDIS = (idSERVER_share.value.length == 0);
  717. idSERVER_query.disabled = fDIS;
  718. }
  719. }
  720. function SERVER_onKey_share()
  721. {
  722. var fDIS = (idSERVER_share.value.length == 0);
  723. idSERVER_query.disabled = fDIS;
  724. if(fDIS == false && event.keyCode == 13) SERVER_onClick_query();
  725. }
  726. function SERVER_onClick_query()
  727. {
  728. SERVER_setstate( "query" )
  729. idSERVER_serverSelected.innerText = idSERVER_share.value;
  730. g_collServer = g_db.ConnectToServer( idSERVER_share.value, SERVER_notifyForServer );
  731. }
  732. function SERVER_onClick_install()
  733. {
  734. if(g_SelectedSKU)
  735. {
  736. SERVER_setstate( "installing" );
  737. idEvents.onBeforeContextSwitch = SERVER_askToAbort;
  738. idEvents.onBeforeNavigate = SERVER_askToAbort;
  739. idEvents.onShutdown = SERVER_askToAbort;
  740. g_SelectedSKU.onStatusChange = SERVER_notify;
  741. g_SelectedSKU.Install();
  742. }
  743. }
  744. function SERVER_onClick_abort()
  745. {
  746. if(g_db)
  747. {
  748. g_db.Abort();
  749. }
  750. if(g_SelectedSKU)
  751. {
  752. g_SelectedSKU.Abort();
  753. }
  754. }
  755. function SERVER_notifyForServer( obj, status, hr, file )
  756. {
  757. if(g_SERVER_state == "query")
  758. {
  759. if(status == pchealth.SHT_ABORTING) return;
  760. if(status == pchealth.SHT_ABORTED)
  761. {
  762. status = pchealth.SHT_QUERIED;
  763. }
  764. }
  765. idSERVER_status.innerText = GetStatus( obj, status, hr, file );
  766. if(status == pchealth.SHT_QUERYING)
  767. {
  768. SERVER_display( false );
  769. }
  770. if(status == pchealth.SHT_QUERIED)
  771. {
  772. if(g_collServer && g_collServer.Count == 0)
  773. {
  774. idSERVER_status.innerText = L_Error80040154_Message;
  775. SERVER_setstate( "idle" );
  776. }
  777. else
  778. {
  779. try
  780. {
  781. pchealth.RegWrite( REG_PERSIST_SERVER, idSERVER_share.value );
  782. }
  783. catch(e)
  784. {
  785. }
  786. SERVER_setstate( "ready" );
  787. }
  788. return;
  789. }
  790. if(status == pchealth.SHT_ABORTED ||
  791. status == pchealth.SHT_FAILED )
  792. {
  793. SERVER_setstate( "idle" );
  794. }
  795. }
  796. function SERVER_askToAbort()
  797. {
  798. var res = pchealth.MessageBox( L_AbortInstall_Message, "YESNO" );
  799. if(res == "NO")
  800. {
  801. CancelEvent( event );
  802. event.srcElement.data.Cancel = true;
  803. }
  804. else
  805. {
  806. idEvents.onBeforeContextSwitch = null;
  807. idEvents.onBeforeNavigate = null;
  808. idEvents.onShutdown = null;
  809. SERVER_onClick_abort();
  810. }
  811. }
  812. function SERVER_notify( obj, status, hr, file )
  813. {
  814. idSERVER_status.innerText = GetStatus( obj, status, hr, file );
  815. if(status == pchealth.SHT_INSTALLED ||
  816. status == pchealth.SHT_ABORTED ||
  817. status == pchealth.SHT_FAILED )
  818. {
  819. idEvents.onBeforeContextSwitch = null;
  820. idEvents.onBeforeNavigate = null;
  821. idEvents.onShutdown = null;
  822. SERVER_setstate( "ready" );
  823. }
  824. }
  825. ////////////////////////////////////////////////////////////////////////////////
  826. var g_DISK_state;
  827. function DISK_init()
  828. {
  829. HideAll(); idMODE_disk.style.display = ""; idWARNING.style.display = "";
  830. DISK_reset();
  831. }
  832. function DISK_reset()
  833. {
  834. var value;
  835. try
  836. {
  837. value = pchealth.RegRead( REG_PERSIST_DISK );
  838. }
  839. catch(e)
  840. {
  841. }
  842. if(!value) value = "";
  843. idDISK_dir.value = value;
  844. idDISK_dirSelected.value = "";
  845. DISK_display( true );
  846. DISK_setstate( "idle" );
  847. }
  848. function DISK_setstate( state )
  849. {
  850. var fINPUT = false;
  851. var fQUERY = false;
  852. var fABORT = false;
  853. var fACTION = false;
  854. g_executing = false;
  855. switch( g_DISK_state = state )
  856. {
  857. case "idle":
  858. fINPUT = true;
  859. fQUERY = (idDISK_dir.value.length != 0);
  860. break;
  861. case "query":
  862. fABORT = true;
  863. g_collDisk = null;
  864. DISK_display( false );
  865. break;
  866. case "ready":
  867. fINPUT = true;
  868. fQUERY = true;
  869. DISK_display( true );
  870. break;
  871. case "installing":
  872. fABORT = true;
  873. g_executing = true;
  874. break;
  875. }
  876. idDISK_dir.disabled = fINPUT ? false : true;
  877. idDISK_browse.disabled = fINPUT ? false : true;
  878. idDISK_query.disabled = fQUERY ? false : true;
  879. idDISK_abort.style.display = fABORT ? "" : "none";
  880. idDISK_install.disabled = fACTION ? false : true;
  881. }
  882. function DISK_display( fSelectable )
  883. {
  884. var count = 0;
  885. g_SelectedRow = null;
  886. g_SelectedSKU = null;
  887. Common_ClearTable( idDISK_resultTable );
  888. if(g_collDisk)
  889. {
  890. var seen = [];
  891. for(var e = new Enumerator( g_collDisk ); !e.atEnd(); e.moveNext())
  892. {
  893. var sku = e.item();
  894. var id = sku.SKU + "_#_" + sku.Language;
  895. if(seen[id]) continue;
  896. seen[id] = true;
  897. CreateRowForSKU( sku, idDISK_resultTable, fSelectable ); count++;
  898. }
  899. }
  900. while(count < 4)
  901. {
  902. CreateRowForSKU( null, idDISK_resultTable, false ); count++;
  903. }
  904. }
  905. function DISK_select()
  906. {
  907. if(g_SelectedRow)
  908. {
  909. idDISK_install.disabled = false;
  910. }
  911. else
  912. {
  913. idDISK_install.disabled = true;
  914. }
  915. }
  916. function DISK_onChange_dir()
  917. {
  918. if(event.propertyName == 'value')
  919. {
  920. var fDIS = (idDISK_dir.value.length == 0);
  921. idDISK_query.disabled = fDIS;
  922. }
  923. }
  924. function DISK_onKey_dir()
  925. {
  926. var fDIS = (idDISK_dir.value.length == 0);
  927. idDISK_query.disabled = fDIS;
  928. if(fDIS == false && event.keyCode == 13) DISK_onClick_query();
  929. }
  930. function DISK_onClick_browse()
  931. {
  932. var res = pchealth.SelectFolder( "Look for Help content in:", idDISK_dir.value );
  933. if(res && res.length > 0)
  934. {
  935. idDISK_dir.value = res;
  936. idDISK_dir.focus();
  937. idDISK_query.disabled = false;
  938. }
  939. }
  940. function DISK_onClick_query()
  941. {
  942. DISK_setstate( "query" )
  943. idDISK_dirSelected.innerText = idDISK_dir.value;
  944. g_collDisk = g_db.ConnectToDisk( idDISK_dir.value, DISK_notifyForDisk );
  945. }
  946. function DISK_onClick_install()
  947. {
  948. if(g_SelectedSKU)
  949. {
  950. DISK_setstate( "installing" );
  951. idEvents.onBeforeContextSwitch = DISK_askToAbort;
  952. idEvents.onBeforeNavigate = DISK_askToAbort;
  953. idEvents.onShutdown = DISK_askToAbort;
  954. g_SelectedSKU.onStatusChange = DISK_notify;
  955. g_SelectedSKU.Install();
  956. }
  957. }
  958. function DISK_onClick_abort()
  959. {
  960. if(g_db)
  961. {
  962. g_db.Abort();
  963. }
  964. if(g_SelectedSKU)
  965. {
  966. g_SelectedSKU.Abort();
  967. }
  968. }
  969. function DISK_notifyForDisk( obj, status, hr, file )
  970. {
  971. if(g_DISK_state == "query")
  972. {
  973. if(status == pchealth.SHT_ABORTING) return;
  974. if(status == pchealth.SHT_ABORTED)
  975. {
  976. status = pchealth.SHT_QUERIED;
  977. }
  978. }
  979. idDISK_status.innerText = GetStatus( obj, status, hr, file );
  980. if(status == pchealth.SHT_QUERYING)
  981. {
  982. DISK_display( false );
  983. }
  984. if(status == pchealth.SHT_QUERIED)
  985. {
  986. if(g_collDisk && g_collDisk.Count == 0)
  987. {
  988. idDISK_status.innerText = L_Error80070002_Message;
  989. DISK_setstate( "idle" );
  990. }
  991. else
  992. {
  993. try
  994. {
  995. pchealth.RegWrite( REG_PERSIST_DISK, idDISK_dir.value );
  996. }
  997. catch(e)
  998. {
  999. }
  1000. DISK_setstate( "ready" );
  1001. }
  1002. }
  1003. if(status == pchealth.SHT_ABORTED ||
  1004. status == pchealth.SHT_FAILED )
  1005. {
  1006. DISK_setstate( "idle" );
  1007. }
  1008. }
  1009. function DISK_askToAbort()
  1010. {
  1011. var res = pchealth.MessageBox( L_AbortInstall_Message, "YESNO" );
  1012. if(res == "NO")
  1013. {
  1014. CancelEvent( event );
  1015. event.srcElement.data.Cancel = true;
  1016. }
  1017. else
  1018. {
  1019. idEvents.onBeforeContextSwitch = null;
  1020. idEvents.onBeforeNavigate = null;
  1021. idEvents.onShutdown = null;
  1022. DISK_onClick_abort();
  1023. }
  1024. }
  1025. function DISK_notify( obj, status, hr, file )
  1026. {
  1027. idDISK_status.innerText = GetStatus( obj, status, hr, file );
  1028. if(status == pchealth.SHT_INSTALLED ||
  1029. status == pchealth.SHT_ABORTED ||
  1030. status == pchealth.SHT_FAILED )
  1031. {
  1032. idEvents.onBeforeContextSwitch = null;
  1033. idEvents.onBeforeNavigate = null;
  1034. idEvents.onShutdown = null;
  1035. DISK_setstate( "ready" );
  1036. }
  1037. }
  1038. ////////////////////////////////////////////////////////////////////////////////
  1039. function SHARE_init()
  1040. {
  1041. HideAll(); idMODE_share.style.display = "";
  1042. SHARE_onClick_reset();
  1043. }
  1044. function SHARE_onClick_submit()
  1045. {
  1046. for(var e = new Enumerator( idSHARE_resultTable.rows ); !e.atEnd(); e.moveNext())
  1047. {
  1048. var oRow = e.item();
  1049. var oSKU = oRow.state_SKU; if(!oSKU) continue;
  1050. if(oRow.state_Exported != oSKU.Exported)
  1051. {
  1052. oSKU.Exported = oRow.state_Exported;
  1053. }
  1054. }
  1055. if(g_SelectedSKU_TS)
  1056. {
  1057. try
  1058. {
  1059. pchealth.RegWrite( REG_DEFAULTTERMINALSERVERSKU , g_SelectedSKU_TS.SKU );
  1060. pchealth.RegWrite( REG_DEFAULTTERMINALSERVERLANGUAGE, g_SelectedSKU_TS.Language );
  1061. g_TS_DefaultSKU = g_SelectedSKU_TS.SKU;
  1062. g_TS_DefaultLanguage = g_SelectedSKU_TS.Language;
  1063. }
  1064. catch(e)
  1065. {
  1066. }
  1067. }
  1068. else
  1069. {
  1070. try
  1071. {
  1072. pchealth.RegDelete( REG_DEFAULTTERMINALSERVERSKU );
  1073. pchealth.RegDelete( REG_DEFAULTTERMINALSERVERLANGUAGE );
  1074. g_TS_DefaultSKU = "";
  1075. g_TS_DefaultLanguage = "";
  1076. }
  1077. catch(e)
  1078. {
  1079. }
  1080. }
  1081. SHARE_onClick_reset();
  1082. }
  1083. function SHARE_onClick_reset()
  1084. {
  1085. var count = 0;
  1086. var options = idSHARE_ts.options;
  1087. Common_ClearTable( idSHARE_resultTable );
  1088. idSHARE_submit.disabled = true;
  1089. idSHARE_reset .disabled = true;
  1090. g_SelectedRow = null;
  1091. g_SelectedSKU = null;
  1092. g_SelectedSKU_TS = null;
  1093. while(options.length) options.remove( 0 );
  1094. g_collLocal = g_db.InstalledSKUs;
  1095. for(var e = new Enumerator( g_collLocal ); !e.atEnd(); e.moveNext())
  1096. {
  1097. var sku = e.item();
  1098. CreateRowForShare( sku, idSHARE_resultTable, options ); count++;
  1099. }
  1100. while(count < 4)
  1101. {
  1102. CreateRowForShare( null, idSHARE_resultTable, options ); count++;
  1103. }
  1104. }
  1105. ////////////////////
  1106. function SHARE_CheckIfModified()
  1107. {
  1108. var fRes = true;
  1109. for(var e = new Enumerator( idSHARE_resultTable.rows ); !e.atEnd(); e.moveNext())
  1110. {
  1111. var oRow = e.item();
  1112. var oSKU = oRow.state_SKU; if(!oSKU) continue;
  1113. if(oRow.state_Exported != oSKU.Exported)
  1114. {
  1115. fRes = false;
  1116. break;
  1117. }
  1118. }
  1119. if(g_SelectedSKU_TS)
  1120. {
  1121. if(g_SelectedSKU_TS.SKU != g_TS_DefaultSKU || g_SelectedSKU_TS.Language != g_TS_DefaultLanguage)
  1122. {
  1123. fRes = false;
  1124. }
  1125. }
  1126. else
  1127. {
  1128. if(g_TS_DefaultSKU || g_TS_DefaultLanguage)
  1129. {
  1130. fRes = false;
  1131. }
  1132. }
  1133. idSHARE_submit.disabled = fRes;
  1134. idSHARE_reset .disabled = fRes;
  1135. }
  1136. function SHARE_onClick_radio()
  1137. {
  1138. var obj = event.srcElement;
  1139. if(obj.tagName == "INPUT" && obj.type == "radio")
  1140. {
  1141. this.state_Exported = obj.payload_state;
  1142. }
  1143. SHARE_CheckIfModified();
  1144. }
  1145. function SHARE_onChange_ts()
  1146. {
  1147. var value = idSHARE_ts.options(idSHARE_ts.selectedIndex).value;
  1148. g_SelectedSKU_TS = null;
  1149. for(var e = new Enumerator( idSHARE_resultTable.rows ); !e.atEnd(); e.moveNext())
  1150. {
  1151. var oRow = e.item();
  1152. var oSKU = oRow.state_SKU; if(!oSKU) continue;
  1153. var id = oSKU.SKU + oSKU.Language;
  1154. if(id == value)
  1155. {
  1156. g_SelectedSKU_TS = oSKU;
  1157. break;
  1158. }
  1159. }
  1160. SHARE_CheckIfModified();
  1161. }
  1162. ////////////////////////////////////////////////////////////////////////////////
  1163. function REMOVE_init()
  1164. {
  1165. HideAll(); idMODE_remove.style.display = "";
  1166. REMOVE_display();
  1167. }
  1168. function REMOVE_display()
  1169. {
  1170. var count = 0;
  1171. g_SelectedRow = null;
  1172. g_SelectedSKU = null;
  1173. Common_ClearTable( idREMOVE_resultTable );
  1174. g_collLocal = g_db.InstalledSKUs;
  1175. for(var e = new Enumerator( g_collLocal ); !e.atEnd(); e.moveNext())
  1176. {
  1177. var sku = e.item(); if(sku.CanUninstall == false) continue;
  1178. CreateRowForSelect( sku, idREMOVE_resultTable ); count++;
  1179. }
  1180. while(count < 4)
  1181. {
  1182. CreateRowForSelect( null, idREMOVE_resultTable ); count++;
  1183. }
  1184. REMOVE_select();
  1185. }
  1186. function REMOVE_select()
  1187. {
  1188. if(g_SelectedRow)
  1189. {
  1190. idREMOVE_exec.disabled = g_SelectedSKU.IsMachineHelp;
  1191. }
  1192. else
  1193. {
  1194. idREMOVE_exec.disabled = true;
  1195. }
  1196. }
  1197. function REMOVE_onClick()
  1198. {
  1199. if(g_SelectedSKU)
  1200. {
  1201. if(SameSKU( g_SelectedSKU, g_skuUser ))
  1202. {
  1203. pchealth.MessageBox( L_DenyUninstall1_Message + GetSKUDisplayName( g_skuUser ) + L_DenyUninstall2_Message, "OK" );
  1204. return;
  1205. }
  1206. if(g_SelectedSKU.CanUninstall == false)
  1207. {
  1208. pchealth.MessageBox( L_DenyUninstall3_Message, "OK" );
  1209. return;
  1210. }
  1211. idREMOVE_exec.disabled = true;
  1212. g_executing = true;
  1213. g_SelectedSKU.onStatusChange = REMOVE_notify;
  1214. g_SelectedSKU.Uninstall();
  1215. g_SelectedRow = null;
  1216. g_SelectedSKU = null;
  1217. }
  1218. }
  1219. function REMOVE_notify( obj, status, hr, file )
  1220. {
  1221. if(status == pchealth.SHT_UNINSTALLED)
  1222. {
  1223. try
  1224. {
  1225. if(obj.SKU == g_TS_DefaultSKU && obj.Language == g_TS_DefaultLanguage)
  1226. {
  1227. pchealth.RegDelete( REG_DEFAULTTERMINALSERVERSKU );
  1228. pchealth.RegDelete( REG_DEFAULTTERMINALSERVERLANGUAGE );
  1229. g_TS_DefaultSKU = "";
  1230. g_TS_DefaultLanguage = "";
  1231. }
  1232. }
  1233. catch(e)
  1234. {
  1235. }
  1236. }
  1237. if(status == pchealth.SHT_UNINSTALLED ||
  1238. status == pchealth.SHT_ABORTED ||
  1239. status == pchealth.SHT_FAILED )
  1240. {
  1241. REMOVE_display();
  1242. g_executing = false;
  1243. }
  1244. }
  1245. ////////////////////////////////////////////////////////////////////////////////
  1246. var obj = pchealth.TextHelpers.ParseURL( window.location.href );
  1247. var mode = obj.GetQueryParameter( "mode" );
  1248. if(g_db.HasWritePermissions == false) mode = "Change"
  1249. switch(mode)
  1250. {
  1251. default : mode = "Change";
  1252. case "Change" : CHANGE_init(); break;
  1253. case "AddServer" : SERVER_init(); break;
  1254. case "AddDisk" : DISK_init(); break;
  1255. case "SetSharing": SHARE_init(); break;
  1256. case "Remove" : REMOVE_init(); break;
  1257. }
  1258. </SCRIPT>
  1259. </HTML>