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.

122 lines
4.1 KiB

  1. function DoNothing()
  2. {
  3. // Stub
  4. }
  5. //*******************************
  6. // DYNAMIC TASK ELEMENT FUNCTIONS
  7. //*******************************
  8. function BuildTaskTable()
  9. {
  10. // Define start of table
  11. var szNewTable = '<table id=\"tblTask\" class=\"tblTask\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" frame=\"none\">';
  12. // Dynamically load table rows and table cells
  13. for( var i = 0; i <= giTotalButtons; i++ ) {
  14. szNewTable += ' <tr id=\"trTask_' + i + '\">\n';
  15. szNewTable += ' <td id=\"tdTaskLeft_' + i + '\" class=\"tdTaskLeft\" align=\"right\" valign=\"middle\" width=\"56%\" nowrap><!--Insert gaszTaskLeft_HTMLText[index] here--></td>\n';
  16. szNewTable += ' <td id=\"tdTaskRight_' + i + '\" class=\"tdTaskRight\" valign=\"top\" width=\"*\"><a href=\"\" id=\"anchorLink_' + i +'\" class=\"anchorLink\"></a></td>\n';
  17. szNewTable += ' </tr>\n';
  18. }
  19. // Define end of table
  20. szNewTable += '</table>\n';
  21. // Add new table to div container
  22. divTask.insertAdjacentHTML('BeforeEnd', szNewTable );
  23. }
  24. function LoadTaskLeftText()
  25. {
  26. for( var i = 0; i <= giTotalButtons; i++ ) {
  27. document.all('tdTaskLeft_' + i).innerHTML = L_gszTaskPointer_StaticText;
  28. }
  29. }
  30. function LoadTaskRightAnchors()
  31. {
  32. for( var i = 0; i <= giTotalButtons; i++ ) {
  33. document.all('anchorLink_' + i).innerHTML = gaszBtnCaptions[i];
  34. }
  35. }
  36. //***********************************
  37. // DYMANIC DETAILS ELEMENTS FUNCTIONS
  38. //***********************************
  39. function BuildDetailsTable()
  40. {
  41. // Define start of table
  42. var szNewTable = '<table id=\"tblDetails\" class=\"tblDetails\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" frame=\"none\">';
  43. // Dynamically load table rows and table cells
  44. for( var i = 0; i <= giTotalButtons; i++ ) {
  45. szNewTable += ' <tr id=\"trDetails_' + i + '\">\n';
  46. szNewTable += ' <td id=\"tdDetailsLeft_' + i + '\" class=\"tdDetailsLeft\" align=\"left\" valign=\"top\" width=\"30%\" nowrap><!--Insert gaszBtnTooltips[index] here--></td>\n';
  47. szNewTable += ' <td id=\"tdDetailsRight_' + i + '\" class=\"tdDetailsRight\" valign=\"top\" width=\"*\"><!--Insert gaszDetailsRight[index] here--></td>\n';
  48. szNewTable += ' </tr>\n';
  49. }
  50. // Define end of table
  51. szNewTable += '</table>\n';
  52. // Add new table to div container
  53. divDetails.insertAdjacentHTML('BeforeEnd', szNewTable );
  54. }
  55. function LoadDetailsLeftText()
  56. {
  57. for( var i = 0; i <= giTotalButtons; i++ ) {
  58. document.all('tdDetailsLeft_' + i).innerHTML = gaszBtnTooltips[i];
  59. }
  60. }
  61. function LoadDetailsRightText()
  62. {
  63. for( var i = 0; i <= giTotalButtons; i++ ) {
  64. document.all('tdDetailsRight_' + i).innerHTML = gaszDetailsRight[i];
  65. }
  66. }
  67. //*****************
  68. // HELPER FUNCTIONS
  69. //*****************
  70. function HighlightTask( newIndex )
  71. {
  72. // First unhighlight any previously selected task
  73. if( giCurrentTask >= 0 ) {
  74. document.all('tdTaskLeft_' + giCurrentTask).style.visibility = 'hidden';
  75. }
  76. // Now highlight the new task
  77. document.all('tdTaskLeft_' + newIndex).style.visibility = 'visible';
  78. // Load task summary text
  79. divDetails.innerHTML = gaszBtnTooltips[newIndex];
  80. }
  81. //**********************************
  82. // RESIZE FUNCTION FOR SUMMARY PAGES
  83. //**********************************
  84. function ResizeFontsSummary()
  85. {
  86. var iSmallerDimension = GetSmallerDimension();
  87. // Apply custom multipliers
  88. tdTitle.style.fontSize = iSmallerDimension * L_ConstSummaryTitleText_Number;
  89. anchorExit.style.fontSize = iSmallerDimension * L_ConstSummaryExitText_Number;
  90. tdWatermark.style.fontSize = iSmallerDimension * L_ConstWatermarkHomeText_Number;
  91. divHeaderRule.style.fontSize = iSmallerDimension * L_ConstSummaryCaptionText_Number;
  92. divTaskCaption.style.fontSize = iSmallerDimension * L_ConstSummaryCaptionText_Number;
  93. divDetailsCaption.style.fontSize = iSmallerDimension * L_ConstSummaryCaptionText_Number;
  94. divDetails.style.fontSize = iSmallerDimension * L_ConstAnchorLinkText_Number;
  95. tdBranding.style.fontSize = iSmallerDimension * L_ConstBrandingText_Number;
  96. tblTask.style.fontSize = iSmallerDimension * L_ConstAnchorLinkText_Number;
  97. for( var i = 0; i <= giTotalButtons; i++ ) {
  98. document.all('tdTaskLeft_' + i).style.fontSize = iSmallerDimension * L_ConstSummaryToDoPointerSize_Number;
  99. }
  100. }