Rename participants to occupants.

This commit is contained in:
JC Brand 2015-10-31 16:30:06 +00:00
parent 35a4f9bd7e
commit dfcebeb621
50 changed files with 3843 additions and 3882 deletions

View File

@ -340,7 +340,7 @@
'emoticons': true,
'call': false,
'clear': true,
'toggle_participants': true
'toggle_occupants': true
},
websocket_url: undefined,
xhr_custom_status: false,
@ -367,7 +367,7 @@
_.extend(
this.visible_toolbar_buttons,
_.pick(settings.visible_toolbar_buttons, [
'emoticons', 'call', 'clear', 'toggle_participants'
'emoticons', 'call', 'clear', 'toggle_occupants'
]
));
}
@ -2040,7 +2040,7 @@
label_clear: __('Clear all messages'),
label_end_encrypted_conversation: __('End encrypted conversation'),
label_insert_smiley: __('Insert a smiley'),
label_hide_participants: __('Hide the list of participants'),
label_hide_occupants: __('Hide the list of occupants'),
label_refresh_encrypted_conversation: __('Refresh encrypted conversation'),
label_start_call: __('Start a call'),
label_start_encrypted_conversation: __('Start encrypted conversation'),
@ -2052,7 +2052,7 @@
show_call_button: converse.visible_toolbar_buttons.call,
show_clear_button: converse.visible_toolbar_buttons.clear,
show_emoticons: converse.visible_toolbar_buttons.emoticons,
show_participants_toggle: this.is_chatroom && converse.visible_toolbar_buttons.toggle_participants
show_occupants_toggle: this.is_chatroom && converse.visible_toolbar_buttons.toggle_occupants
})
)
);
@ -2673,7 +2673,7 @@
_.extend(
this.model.toJSON(), {
'desc_moderator': __('This user is a moderator'),
'desc_participant': __('This user can send messages in this room'),
'desc_occupant': __('This user can send messages in this room'),
'desc_visitor': __('This user can NOT send messages in this room')
})
);
@ -2693,7 +2693,7 @@
this.ChatRoomOccupantsView = Backbone.Overview.extend({
tagName: 'div',
className: 'participants',
className: 'occupants',
initialize: function () {
this.model.on("add", this.onOccupantAdded, this);
@ -2718,7 +2718,7 @@
view.model = item;
view.initialize();
}
this.$('.participant-list').append(view.render().$el);
this.$('.occupant-list').append(view.render().$el);
},
parsePresence: function (pres) {
@ -2824,7 +2824,7 @@
'click .toggle-smiley ul li': 'insertEmoticon',
'click .toggle-clear': 'clearChatRoomMessages',
'click .toggle-call': 'toggleCall',
'click .toggle-participants a': 'toggleOccupants',
'click .toggle-occupants a': 'toggleOccupants',
'keypress textarea.chat-textarea': 'keyPressed',
'mousedown .dragresize-top': 'onStartVerticalResize',
'mousedown .dragresize-left': 'onStartHorizontalResize',
@ -2905,12 +2905,12 @@
if (!this.model.get('hidden_occupants')) {
this.model.save({hidden_occupants: true});
$el.removeClass('icon-hide-users').addClass('icon-show-users');
this.$('div.participants').addClass('hidden');
this.$('div.occupants').addClass('hidden');
this.scrollDown();
} else {
this.model.save({hidden_occupants: false});
$el.removeClass('icon-show-users').addClass('icon-hide-users');
this.$('div.participants').removeClass('hidden');
this.$('div.occupants').removeClass('hidden');
this.scrollDown();
}
},
@ -3026,7 +3026,7 @@
case 'deop':
if (!this.validateRoleChangeCommand(match[1], args)) { break; }
this.modifyRole(
this.model.get('jid'), args[0], 'participant', args[1],
this.model.get('jid'), args[0], 'occupant', args[1],
undefined, this.onCommandError.bind(this));
break;
case 'help':
@ -3034,7 +3034,7 @@
'<strong>/admin</strong>: ' +__("Change user's affiliation to admin"),
'<strong>/ban</strong>: ' +__('Ban user from room'),
'<strong>/clear</strong>: ' +__('Remove messages'),
'<strong>/deop</strong>: ' +__('Change user role to participant'),
'<strong>/deop</strong>: ' +__('Change user role to occupant'),
'<strong>/help</strong>: ' +__('Show this menu'),
'<strong>/kick</strong>: ' +__('Kick user from room'),
'<strong>/me</strong>: ' +__('Write in 3rd person'),
@ -3103,7 +3103,7 @@
case 'voice':
if (!this.validateRoleChangeCommand(match[1], args)) { break; }
this.modifyRole(
this.model.get('jid'), args[0], 'participant', args[1],
this.model.get('jid'), args[0], 'occupant', args[1],
undefined, this.onCommandError.bind(this));
break;
default:
@ -3236,7 +3236,7 @@
function () {
$(this).remove();
that.$el.find('.chat-area').show();
that.$el.find('.participants').removeClass('hidden');
that.$el.find('.occupants').removeClass('hidden');
});
},
@ -3255,7 +3255,7 @@
function () {
$(this).remove();
that.$el.find('.chat-area').show();
that.$el.find('.participants').removeClass('hidden');
that.$el.find('.occupants').removeClass('hidden');
});
},
@ -3296,7 +3296,7 @@
showDisconnectMessage: function (msg) {
this.$('.chat-area').hide();
this.$('.participants').hide();
this.$('.occupants').hide();
this.$('span.centered.spinner').remove();
this.$('.chatroom-body').append($('<p>'+msg+'</p>'));
},

