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 rdfAccountMismatchDialog = { |
---|
27 | mismatchItems : null, |
---|
28 | type : null, |
---|
29 | |
---|
30 | init : function() { |
---|
31 | rdfAccountMismatchDialog.type = window.arguments[0]; |
---|
32 | rdfAccountMismatchDialog.mismatchItems = window.arguments[1]; |
---|
33 | |
---|
34 | // display the relevant help-tags |
---|
35 | document.getElementById("rdfAccountMismatchDialog_vbox_" + rdfAccountMismatchDialog.type).removeAttribute("hidden"); |
---|
36 | document.getElementById("rdfAccountMismatchDialog_listhead_" + rdfAccountMismatchDialog.type).removeAttribute("hidden"); |
---|
37 | |
---|
38 | for (var i = 0; i < rdfAccountMismatchDialog.mismatchItems.length; i++) { |
---|
39 | // var label = document.createElement("label"); |
---|
40 | var listitem = document.createElement("listitem"); |
---|
41 | listitem.setAttribute("id", "mismatchLine_" + i); |
---|
42 | listitem.setAttribute("class", "mismatchLine"); |
---|
43 | listitem.setAttribute("type",rdfAccountMismatchDialog.type); |
---|
44 | listitem.setAttribute("oldkey",rdfAccountMismatchDialog.mismatchItems[i].oldkey); |
---|
45 | listitem.setAttribute("label",rdfAccountMismatchDialog.mismatchItems[i].label); |
---|
46 | listitem.setAttribute("ext1",rdfAccountMismatchDialog.mismatchItems[i].ext1); |
---|
47 | listitem.setAttribute("ext2",rdfAccountMismatchDialog.mismatchItems[i].ext2); |
---|
48 | listitem.setAttribute("count",rdfAccountMismatchDialog.mismatchItems[i].count); |
---|
49 | document.getElementById("rdfAccountMismatchDialog_listbox").appendChild(listitem) |
---|
50 | } |
---|
51 | }, |
---|
52 | |
---|
53 | accept : function() { |
---|
54 | for (var i = 0; i < rdfAccountMismatchDialog.mismatchItems.length; i++) { |
---|
55 | rdfAccountMismatchDialog.mismatchItems[i].key = document.getElementById("mismatchLine_" + i).key |
---|
56 | } |
---|
57 | /* window.argument[2] stores callback parent */ |
---|
58 | window.arguments[2].repairAccountMismatch(rdfAccountMismatchDialog.type, rdfAccountMismatchDialog.mismatchItems); |
---|
59 | } |
---|
60 | } |
---|
61 | window.addEventListener("load", rdfAccountMismatchDialog.init, false); |
---|
62 | vI.rdfAccountMismatchDialog = rdfAccountMismatchDialog; |
---|
63 | }}); |
---|