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.

94 lines
3.4 KiB

  1. //
  2. // Copyright (c) 2001 Microsoft Corporation
  3. //
  4. function Desktop_Generate()
  5. {
  6. try
  7. {
  8. var query = [];
  9. var image = [];
  10. var i = 0;
  11. image['TopLevelBucket_1'] = "hcp://system/images/48x48/desktop_icon_01.bmp";
  12. image['TopLevelBucket_2'] = "hcp://system/images/48x48/desktop_icon_02.bmp";
  13. image['TopLevelBucket_3'] = "hcp://system/images/48x48/desktop_icon_03.bmp";
  14. image['TopLevelBucket_4'] = "hcp://system/images/48x48/desktop_icon_04.bmp";
  15. var html = "<TABLE border=0 cellPadding=8 cellSpacing=0>";
  16. var qrc = pchealth.Database.LookupSubNodes( "", true );
  17. for(var e = new Enumerator( qrc ); !e.atEnd(); e.moveNext())
  18. {
  19. var qr = e.item();
  20. var img;
  21. if(qr.IconURL) img = qr.IconURL; // use the bucket icon if one is present in the database
  22. else img = "hcp://system/images/48x48/desktop_icon_generic.bmp"; // use a generic icon
  23. if(image[qr.Entry]) img = image[qr.Entry];
  24. html += "<TR>";
  25. html += "<TD VALIGN=middle style='margin; 4px; padding-bottom: 20px'>";
  26. if(img.match( /\.bmp$/i ))
  27. {
  28. html += "<helpcenter:bitmap style='width: 48px; height: 48px' srcNormal=\"" + pchealth.TextHelpers.QuoteEscape( img ) + "\"></helpcenter:bitmap>";
  29. }
  30. else
  31. {
  32. html += "<DIV style='width: 48px; height: 48px; font-size: 1px'><img style='width: 48px; height: 48px' src=\"" + pchealth.TextHelpers.QuoteEscape( img ) + "\"></DIV>";
  33. }
  34. html += "</TD><TD style='padding-bottom: 20px'><TABLE border=0 cellPadding=0 cellSpacing=0>";
  35. var qrc2 = pchealth.Database.LookupSubNodes( qr.FullPath, true );
  36. for(var e2 = new Enumerator( qrc2 ); !e2.atEnd(); e2.moveNext())
  37. {
  38. var qr2 = e2.item();
  39. var strURL = pchealth.TextHelpers.QuoteEscape( qr2.TopicURL );
  40. var strTitle = pchealth.TextHelpers.HTMLEscape ( qr2.Title );
  41. var strToolTip = pchealth.TextHelpers.QuoteEscape( qr2.Description );
  42. html += "<TR class='sys-font-body-bold' style='padding-bottom : .5em' HC_FULLPATH='" + qr2.FullPath + "' HC_TOPIC=\"" + strURL + "\"><TD VALIGN=TOP><LI></TD>";
  43. html += "<TD><A class='sys-link-homepage' TITLE=\"" + strToolTip + "\" HREF='none'>" + strTitle + "</A></TD></TR>";
  44. }
  45. html += "</TABLE></TD></TR>";
  46. }
  47. html += "</TABLE>";
  48. idTaxo.innerHTML = html;
  49. var tbl = idTaxo.firstChild;
  50. for(i=0;i<tbl.rows.length; i++)
  51. {
  52. var tbl2 = tbl.rows(i).cells(1).firstChild;
  53. for(j=0;j<tbl2.rows.length; j++)
  54. {
  55. var row = tbl2.rows(j);
  56. row.onclick = Desktop_ShowContent;
  57. }
  58. }
  59. }
  60. catch(e)
  61. {
  62. }
  63. idTopLevelTable.style.display = "";
  64. }
  65. function Desktop_ShowContent()
  66. {
  67. Common_CancelEvent();
  68. try
  69. {
  70. if(this.HC_FULLPATH && pchealth.HelpSession.IsNavigating() == false)
  71. {
  72. pchealth.HelpSession.ChangeContext( "SubSite", this.HC_FULLPATH, this.HC_TOPIC );
  73. }
  74. }
  75. catch(e)
  76. {
  77. }
  78. }