View File

@ -1379,7 +1379,7 @@
#conversejs .chatbox form.sendXMPPMessage .chat-toolbar .private a,
#conversejs .chatbox form.sendXMPPMessage .chat-toolbar .private {
color: #4b7003; }
#conversejs .chatbox form.sendXMPPMessage .chat-toolbar .toggle-participants,
#conversejs .chatbox form.sendXMPPMessage .chat-toolbar .toggle-occupants,
#conversejs .chatbox form.sendXMPPMessage .chat-toolbar .toggle-clear,
#conversejs .chatbox form.sendXMPPMessage .chat-toolbar .toggle-otr {
float: right; }
@ -1879,7 +1879,7 @@
font-weight: bold; }
#conversejs .chatroom .box-flyout .chatroom-body .chat-msg-room {
color: #1A9707; }
#conversejs .chatroom .box-flyout .chatroom-body .participants {
#conversejs .chatroom .box-flyout .chatroom-body .occupants {
display: table-cell;
vertical-align: top;
background-color: white;
@ -1889,16 +1889,16 @@
border-bottom-right-radius: 4px;
width: 100px;
height: 100%; }
#conversejs .chatroom .box-flyout .chatroom-body .participants.hidden {
#conversejs .chatroom .box-flyout .chatroom-body .occupants.hidden {
display: none; }
#conversejs .chatroom .box-flyout .chatroom-body .participants .participants-heading {
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-heading {
padding: 0.3em;
font-weight: bold; }
#conversejs .chatroom .box-flyout .chatroom-body .participants .participant-list {
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupant-list {
height: 100%;
overflow-y: scroll;
list-style: none; }
#conversejs .chatroom .box-flyout .chatroom-body .participants .participant-list li {
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupant-list li {
cursor: default;
display: block;
font-size: 12px;
@ -1907,7 +1907,7 @@
text-overflow: ellipsis;
white-space: nowrap;
width: 100px; }
#conversejs .chatroom .box-flyout .chatroom-body .participants .participant-list li.moderator {
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupant-list li.moderator {
color: #D24E2B; }
#conversejs .chatroom .box-flyout .chatroom-body .chatroom-form-container {
background-color: white;

View File

@ -184,7 +184,7 @@ Changelog
See the `keepalive <https://conversejs.org/docs/html/configuration.html#keepalive>`_ configuration setting. [jcbrand]
* Allow changing of nickname in a chat room via /nick command. [jcbrand]
* Allow a chat room user to be muted or unmuted with the /mute and /voice commands. [jcbrand]
* Add a chat room toolbar button for toggling the list of participants. [jcbrand]
* Add a chat room toolbar button for toggling the list of occupants. [jcbrand]
* Converse.js now responds to XEP-0030: Service Discovery requests. [jcbrand]
* Bugfix. Roster groups all appear offline after page reload (with prebind).
See http://librelist.com/browser//conversejs/2014/8/26/problem-with-contact-list-everyone-is-offline/ [heban and jcbrand]

View File

@ -629,7 +629,7 @@ visible_toolbar_buttons
call: false,
clear: true,
emoticons: true,
toggle_participants: true
toggle_occupants: true
}
Allows you to show or hide buttons on the chat boxes' toolbars.
@ -647,8 +647,8 @@ Allows you to show or hide buttons on the chat boxes' toolbars.
Provides a button for clearing messages from a chat box.
* *emoticons*:
Enables rendering of emoticons and provides a toolbar button for choosing them.
* toggle_participants:
Shows a button for toggling (i.e. showing/hiding) the list of participants in a chat room.
* toggle_occupants:
Shows a button for toggling (i.e. showing/hiding) the list of occupants in a chat room.
.. _`websocket-url`:

