home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / software / netscape62win / browser.xpi / bin / chrome / comm.jar / content / editor / EditConflict.js < prev    next >
Encoding:
JavaScript  |  2001-05-09  |  1.6 KB  |  60 lines

  1. /* 
  2.  * The contents of this file are subject to the Netscape Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/NPL/
  6.  *  
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  *  
  12.  * The Original Code is Mozilla Communicator client code, released
  13.  * March 31, 1998.
  14.  * 
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation. Portions created by Netscape are
  17.  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  * 
  20.  * Contributor(s): 
  21.  */
  22.  
  23. // dialog initialization code
  24. function Startup()
  25. {
  26.   if (!InitEditorShell())
  27.     return;
  28.   
  29.   //doSetOkCancel(null,PreventCancel);
  30.   SetWindowLocation();
  31. }
  32.  
  33. function KeepCurrentPage()
  34. {
  35. dump("KeepCurrentPage\n");
  36.   // Simple close dialog and don't change current page
  37.   //TODO: Should we force saving of the current page?
  38.   SaveWindowLocation();
  39.   window.close();
  40.   return;
  41. }
  42.  
  43. function UseOtherPage()
  44. {
  45. dump("UseOtherPage\n");
  46.   // Reload the URL -- that will get other editor's contents
  47.   //editorShell.LoadUrl(editorShell.editorDocument.location);
  48.   setTimeout("editorShell.LoadUrl(editorShell.editorDocument.location)", 10);
  49.   SaveWindowLocation();
  50.   window.close();
  51. }
  52.  
  53. function PreventCancel()
  54. {
  55.   SaveWindowLocation();
  56.  
  57.   // Don't let Esc key close the dialog!
  58.   return false;
  59. }
  60.