1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5
<script src="switchStyle.js"></script>
6
<script src="shared.js"></script>
9
var editListW = new Array();
10
function listSelected(selector) {
11
if (selector.selectedIndex == 0)
14
var opt = selector.options[selector.selectedIndex];
15
if (!editListW[opt.value] || editListW[opt.value].closed)
16
editListW[opt.value] = open("groupchat_modifylist.html?"+opt.value,makeWindowName(opt.value+parent.top.jid),"width=400,height=400,resizable=yes,scrollbars=yes");
17
editListW[opt.value].focus();
21
var role = parent.top.roster.me.role;
22
var affiliation = parent.top.roster.me.affiliation;
24
if (role == 'moderator' || affiliation == 'admin' || affiliation == 'owner') {
25
/* build list selector */
26
var list_selector = document.getElementById('list_selector');
29
for (var i=1; i<list_selector.options.length; i++)
30
list_selector.options[i] = null;
32
// add items based on affiliation
34
list_selector.options[optidx++] = new Option(loc('Voice'),"role=participant&http://jabber.org/protocol/muc#admin&"+msgEscape(loc('Voice List')));
35
if (affiliation == 'admin' || affiliation == 'owner') {
36
list_selector.options[optidx++] = new Option(loc('Ban'),"affiliation=outcast&http://jabber.org/protocol/muc#admin&"+msgEscape(loc('Ban List')));
37
list_selector.options[optidx++] = new Option(loc('Member'),"affiliation=member&http://jabber.org/protocol/muc#admin&"+msgEscape(loc('Member List')));
38
list_selector.options[optidx++] = new Option(loc('Moderator'),"role=moderator&http://jabber.org/protocol/muc#admin&"+msgEscape(loc('Moderator List')));
41
if (affiliation == 'owner'){
42
list_selector.options[optidx++] = new Option(loc('Admin'),"affiliation=admin&http://jabber.org/protocol/muc#owner&"+msgEscape(loc('Admin List')));
43
list_selector.options[optidx++] = new Option(loc('Owner'),"affiliation=owner&http://jabber.org/protocol/muc#owner&"+msgEscape(loc('Owner List')));
46
document.getElementById('list_editor').style.display = '';
49
document.getElementById('list_editor').style.display = 'none';
55
for (var i=0;i<editListW.length; i++)
56
if (editListW[i] && !editListW[i].closed)
63
<body style="margin:8px;">
64
<table width="100%" height="100%" style="margin: 0px; padding: 0px; border: 0;">
66
<td height="100%" width="100%"><iframe src="groupchat_iroster.html" id="groupchatIRoster" name="groupchatIRoster" scrolling="auto" style="width:100%;height:100%;border:2px groove;" frameborder=0></iframe></td></tr>
67
<tr id="list_editor" style="display:none;">
68
<td width="100%"><div style="font-size: 0.8em;"><l>Modify List</l></div>
69
<select id="list_selector" style="width: 100%; font-size: 0.8em;" onChange="listSelected(this);">
70
<option value=''> </option></td></tr>