View File

@ -73,7 +73,7 @@ Here are the different commands that may be used in a chat room:
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
| **clear** | Clear the messages shown in the chat room. | /clear |
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
| **deop** | Make a moderator a normal participant. | /deop $nickname [$reason] |
| **deop** | Make a moderator a normal occupant. | /deop $nickname [$reason] |
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
| **help** | Show the list of available commands. | /help |
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
@ -85,7 +85,7 @@ Here are the different commands that may be used in a chat room:
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
| **nick** | Change your nickname. | /nick $nickname |
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
| **op** | Make a normal participant a moderator. | /op $nickname [$reason] |
| **op** | Make a normal occupant a moderator. | /op $nickname [$reason] |
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
| **topic** | Set the topic of the chat room. | /topic ${topic text} |
+------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+

View File

@ -246,10 +246,6 @@
null,
""
],
"Hide the list of participants": [
null,
"Verskuil die lys van deelnemers"
],
"Refresh encrypted conversation": [
null,
"Verfris versleutelde gesprek"
@ -470,10 +466,6 @@
null,
"Verban gebruiker uit hierdie kletskamer"
],
"Change user role to participant": [
null,
"Verander gebruikersrol na deelnemer"
],
"Kick user from room": [
null,
"Skop gebruiker uit hierdie kletskamer"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -243,10 +243,6 @@
null,
""
],
"Hide the list of participants": [
null,
"Teilnehmerliste ausblenden"
],
"Refresh encrypted conversation": [
null,
""
@ -467,10 +463,6 @@
null,
"Verbanne einen Benutzer aus dem Raum."
],
"Change user role to participant": [
null,
"Benutzerrolle zu Teilnehmer ändern"
],
"Kick user from room": [
null,
"Werfe einen Benutzer aus dem Raum."

File diff suppressed because it is too large Load Diff

View File

@ -247,7 +247,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -471,7 +471,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -191,7 +191,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -399,7 +399,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -247,10 +247,6 @@
null,
""
],
"Hide the list of participants": [
null,
"Cacher la liste des participants"
],
"Refresh encrypted conversation": [
null,
"Actualiser la conversation cryptée"
@ -471,10 +467,6 @@
null,
"Bannir l'utilisateur du salon"
],
"Change user role to participant": [
null,
"Changer le rôle de l'utilisateur en participant"
],
"Kick user from room": [
null,
"Expulser l'utilisateur du salon"

File diff suppressed because it is too large Load Diff

View File

@ -247,10 +247,6 @@
null,
"הכנס סמיילי"
],
"Hide the list of participants": [
null,
"הסתר רשימת משתתפים"
],
"Refresh encrypted conversation": [
null,
"רענן ישיבה מוצפנת"
@ -471,10 +467,6 @@
null,
"אסור משתמש מתוך חדר"
],
"Change user role to participant": [
null,
"שנה תפקיד משתמש למשתתף"
],
"Kick user from room": [
null,
"בעט משתמש מתוך חדר"

File diff suppressed because it is too large Load Diff

View File

@ -234,10 +234,6 @@
null,
""
],
"Hide the list of participants": [
null,
"A jelenlevők listájának elrejtése"
],
"Refresh encrypted conversation": [
null,
"A titkosított kapcsolat frissítése"

File diff suppressed because it is too large Load Diff

View File

@ -190,7 +190,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -398,7 +398,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -247,7 +247,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -471,7 +471,7 @@
null,
"Bandisci utente dalla stanza"
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -191,7 +191,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -399,7 +399,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -235,10 +235,6 @@
null,
""
],
"Hide the list of participants": [
null,
"Skjul deltakerlisten"
],
"Refresh encrypted conversation": [
null,
"Last inn kryptert samtale på nytt"

File diff suppressed because it is too large Load Diff

View File

@ -191,7 +191,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -399,7 +399,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -235,10 +235,6 @@
null,
""
],
"Hide the list of participants": [
null,
"Ukryj listę rozmówców"
],
"Refresh encrypted conversation": [
null,
"Odśwież szyfrowaną rozmowę"

File diff suppressed because it is too large Load Diff

View File

@ -179,7 +179,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -387,7 +387,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -206,7 +206,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -414,7 +414,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -247,10 +247,6 @@
null,
""
],
"Hide the list of participants": [
null,
"Сховати список учасників"
],
"Refresh encrypted conversation": [
null,
"Оновити криптовану розмову"
@ -471,10 +467,6 @@
null,
"Заблокувати і викинути з кімнати"
],
"Change user role to participant": [
null,
"Зробити користувача учасником"
],
"Kick user from room": [
null,
"Викинути з кімнати"

File diff suppressed because it is too large Load Diff

View File

@ -186,7 +186,7 @@
null,
""
],
"Hide the list of participants": [
"Hide the list of occupants": [
null,
""
],
@ -394,7 +394,7 @@
null,
""
],
"Change user role to participant": [
"Change user role to occupant": [
null,
""
],

File diff suppressed because it is too large Load Diff

View File

@ -153,17 +153,17 @@ $(document).ready(function () {
});
});
$('.toggle-participants a').click(function (ev) {
$('.toggle-occupants a').click(function (ev) {
var $el = $(ev.target);
if ($el.hasClass("icon-hide-users")) {
$el.removeClass('icon-hide-users').addClass('icon-show-users');
$('div.participants').animate({width: 0}).hide();
$('div.occupants').animate({width: 0}).hide();
$el.closest('.chat-area').animate({width: '100%'});
$el.closest('form.sendXMPPMessage').animate({width: '100%'});
} else {
$el.removeClass('icon-show-users').addClass('icon-hide-users');
$el.closest('.chat-area').animate({width: '200px'}, function () {
$('div.participants').css({width: '100px'}).show();
$('div.occupants').css({width: '100px'}).show();
});
$el.closest('form.sendXMPPMessage').animate({width: '200px'});
}

View File

@ -83,21 +83,21 @@
<li><a class="icon-heart" href="#" data-emoticon="<3"></a></li>
</ul>
</li>
<li class="toggle-participants"><a class="icon-hide-users" title="Hide the list of participants"></a></li>
<li class="toggle-occupants"><a class="icon-hide-users" title="Hide the list of occupants"></a></li>
<li class="toggle-clear"><a class="icon-remove" title="Clear all messages"></a></li>
</ul>
<textarea type="text" class="chat-textarea" placeholder="Message"></textarea>
</form>
</div>
<div class="participants">
<div class="occupants">
<form class="room-invite">
<span class="twitter-typeahead" style="position: relative; display: inline-block; direction: ltr;"><input class="invited-contact tt-hint" type="text" readonly="" autocomplete="off" spellcheck="false" tabindex="-1" style="position: absolute; top: 0px; left: 0px; border-color: transparent; box-shadow: none; opacity: 1;"><input class="invited-contact tt-input" placeholder="Invite..." type="text" autocomplete="off" spellcheck="false" dir="auto" style="position: relative; vertical-align: top; background-color: transparent;"><pre aria-hidden="true" style="position: absolute; visibility: hidden; white-space: pre;"></pre><span class="tt-dropdown-menu" style="position: absolute; top: 100%; z-index: 100; display: none; left: 0px; right: auto;"><div class="tt-dataset-contacts-dataset"></div></span></span>
</form>
<label>Occupants:</label>
<ul class="participant-list">
<li class="participant" title="This user can send messages in this room">Obi-wan Kenobi, Jedi Master</li>
<li class="participant" title="This user can send messages in this room">jabber the hut</li>
<li class="participant" title="This user can send messages in this room">leia</li>
<ul class="occupant-list">
<li class="occupant" title="This user can send messages in this room">Obi-wan Kenobi, Jedi Master</li>
<li class="occupant" title="This user can send messages in this room">jabber the hut</li>
<li class="occupant" title="This user can send messages in this room">leia</li>
<li class="moderator" title="This user is a moderator">luke</li>
</ul>
</div>
@ -266,17 +266,17 @@ $(document).ready(function () {
});
});
$('.toggle-participants a').click(function (ev) {
$('.toggle-occupants a').click(function (ev) {
var $el = $(ev.target);
if ($el.hasClass("icon-hide-users")) {
$el.removeClass('icon-hide-users').addClass('icon-show-users');
$('div.participants').animate({width: 0}).hide();
$('div.occupants').animate({width: 0}).hide();
$el.closest('.chat-area').animate({width: '100%'});
$el.closest('form.sendXMPPMessage').animate({width: '100%'});
} else {
$el.removeClass('icon-show-users').addClass('icon-hide-users');
$el.closest('.chat-area').animate({width: '200px'}, function () {
$('div.participants').css({width: '100px'}).show();
$('div.occupants').css({width: '100px'}).show();
});
$el.closest('form.sendXMPPMessage').animate({width: '200px'});
}

View File

@ -380,21 +380,21 @@
<li><a class="icon-heart" href="#" data-emoticon="<3"></a></li>
</ul>
</li>
<li class="toggle-participants"><a class="icon-hide-users" title="Hide the list of participants"></a></li>
<li class="toggle-occupants"><a class="icon-hide-users" title="Hide the list of occupants"></a></li>
<li class="toggle-clear"><a class="icon-remove" title="Clear all messages"></a></li>
</ul>
<textarea type="text" class="chat-textarea" placeholder="Message"></textarea>
</form>
</div>
<div class="participants">
<div class="occupants">
<form class="pure-form room-invite">
<span class="twitter-typeahead" style="position: relative; display: inline-block; direction: ltr;"><input class="invited-contact tt-hint" type="text" readonly="" autocomplete="off" spellcheck="false" tabindex="-1" style="position: absolute; top: 0px; left: 0px; border-color: transparent; box-shadow: none; opacity: 1;"><input class="invited-contact tt-input" placeholder="Invite..." type="text" autocomplete="off" spellcheck="false" dir="auto" style="position: relative; vertical-align: top; background-color: transparent;"><pre aria-hidden="true" style="position: absolute; visibility: hidden; white-space: pre;"></pre><span class="tt-dropdown-menu" style="position: absolute; top: 100%; z-index: 100; display: none; left: 0px; right: auto;"><div class="tt-dataset-contacts-dataset"></div></span></span>
</form>
<p class="participants-heading">Occupants:</strong>
<ul class="participant-list">
<li class="participant" title="This user can send messages in this room">Obi-wan Kenobi, Jedi Master</li>
<li class="participant" title="This user can send messages in this room">jabber the hut</li>
<li class="participant" title="This user can send messages in this room">leia</li>
<p class="occupants-heading">Occupants:</strong>
<ul class="occupant-list">
<li class="occupant" title="This user can send messages in this room">Obi-wan Kenobi, Jedi Master</li>
<li class="occupant" title="This user can send messages in this room">jabber the hut</li>
<li class="occupant" title="This user can send messages in this room">leia</li>
<li class="moderator" title="This user is a moderator">luke</li>
</ul>
</div>
@ -567,17 +567,17 @@ $(document).ready(function () {
});
});
$('.toggle-participants a').click(function (ev) {
$('.toggle-occupants a').click(function (ev) {
var $el = $(ev.target);
if ($el.hasClass("icon-hide-users")) {
$el.removeClass('icon-hide-users').addClass('icon-show-users');
$('div.participants').animate({width: 0}).hide();
$('div.occupants').animate({width: 0}).hide();
$el.closest('.chat-area').animate({width: '100%'});
$el.closest('form.sendXMPPMessage').animate({width: '100%'});
} else {
$el.removeClass('icon-show-users').addClass('icon-hide-users');
$el.closest('.chat-area').animate({width: '200px'}, function () {
$('div.participants').css({width: '100px'}).show();
$('div.occupants').css({width: '100px'}).show();
});
$el.closest('form.sendXMPPMessage').animate({width: '200px'});
}

View File

@ -205,7 +205,7 @@
.private {
color: #4b7003;
}
.toggle-participants,
.toggle-occupants,
.toggle-clear,
.toggle-otr {
float: right;

View File

@ -41,7 +41,7 @@
.chat-msg-room {
color: $message-them-color;
}
.participants {
.occupants {
display: table-cell;
vertical-align: top;
background-color: white;
@ -54,11 +54,11 @@
&.hidden {
display: none;
}
.participants-heading {
.occupants-heading {
padding: 0.3em;
font-weight: bold;
}
.participant-list {
.occupant-list {
height: 100%;
overflow-y: scroll;
list-style: none;

View File

@ -42,7 +42,7 @@
test_utils.openChatRoom('lounge', 'localhost', 'dummy');
var name;
var view = this.chatboxviews.get('lounge@localhost'),
$participants = view.$('.participant-list');
$occupants = view.$('.occupant-list');
spyOn(view, 'onChatRoomPresence').andCallThrough();
var presence, role;
for (var i=0; i<mock.chatroom_names.length; i++) {
@ -62,9 +62,9 @@
this.connection._dataRecv(test_utils.createRequest(presence));
expect(view.onChatRoomPresence).toHaveBeenCalled();
expect($participants.find('li').length).toBe(1+i);
expect($($participants.find('li')[i]).text()).toBe(mock.chatroom_names[i]);
expect($($participants.find('li')[i]).hasClass('moderator')).toBe(role === "moderator");
expect($occupants.find('li').length).toBe(1+i);
expect($($occupants.find('li')[i]).text()).toBe(mock.chatroom_names[i]);
expect($($occupants.find('li')[i]).hasClass('moderator')).toBe(role === "moderator");
}
// Test users leaving the room
@ -85,7 +85,7 @@
}).nodeTree;
this.connection._dataRecv(test_utils.createRequest(presence));
expect(view.onChatRoomPresence).toHaveBeenCalled();
expect($participants.find('li').length).toBe(i);
expect($occupants.find('li').length).toBe(i);
}
}.bind(converse));
@ -105,7 +105,7 @@
.c('status').attrs({code:'110'}).nodeTree;
this.connection._dataRecv(test_utils.createRequest(presence));
var occupant = view.$el.find('.participant-list').find('li');
var occupant = view.$el.find('.occupant-list').find('li');
expect(occupant.length).toBe(1);
expect($(occupant).text()).toBe("moderatorman");
expect($(occupant).attr('class')).toBe('moderator');
@ -274,7 +274,7 @@
* <item affiliation='member'
* jid='hag66@shakespeare.lit/pda'
* nick='oldhag'
* role='participant'/>
* role='occupant'/>
* <status code='303'/>
* <status code='110'/>
* </x>
@ -287,7 +287,7 @@
* <x xmlns='http://jabber.org/protocol/muc#user'>
* <item affiliation='member'
* jid='hag66@shakespeare.lit/pda'
* role='participant'/>
* role='occupant'/>
* <status code='110'/>
* </x>
* </presence>
@ -310,16 +310,16 @@
.c('item').attrs({
affiliation: 'member',
jid: 'dummy@localhost/pda',
role: 'participant'
role: 'occupant'
}).up()
.c('status').attrs({code:'110'}).up()
.c('status').attrs({code:'210'}).nodeTree;
this.connection._dataRecv(test_utils.createRequest(presence));
expect(view.onChatRoomPresence).toHaveBeenCalled();
var $participants = view.$('.participant-list');
expect($participants.children().length).toBe(1);
expect($participants.children().first(0).text()).toBe("oldnick");
var $occupants = view.$('.occupant-list');
expect($occupants.children().length).toBe(1);
expect($occupants.children().first(0).text()).toBe("oldnick");
expect($chat_content.find('div.chat-info').length).toBe(1);
expect($chat_content.find('div.chat-info').html()).toBe(__(view.newNicknameMessages["210"], "oldnick"));
@ -334,7 +334,7 @@
affiliation: 'member',
jid: 'dummy@localhost/pda',
nick: 'newnick',
role: 'participant'
role: 'occupant'
}).up()
.c('status').attrs({code:'303'}).up()
.c('status').attrs({code:'110'}).nodeTree;
@ -343,8 +343,8 @@
expect(view.onChatRoomPresence).toHaveBeenCalled();
expect($chat_content.find('div.chat-info').length).toBe(2);
expect($chat_content.find('div.chat-info').last().html()).toBe(__(view.newNicknameMessages["303"], "newnick"));
$participants = view.$('.participant-list');
expect($participants.children().length).toBe(0);
$occupants = view.$('.occupant-list');
expect($occupants.children().length).toBe(0);
presence = $pres().attrs({
from:'lounge@localhost/newnick',
@ -355,7 +355,7 @@
.c('item').attrs({
affiliation: 'member',
jid: 'dummy@localhost/pda',
role: 'participant'
role: 'occupant'
}).up()
.c('status').attrs({code:'110'}).nodeTree;
@ -363,9 +363,9 @@
expect(view.onChatRoomPresence).toHaveBeenCalled();
expect($chat_content.find('div.chat-info').length).toBe(2);
expect($chat_content.find('div.chat-info').last().html()).toBe(__(view.newNicknameMessages["303"], "newnick"));
$participants = view.$('.participant-list');
expect($participants.children().length).toBe(1);
expect($participants.children().first(0).text()).toBe("newnick");
$occupants = view.$('.occupant-list');
expect($occupants.children().length).toBe(1);
expect($occupants.children().first(0).text()).toBe("newnick");
}.bind(converse));
it("informs users if they have been kicked out of the chat room", function () {
@ -402,7 +402,7 @@
var view = this.chatboxviews.get('lounge@localhost');
view.onChatRoomPresence(presence, {nick: 'dummy', name: 'lounge@localhost'});
expect(view.$('.chat-area').is(':visible')).toBeFalsy();
expect(view.$('.participants').is(':visible')).toBeFalsy();
expect(view.$('.occupants').is(':visible')).toBeFalsy();
var $chat_body = view.$('.chatroom-body');
expect($chat_body.html().trim().indexOf('<p>You have been kicked from this room</p><p>The reason given is: "Avaunt, you cullion!"</p>')).not.toBe(-1);
}.bind(converse));

View File

@ -1,7 +1,7 @@
<!-- <div class="participants"> -->
<!-- <div class="occupants"> -->
<form class="pure-form room-invite">
<input class="invited-contact" placeholder="{{label_invitation}}" type="text"/>
</form>
<p class="participants-heading">{{label_occupants}}:</p>
<ul class="participant-list"></ul>
<p class="occupants-heading">{{label_occupants}}:</p>
<ul class="occupant-list"></ul>
<!-- </div> -->

View File

@ -2,8 +2,8 @@
{[ if (role === "moderator") { ]}
title="{{desc_moderator}}"
{[ } ]}
{[ if (role === "participant") { ]}
title="{{desc_participant}}"
{[ if (role === "occupant") { ]}
title="{{desc_occupant}}"
{[ } ]}
{[ if (role === "visitor") { ]}
title="{{desc_visitor}}"

View File

@ -20,8 +20,8 @@
{[ if (show_call_button) { ]}
<li class="toggle-call"><a class="icon-phone" title="{{label_start_call}}"></a></li>
{[ } ]}
{[ if (show_participants_toggle) { ]}
<li class="toggle-participants"><a class="icon-hide-users" title="{{label_hide_participants}}"></a></li>
{[ if (show_occupants_toggle) { ]}
<li class="toggle-occupants"><a class="icon-hide-users" title="{{label_hide_occupants}}"></a></li>
{[ } ]}
{[ if (show_clear_button) { ]}
<li class="toggle-clear"><a class="icon-remove" title="{{label_clear}}"></a></li>

View File

@ -37,10 +37,10 @@
mock.chatroom_roles = {
'Anne Ebersbacher': { affiliation: "owner", role: "moderator" },
'Dirk Theissen': { affiliation: "admin", role: "moderator" },
'Dyon van de Wege': { affiliation: "member", role: "participant" },
'Felix Hofmann': { affiliation: "member", role: "participant" },
'Ka Lek': { affiliation: "member", role: "participant" },
'Thomas Kalb': { affiliation: "member", role: "participant" }
'Dyon van de Wege': { affiliation: "member", role: "occupant" },
'Felix Hofmann': { affiliation: "member", role: "occupant" },
'Ka Lek': { affiliation: "member", role: "occupant" },
'Thomas Kalb': { affiliation: "member", role: "occupant" }
};
mock.event = {