~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/editor/ui/dialogs/content/EdDialogTemplate.js

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
24
//Cancel() is in EdDialogCommon.js
 
25
var insertNew = true;
 
26
var tagname = "TAG NAME"
 
27
 
 
28
// dialog initialization code
 
29
function Startup()
 
30
{
 
31
  if (!GetCurrentEditor())
 
32
  {
 
33
    window.close();
 
34
    return;
 
35
  }
 
36
  // gDialog is declared in EdDialogCommon.js
 
37
  // Set commonly-used widgets like this:
 
38
  gDialog.fooButton = document.getElementById("fooButton");
 
39
 
 
40
  initDialog();
 
41
  
 
42
  // Set window location relative to parent window (based on persisted attributes)
 
43
  SetWindowLocation();
 
44
 
 
45
  // Set focus to first widget in dialog, e.g.:
 
46
  SetTextboxFocus(gDialog.fooButton);
 
47
}
 
48
 
 
49
function InitDialog() 
 
50
{
 
51
  // Initialize all dialog widgets here,
 
52
  // e.g., get attributes from an element for property dialog
 
53
}
 
54
 
 
55
function onAccept()
 
56
{
 
57
  // Validate all user data and set attributes and possibly insert new element here
 
58
  // If there's an error the user must correct, return false to keep dialog open.
 
59
  
 
60
  SaveWindowLocation();
 
61
  return true; // do close the window
 
62
}