From fcdf86c3d914652a3d63a70706a21eaf96950f4f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 15 Apr 2007 23:43:26 +0000 Subject: Bug 182082: Help system should support more browsers - Patch by Teemu Mannermaa r=myk a=LpSolit --- js/help.js | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ js/util.js | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 js/help.js create mode 100644 js/util.js (limited to 'js') diff --git a/js/help.js b/js/help.js new file mode 100644 index 000000000..938a73a8b --- /dev/null +++ b/js/help.js @@ -0,0 +1,108 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is the Bugzilla Bug Tracking System. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Gervase Markham + * + * ***** END LICENSE BLOCK ***** */ + +var g_helpTexts = new Object(); +var g_helpIframe; +var g_helpDiv; + +/** + * Generate help controls during page construction. + * + * @return Boolean; true if controls were created and false if not. + */ +function generateHelp() +{ + // Only enable help if controls can be hidden + if (!document.body.style) + return false; + + // Create help controls (a div to hold help text and an iframe + // to mask any and all controls under the popup) + document.write('