Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
93a8dfc0
Commit
93a8dfc0
authored
Jul 19, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indicate whether a room occupant is online or not.
parent
09802cfb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
12 deletions
+32
-12
css/converse.css
css/converse.css
+5
-2
sass/_chatrooms.scss
sass/_chatrooms.scss
+6
-2
sass/_variables.scss
sass/_variables.scss
+2
-0
src/converse-muc.js
src/converse-muc.js
+17
-5
src/templates/occupant.html
src/templates/occupant.html
+2
-3
No files found.
css/converse.css
View file @
93a8dfc0
...
...
@@ -2040,9 +2040,12 @@
padding
:
2px
5px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
color
:
#A8ABA1
;
width
:
100px
;
}
#conversejs
.chatroom
.box-flyout
.chatroom-body
.occupants
.occupant-list
li
.moderator
{
color
:
#D24E2B
;
}
#conversejs
.chatroom
.box-flyout
.chatroom-body
.occupants
.occupant-list
li
.online
{
color
:
#1A9707
;
}
#conversejs
.chatroom
.box-flyout
.chatroom-body
.occupants
.occupant-list
li
.online.moderator
{
color
:
#D24E2B
;
}
#conversejs
.chatroom
.box-flyout
.chatroom-body
.chatroom-form-container
{
background-color
:
white
;
border-bottom-left-radius
:
4px
;
...
...
sass/_chatrooms.scss
View file @
93a8dfc0
...
...
@@ -101,9 +101,13 @@
padding
:
2px
5px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
color
:
$light-text-color
;
width
:
100px
;
&
.moderator
{
color
:
$moderator-color
;
&
.online
{
color
:
$online-color
;
&
.moderator
{
color
:
$moderator-color
;
}
}
}
}
...
...
sass/_variables.scss
View file @
93a8dfc0
...
...
@@ -8,6 +8,7 @@ $inverse-link-color: white !default;
$link-shadow-color
:
#FAFAFA
!
default
;
$text-shadow-color
:
#FAFAFA
!
default
;
$text-color
:
#818479
!
default
;
$light-text-color
:
#A8ABA1
!
default
;
$border-color
:
#CCC
!
default
;
$icon-color
:
#114327
!
default
;
$save-button-color
:
#436F64
!
default
;
...
...
@@ -37,6 +38,7 @@ $toolbar-height: 25px !default;
$toolbar-color
:
#FFF5EE
!
default
;
$moderator-color
:
#D24E2B
!
default
;
$online-color
:
#1A9707
!
default
;
$chatbox-border-radius
:
4px
!
default
;
$bottom-gutter-height
:
35px
!
default
;
...
...
src/converse-muc.js
View file @
93a8dfc0
...
...
@@ -678,14 +678,20 @@
},
onConfigSaved
:
function
(
stanza
)
{
/*
* When changing a room to members-only, do we want to then
* add all current users to the membership list?
*
var members = [];
this.occupantsview.model.each(function (occupant) {
var affiliation = occupant.get('affiliation');
members.push({
'affiliation': affiliation !== 'none' ? affiliation : 'member',
'jid': Strophe.getBareJidFromJid(occupant.get('jid'))
});
});
// this.updateMembersList(members);
this.updateMembersList(members);
*/
},
onErrorConfigSaved
:
function
(
stanza
)
{
...
...
@@ -995,10 +1001,14 @@
});
converse
.
ChatRoomOccupant
=
Backbone
.
Model
.
extend
({
initialize
:
function
()
{
this
.
set
({
'
id
'
:
converse
.
connection
.
getUniqueId
()});
initialize
:
function
(
attributes
)
{
this
.
set
(
_
.
extend
({
'
id
'
:
converse
.
connection
.
getUniqueId
(),
'
online
'
:
false
},
attributes
));
}
});
converse
.
ChatRoomOccupantView
=
Backbone
.
View
.
extend
({
tagName
:
'
li
'
,
initialize
:
function
()
{
...
...
@@ -1125,8 +1135,10 @@
switch
(
data
.
type
)
{
case
'
unavailable
'
:
if
(
occupant
)
{
occupant
[
0
].
destroy
();
if
(
_
.
contains
([
'
owner
'
,
'
admin
'
,
'
member
'
],
occupant
.
get
(
'
affiliation
'
)))
{
occupant
.
save
({
'
online
'
:
false
});
}
else
{
occupant
.
destroy
();
}
break
;
default
:
...
...
src/templates/occupant.html
View file @
93a8dfc0
<li
class=
"{{role}}"
id=
"{{id}}"
<li
class=
"{{role}}
{[ if (online) { ]} online {[ } ]}
"
id=
"{{id}}"
{[
if
(role =
==
"
moderator
")
{
]}
title=
"{{desc_moderator}}"
{[
}
]}
...
...
@@ -7,5 +7,4 @@
{[
}
]}
{[
if
(role =
==
"
visitor
")
{
]}
title=
"{{desc_visitor}}"
{[
}
]}
>
{{nick}}
</li>
{[
}
]}
>
{{nick}}
</li>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment