1 | /* ***** BEGIN LICENSE BLOCK ***** |
---|
2 | This program is free software; you can redistribute it and/or modify |
---|
3 | it under the terms of the GNU General Public License as published by |
---|
4 | the Free Software Foundation; either version 2 of the License, or |
---|
5 | (at your option) any later version. |
---|
6 | |
---|
7 | This program is distributed in the hope that it will be useful, |
---|
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
10 | GNU General Public License for more details. |
---|
11 | |
---|
12 | You should have received a copy of the GNU General Public License |
---|
13 | along with this program; if not, write to the Free Software |
---|
14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
15 | |
---|
16 | The Original Code is the Virtual Identity Extension. |
---|
17 | |
---|
18 | The Initial Developer of the Original Code is Rene Ejury. |
---|
19 | Portions created by the Initial Developer are Copyright (C) 2007 |
---|
20 | the Initial Developer. All Rights Reserved. |
---|
21 | |
---|
22 | Contributor(s): |
---|
23 | * ***** END LICENSE BLOCK ***** */ |
---|
24 | |
---|
25 | Components.utils.import("resource://v_identity/vI_nameSpaceWrapper.js"); |
---|
26 | virtualIdentityExtension.ns(function () { |
---|
27 | with(virtualIdentityExtension.LIB) { |
---|
28 | var Dialog = { |
---|
29 | setDescription: function (object, description) { |
---|
30 | var new_text = document.createTextNode(description); |
---|
31 | object.appendChild(new_text); |
---|
32 | }, |
---|
33 | |
---|
34 | init: function (warning) { |
---|
35 | document.getElementById("virtualIdentityExtension_Dialog").setAttribute("class", warning.class); |
---|
36 | Dialog.setDescription(document.getElementById("virtualIdentityExtension_Dialog_title"), warning.title); |
---|
37 | Dialog.setDescription(document.getElementById("virtualIdentityExtension_Dialog_recLabel"), warning.recLabel); |
---|
38 | Dialog.setDescription(document.getElementById("virtualIdentityExtension_Dialog_recipient"), warning.recipient); |
---|
39 | document.getElementById("virtualIdentityExtension_Dialog_browser").outputString = warning.warning; |
---|
40 | Dialog.setDescription(document.getElementById("virtualIdentityExtension_Dialog_query"), warning.query); |
---|
41 | // show abort button |
---|
42 | if (warning.class == "replaceVIdentity") { |
---|
43 | document.documentElement.getButton("extra1").hidden = true; |
---|
44 | document.documentElement.getButton("extra2").hidden = true; |
---|
45 | } |
---|
46 | } |
---|
47 | } |
---|
48 | vI.Dialog = Dialog; |
---|
49 | } |
---|
50 | }); |
---|