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.

146 lines
5.2 KiB

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <style>
  5. body {margin: 0; font: icon; color: windowtext; background:window; overflow:none}
  6. span {font:icon;}
  7. #FolderIcon {height:expression(TaskpadName.clientHeight + 10); width:100%;}
  8. #TaskpadName {font: caption; color:captiontext; margin-left:0; margin-right:0; margin-top: 0; width:100%; border:0; padding-left:3; padding-top:5; padding-bottom:7;}
  9. #DisplayNameElem {font:icon; padding-left:5px; padding-top:5px; padding-bottom:3px; padding-right:5px}
  10. #Details {padding-left: 12px; margin-top: 8px; overflow:auto}
  11. #DescriptionElem {padding-left: 12px; margin-top: 8px; overflow-y:scroll; overflow:auto}
  12. A:visited {color:expression(document.linkColor);}
  13. A:hover {color:expression(document.linkColor);}
  14. </style>
  15. <script language="JavaScript" for="MMCEvents" EVENT="OnSelectionChange(V, N)">UpdateState();</script>
  16. <script language="JavaScript" for="MMCEvents" EVENT="OnContextMenuExecuted(MI)">UpdateState();</script>
  17. <script language="JavaScript" for="MMCEvents" EVENT="OnViewChange(V, N)">UpdateState();</script>
  18. <script language="JavaScript" for="MMCEvents" EVENT="OnToolbarButtonClicked()">UpdateState();</script>
  19. <script language="JavaScript" for="MMCEvents" EVENT="OnListUpdated(V)">UpdateState();</script>
  20. <script language="JavaScript">
  21. var L_strNoItemSelected_Text = "Select an item to view its description.";
  22. var L_strDescription_Text = "\nDescription:\n";
  23. var L_strMultipleItemsSelected_Text = "Multiple items selected.";
  24. function OnLoad()
  25. {
  26. ViewPanel.addBehavior("#default#mmcview");
  27. MMCEvents.ConnectTo(external.Document.Application);
  28. UpdateState();
  29. }
  30. // Prevent text from being selected and messing up the UI.
  31. function document.onselectstart()
  32. {
  33. event.returnValue = false;
  34. }
  35. function UpdateState()
  36. {
  37. var strDetails = "";
  38. var strDisplayName = "";
  39. var strDescription = "";
  40. var i;
  41. var curnode;
  42. var strNodeType;
  43. N = external.Selection;
  44. switch(N.count)
  45. {
  46. case 0:
  47. DisplayNameElem.style.fontWeight="normal";
  48. strDetails = "";
  49. strDisplayName = L_strNoItemSelected_Text;
  50. break;
  51. case 1:
  52. DisplayNameElem.style.fontWeight="bold";
  53. strDetails = "";
  54. curNode = N(1);
  55. // got the selected node
  56. strNodeType = curNode.Nodetype;
  57. strDisplayName = external.CellContents(curNode, 1);
  58. strDescription = curNode.Property("CCF_DESCRIPTION");
  59. strDetails = curNode.Property("CCF_HTML_DETAILS");
  60. break;
  61. default: // multiselect
  62. DisplayNameElem.style.fontWeight="normal";
  63. strDetails = L_strMultipleItemsSelected_Text;
  64. break;
  65. }
  66. TaskpadName.innerHTML = "<NOBR>" + external.ActiveScopeNode.Name + "</NOBR>";
  67. DisplayNameElem.innerHTML = strDisplayName + "<BR>";
  68. if (strDetails != "")
  69. {
  70. strDetails = "<BR>" + strDetails + "<BR>"
  71. }
  72. DetailsElem.innerHTML = strDetails;
  73. if (strDescription != "")
  74. {
  75. strDescription = L_strDescription_Text + strDescription;
  76. }
  77. DescriptionElem.innerText = strDescription;
  78. }
  79. function OnUnload()
  80. {
  81. MMCEvents.Disconnect;
  82. }
  83. </script>
  84. </head>
  85. <body scroll=no onload=OnLoad()>
  86. <DIV style="position:absolute; top:0; left:0">
  87. <TABLE WIDTH="100%" cellspacing="0" cellpadding="0" COLS="2">
  88. <TR>
  89. <TD><SPAN style="width:32px"></SPAN></TD>
  90. <TD id="TaskpadName"></TD>
  91. </TR>
  92. </TABLE>
  93. </DIV>
  94. <TABLE WIDTH="100%" HEIGHT="100%" cellspacing="0" cellpadding="0" COLS="2">
  95. <TR>
  96. <TD id="LeftPanel" ROWSPAN="2" WIDTH="212px">
  97. <object id='FolderIcon' classid="clsid:B0395DA5-6A15-4E44-9F36-9A9DC7A2F341" tabIndex='-1'></object>
  98. </TD>
  99. <TD ID="RightPanel" bgColor="activecaption" VALIGN="TOP" WIDTH="100%" style="height:expression(TaskpadName.clientHeight);">
  100. </TD>
  101. </TR>
  102. <TR>
  103. <TD HEIGHT="10"></TD>
  104. </TR>
  105. <TR>
  106. <TD>
  107. <DIV id="DisplayNameElem">
  108. </DIV>
  109. </TD>
  110. <TD height="100%" ROWSPAN="2" id="ViewPanel"></TD>
  111. </TR>
  112. <TR>
  113. <TD HEIGHT="100%">
  114. <DIV STYLE="overflow: auto; height:100%; padding-left:5; padding-right:5; word-wrap:break-word">
  115. <SPAN id="DetailsElem"></SPAN>
  116. <span id=DescriptionElem></span>
  117. </DIV>
  118. </TD>
  119. </TR>
  120. </TABLE>
  121. <object id=MMCEvents classid="clsid:ADE6444B-C91F-4e37-92A4-5BB430A33340"></object>
  122. </body>
  123. </html>