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.

251 lines
7.5 KiB

  1. <HTML>
  2. <!-- Copyright � 2001 Microsoft Corporation. All rights reserved. -->
  3. <HEAD>
  4. <STYLE>
  5. body
  6. {
  7. background-color: threedface;
  8. color: buttontext;
  9. font-family:verdana;
  10. font-size:smaller;
  11. }
  12. table
  13. {
  14. background-color: threedface;
  15. color: buttontext;
  16. font-size: 11;
  17. border-style: none;
  18. border-width: 0px;
  19. }
  20. td
  21. {
  22. vertical-align: top;
  23. border-style : none;
  24. border-width : 0px;
  25. padding : 0px;
  26. }
  27. input.edit
  28. {
  29. font-family: verdana;
  30. border-style:solid;
  31. border-width: 1px;
  32. background-color: #F0C8B4;
  33. height:1.75em;
  34. }
  35. input.btn
  36. {
  37. font-family: verdana;
  38. cursor:hand;
  39. border-style:solid;
  40. border-width: 1px;
  41. background-color: buttonface;
  42. height:1.75em;
  43. width:6em;
  44. margin-bottom:1ex;
  45. }
  46. </STYLE>
  47. </HEAD>
  48. <BODY tabindex="-1">
  49. <OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" ID="Object1" VIEWASTEXT>
  50. <PARAM NAME="LPKPath" VALUE="mscomctl.LPK" />
  51. </OBJECT>
  52. <table width="100%" height="100%" border=0 ID="Table1">
  53. <tr><td align="center" valign="middle">
  54. <OBJECT id=theList codeBase=mscomctl.cab#Version=6,0,88,62 height="100%" align="middle"
  55. width="100%" classid=clsid:BDD1F04B-858B-11D1-B16A-00C0F0283628 VIEWASTEXT>
  56. <PARAM NAME="_ExtentX" VALUE="23283">
  57. <PARAM NAME="_ExtentY" VALUE="10319">
  58. <PARAM NAME="SortKey" VALUE="0">
  59. <PARAM NAME="View" VALUE="0">
  60. <PARAM NAME="Arrange" VALUE="0">
  61. <PARAM NAME="LabelEdit" VALUE="0">
  62. <PARAM NAME="SortOrder" VALUE="0">
  63. <PARAM NAME="Sorted" VALUE="0">
  64. <PARAM NAME="MultiSelect" VALUE="0">
  65. <PARAM NAME="LabelWrap" VALUE="-1">
  66. <PARAM NAME="HideSelection" VALUE="-1">
  67. <PARAM NAME="HideColumnHeaders" VALUE="0">
  68. <PARAM NAME="OLEDragMode" VALUE="0">
  69. <PARAM NAME="OLEDropMode" VALUE="0">
  70. <PARAM NAME="AllowReorder" VALUE="0">
  71. <PARAM NAME="Checkboxes" VALUE="0">
  72. <PARAM NAME="FlatScrollBar" VALUE="0">
  73. <PARAM NAME="FullRowSelect" VALUE="0">
  74. <PARAM NAME="GridLines" VALUE="1">
  75. <PARAM NAME="HotTracking" VALUE="0">
  76. <PARAM NAME="HoverSelection" VALUE="0">
  77. <PARAM NAME="PictureAlignment" VALUE="0">
  78. <PARAM NAME="TextBackground" VALUE="0">
  79. <PARAM NAME="_Version" VALUE="393217">
  80. <PARAM NAME="ForeColor" VALUE="-2147483640">
  81. <PARAM NAME="BackColor" VALUE="-2147483643">
  82. <PARAM NAME="BorderStyle" VALUE="1">
  83. <PARAM NAME="Appearance" VALUE="1">
  84. <PARAM NAME="MousePointer" VALUE="0">
  85. <PARAM NAME="Enabled" VALUE="1">
  86. <PARAM NAME="NumItems" VALUE="0">
  87. <SPAN STYLE="color:red">The List Control failed to Load...</SPAN>
  88. </OBJECT>
  89. </td></tr>
  90. </table>
  91. </BODY>
  92. </HTML>
  93. <SCRIPT>
  94. function InitializeListView()
  95. {
  96. var bObjLoaded = false;
  97. var iCnt = 0;
  98. var allObjects = document.all.tags("OBJECT");
  99. // Check if the listview object is loaded...
  100. while ( (!bObjLoaded) && (iCnt < allObjects.length) )
  101. {
  102. if ( ("theList" == allObjects(iCnt).id) )
  103. bObjLoaded = true;
  104. iCnt = iCnt + 1;
  105. }
  106. // If listview is loaded, then Initialize the defect list.
  107. if ( bObjLoaded )
  108. {
  109. InitializeDefectListUI();
  110. OnPopulateDefectList();
  111. return true;
  112. }
  113. return false;
  114. }
  115. function InitializeDefectListUI()
  116. {
  117. //
  118. // Adjust the properties of the defect listview
  119. //
  120. theList.View = 3; // lvwReport
  121. theList.FullRowSelect = true;
  122. theList.HideSelection = false;
  123. theList.AllowColumnReorder = true;
  124. theList.LabelEdit = 1; // lvwManual;
  125. theList.Sorted = false;
  126. // Add columns to the defect listview
  127. var columns = theList.ColumnHeaders;
  128. columns.Add(columns.Count + 1, "number(@_seq)" , "No." , 25 , 0);
  129. columns.Add(columns.Count + 1, "TARGETFILE" , "Target File" , 225 , 0); // lvwColumnLeft = 0
  130. // columns.Add(columns.Count + 1, "TITLE" , "Title" , 225 , 0); // lvwColumnLeft = 0
  131. columns.Add(columns.Count + 1, "number(LOCATION)" , "Location" , 60 , 0); // lvwColumnLeft = 0
  132. columns.Add(columns.Count + 1, "TERM" , "Term" , 78 , 0); // lvwColumnLeft = 0
  133. columns.Add(columns.Count + 1, "CONTEXT" , "Context" , 250 , 0); // lvwColumnLeft = 0
  134. columns.Add(columns.Count + 1, "number(SEVERITY)" , "Severity" , 45 , 0); // lvwColumnRight = 1
  135. columns.Add(columns.Count + 1, "TERMCLASS" , "TermClass" , 140 , 0);
  136. }
  137. function OnPopulateDefectList()
  138. {
  139. // clear the listview contents.
  140. theList.ListItems.Clear();
  141. var bSev1Only = parent.ShowOnlySev1Issues();
  142. // Create the xml object and load the results file
  143. var g_xmlObj = new ActiveXObject("Msxml2.DOMDocument");
  144. g_xmlObj.async = false;
  145. g_xmlObj.load(parent.GetXmlFile());
  146. var root = g_xmlObj.documentElement;
  147. var objResults = root.selectNodes("Result/Object");
  148. var objListItems = theList.ListItems;
  149. var cListItems = objListItems.Count;
  150. var strNumber = 0;
  151. for (var i=0; i<objResults.length; ++i)
  152. {
  153. var defect = objResults(i);
  154. // Extract the XML data and format the strings
  155. var strTerm = defect.selectSingleNode("Term").text;
  156. var strLocation = defect.selectSingleNode("Position").text;
  157. var strSeverity = defect.selectSingleNode("Severity").text;
  158. var strTermClass = defect.selectSingleNode("TermClass").text;
  159. var strContext = defect.selectSingleNode("Context").text;
  160. var strTitle = defect.selectSingleNode("Title").text;
  161. var strFile = defect.getAttribute("URL");
  162. if ( (bSev1Only) && ("1" != strSeverity) )
  163. continue;
  164. // Add the defect to the listview
  165. var item = objListItems.Add(++cListItems, "", ++strNumber);
  166. var subitems = item.ListSubItems;
  167. var vUndefined;
  168. subitems.Add(subitems.Count + 1, "", strFile , vUndefined, strFile);
  169. // subitems.Add(subitems.Count + 1, "", strTitle , vUndefined, strTitle);
  170. subitems.Add(subitems.Count + 1, "", strLocation , vUndefined, strLocation);
  171. subitems.Add(subitems.Count + 1, "", strTerm , vUndefined, strTerm);
  172. subitems.Add(subitems.Count + 1, "", strContext , vUndefined, strContext);
  173. subitems.Add(subitems.Count + 1, "", strSeverity , vUndefined, strSeverity);
  174. subitems.Add(subitems.Count + 1, "", strTermClass, vUndefined, strTermClass);
  175. if ( strNumber == 1 )
  176. item.Selected = true;
  177. }
  178. // Give focus to the listview
  179. theList.focus();
  180. // Ensure that the selected item is visible
  181. if (theList.SelectedItem)
  182. theList.SelectedItem.EnsureVisible();
  183. if (theList.object.SelectedItem)
  184. theList.object.SelectedItem.EnsureVisible();
  185. }
  186. function theList::ItemClick(item)
  187. {
  188. item.Selected = true;
  189. if (theList.SelectedItem)
  190. {
  191. var strID = item.Text;
  192. var subitems = item.ListSubItems;
  193. var strTerm = subitems(3);
  194. //var strTerm = subitems(4);
  195. parent.PopulateComment(strTerm);
  196. }
  197. }
  198. function GetFirstTerm()
  199. {
  200. if ( theList.ListItems.Count > 0 )
  201. {
  202. var item = theList.ListItems(1);
  203. var subitems = item.ListSubItems;
  204. var strTerm = subitems(3);
  205. return strTerm;
  206. }
  207. }
  208. </SCRIPT>
  209. </BODY>
  210. </HTML>