home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / mozil06.zip / bin / chrome / messenger.jar / content / messenger / importProgress.js < prev    next >
Text File  |  2001-02-14  |  2KB  |  72 lines

  1. /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2.  *
  3.  * The contents of this file are subject to the Mozilla Public
  4.  * License Version 1.1 (the "License"); you may not use this file
  5.  * except in compliance with the License. You may obtain a copy of
  6.  * the License at http://www.mozilla.org/MPL/
  7.  *
  8.  * Software distributed under the License is distributed on an "AS
  9.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  10.  * implied. See the License for the specific language governing
  11.  * rights and limitations under the License.
  12.  *
  13.  * The Original Code is mozilla.org code.
  14.  *
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation.  Portions created by Netscape are
  17.  * Copyright (C) 1999 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  *
  20.  * Contributor(s):
  21.  */
  22.  
  23. var progressMeter = 0;
  24. var progressInfo = null;
  25. var progressStatus = null;
  26.  
  27. function OnLoadProgressDialog()
  28. {
  29.     
  30.     
  31.     dump( "*** Loaded progress window\n");
  32.  
  33.     top.progressMeter = document.getElementById( 'progressMeter');
  34.     top.progressStatus = document.getElementById( 'progressStatus');
  35.  
  36.     // look in arguments[0] for parameters
  37.     if (window.arguments && window.arguments[0])
  38.     {
  39.         // keep parameters in global for later
  40.         if ( window.arguments[0].windowTitle )
  41.             top.window.title = window.arguments[0].windowTitle;
  42.         
  43.         if ( window.arguments[0].progressTitle )
  44.             document.getElementById( 'progressTitle').setAttribute( "value", window.arguments[0].progressTitle);
  45.         
  46.         if ( window.arguments[0].progressStatus )
  47.             top.progressStatus.setAttribute( "value", window.arguments[0].progressStatus);
  48.         
  49.         top.progressInfo = window.arguments[0].progressInfo;
  50.     }
  51.  
  52.     top.progressInfo.progressWindow = top.window;
  53.     top.progressInfo.intervalState = setInterval( "Continue()", 100);
  54.  
  55. }
  56.  
  57. function SetStatusText( val)
  58. {
  59.     top.progressStatus.setAttribute( "value", val);
  60. }
  61.  
  62. function SetProgress( val)
  63. {
  64.     top.progressMeter.setAttribute( "value", val);
  65. }
  66.  
  67. function Continue()
  68. {
  69.     top.progressInfo.mainWindow.ContinueImport( top.progressInfo);
  70. }
  71.  
  72.