| 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 | virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) { |
|---|
| 26 | var Dialog = { |
|---|
| 27 | setDescription : function(object, description) { |
|---|
| 28 | var new_text = document.createTextNode(description); |
|---|
| 29 | object.appendChild(new_text); |
|---|
| 30 | }, |
|---|
| 31 | |
|---|
| 32 | init : function(warning) { |
|---|
| 33 | dump("warning.class=" + warning.class + "warning.class=" + warning.title + "warning.warning=" + warning.warning + "\n") |
|---|
| 34 | document.getElementById("vI_Dialog").setAttribute("class", warning.class); |
|---|
| 35 | Dialog.setDescription(document.getElementById("vI_Dialog_title"), warning.title); |
|---|
| 36 | Dialog.setDescription(document.getElementById("vI_Dialog_recLabel"), warning.recLabel); |
|---|
| 37 | Dialog.setDescription(document.getElementById("vI_Dialog_recipient"), warning.recipient); |
|---|
| 38 | document.getElementById("vI_Dialog_browser").outputString = warning.warning; |
|---|
| 39 | Dialog.setDescription(document.getElementById("vI_Dialog_query"), warning.query); |
|---|
| 40 | // show abort button |
|---|
| 41 | if (warning.class == "replaceVIdentity") { |
|---|
| 42 | document.documentElement.getButton("extra1").hidden = true; |
|---|
| 43 | document.documentElement.getButton("extra2").hidden = true; |
|---|
| 44 | } |
|---|
| 45 | } |
|---|
| 46 | } |
|---|
| 47 | vI.Dialog = Dialog; |
|---|
| 48 | }}); |
|---|