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.

119 lines
3.0 KiB

  1. // TODO:
  2. // * replace _MODULE_ with the name of your module
  3. // * replace _MODULEDIR_ with the name of your module directory
  4. //
  5. var g__MODULE_ImgDir="images/";
  6. var g__MODULE_LastPage="";
  7. function _MODULE__InitSimpleNavMap()
  8. {
  9. // TODO: Add each page in your module to the simple navigation map. This map
  10. // will be used for navigation within your module. This map is a
  11. // Scripting.Dictionary object that maps the current page to the path to the
  12. // next page.
  13. //
  14. var _MODULE__dir="html\\_MODULEDIR_\\";
  15. try
  16. {
  17. g_SimpleNavMap.Add("_MODULE_.htm", _MODULE__dir+"_MODULE__a.htm");
  18. }
  19. catch(err)
  20. {
  21. err.description = "g_InitSimpleNavMap.Add failed. Possible duplicate key.";
  22. logError("_MODULE__InitSimpleNavMap", err);
  23. throw err;
  24. }
  25. // TODO: set global variable to the name of the last file in your module.
  26. // The shell will use this to decide when your module is complete.
  27. //
  28. g__MODULE_LastPage = "_MODULE_.htm";
  29. }
  30. function _MODULE_FirstPage_LoadMe()
  31. {
  32. try
  33. {
  34. // REQUIRED INITIALIZATION. This code sets up the navigation buttons and
  35. // links to the core OOBE shell scripts. Do not modify this code other than
  36. // changing _MODULE_ to the name of your module.
  37. //
  38. InitFrameRef('External');
  39. if (g.btnNext != null)
  40. g_FirstFocusElement = g.btnNext;
  41. else if (g.btnSkip != null)
  42. g_FirstFocusElement = g.btnSkip;
  43. else if (g.btnBack != null)
  44. g_FirstFocusElement = g.btnBack;
  45. InitButtons("Do_MODULE_Buttons");
  46. if (g_FirstFocusElement != null)
  47. g_FirstFocusElement.focus();
  48. else
  49. g.document.body.focus();
  50. if(GetCurrentPageName()=="_MODULE_.htm")
  51. {
  52. // manually undo InitButton work for this case
  53. g.btnSkip.onclick = GoCancel;
  54. g.btnBack.onclick = GoBack;
  55. }
  56. // TODO: Add initialization code here.
  57. //
  58. // TODO: Change g_FirstFocusElement prior to setting focus if necessary.
  59. //
  60. g_FirstFocusElement.focus();
  61. }
  62. catch(err)
  63. {
  64. logError("_MODULE__FirstPage_LoadMe", err);
  65. throw err;
  66. }
  67. }
  68. // TODO: copy this function for each interior page that needs specific
  69. // initialization. If a page does not need specific initialization you can
  70. // call window.parent._Default_LoadMe("Do_MODULE_Buttons") instead to set up
  71. // button navigation and global links.
  72. //
  73. function _MODULE_InteriorPage_LoadMe() {
  74. try
  75. {
  76. // REQUIRED INITIALIZATION. This code sets up the navigation buttons and
  77. // links to the core OOBE shell scripts. Do not modify this code other than
  78. // changing _MODULE_ to the name of your module.
  79. //
  80. InitFrameRef('External');
  81. g_FirstFocusElement = g.btnNext;
  82. InitButtons("Do_MODULE_Buttons");
  83. // TODO: Add initialization code here.
  84. //
  85. // TODO: Change g_FirstFocusElement prior to setting focus if necessary.
  86. //
  87. g_FirstFocusElement.focus();
  88. }
  89. catch(err)
  90. {
  91. logError("_MODULE__InteriorPage_LoadMe", err);
  92. throw err;
  93. }
  94. }
  95. function _MODULE_GetLastPage()
  96. {
  97. return g__MODULE_LastPage;
  98. }