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.

44 lines
1.3 KiB

  1. function PageInit()
  2. {
  3. top.window.PopulateLeftPane();
  4. var szName = top.window.GetUserDisplayName(top.window.g_oSelectedUser);
  5. var szTitle = top.window.IsSelf() ? idPageTitle.innerHTML : idAltPageTitle.innerHTML;
  6. idPageTitle.innerHTML = szTitle.replace(/%1/g, szName);
  7. idTaskTitle.innerHTML = idTaskTitle.innerHTML.replace(/%1/g, szName);
  8. idWelcome.ttText = top.window.L_Welcome_ToolTip;
  9. idStart.ttText = top.window.L_Start_ToolTip;
  10. idNameInput.value = szName;
  11. idNameInput.createTextRange().select();
  12. idNameInput.focus();
  13. }
  14. function ApplyNameChange()
  15. {
  16. var szName = GetText(idNameInput);
  17. if (szName.length != 0)
  18. {
  19. var oUser = top.window.g_oSelectedUser;
  20. if (szName.toLowerCase() != top.window.GetUserDisplayName(oUser).toLowerCase())
  21. {
  22. var szMsg = ValidateAccountName(szName);
  23. if (szMsg)
  24. {
  25. alert(szMsg);
  26. idNameInput.createTextRange().select();
  27. idNameInput.focus();
  28. return false;
  29. }
  30. }
  31. if (oUser.setting("DisplayName") != szName)
  32. oUser.setting("DisplayName") = szName;
  33. top.window.g_Navigator.navigate("mainpage.htm", true);
  34. }
  35. else
  36. idNameInput.focus();
  37. }