home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-macos9-1.3.1.sea.bin / Mozilla1.3.1 / Chrome / comm.jar / content / communicator / profile / confirmMigration.js next >
Text File  |  2003-06-08  |  1KB  |  35 lines

  1. var gMigrationBundle;
  2. var profile = Components.classes["@mozilla.org/profile/manager;1"].getService();
  3. profile = profile.QueryInterface(Components.interfaces.nsIProfileInternal);
  4.  
  5. function handleOKButton()
  6. {
  7.   profile.automigrate = true;
  8.   return true;
  9. }
  10. function handleCancelButton()
  11. {
  12.   profile.automigrate = false;
  13.   return true;
  14. }
  15.  
  16. function onLoad()
  17. {
  18.   gMigrationBundle = document.getElementById("bundle_migration");
  19.  
  20.   doSetOKCancel(handleOKButton, handleCancelButton);
  21.   var okButton = document.getElementById("ok");
  22.   var cancelButton = document.getElementById("cancel");
  23.   if (!okButton || !cancelButton)
  24.     return false;
  25.  
  26.   okButton.setAttribute("label", gMigrationBundle.getString("migrate"));
  27.   okButton.setAttribute("class", okButton.getAttribute("class") + " padded");
  28.   cancelButton.setAttribute("label", gMigrationBundle.getString("newprofile"));
  29.   cancelButton.setAttribute("class", cancelButton.getAttribute("class") + " padded");
  30.   okButton.focus();
  31.   centerWindowOnScreen();
  32.   return true;
  33. }
  34.  
  35.