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
49fd8a7e
Commit
49fd8a7e
authored
Mar 05, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix presence exchange.
- Added 'show' element - 'busy' must be 'dnd'
parent
dfc1b73d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
converse.css
converse.css
+3
-7
converse.js
converse.js
+14
-8
No files found.
converse.css
View file @
49fd8a7e
...
...
@@ -43,10 +43,6 @@
padding
:
3px
0
3px
7px
;
}
.chatbox
a
{
text-decoration
:
none
;
}
.chat-head-chatbox
{
background-color
:
rgb
(
89
,
106
,
114
);
background-color
:
rgba
(
89
,
106
,
114
,
1
);
...
...
@@ -356,8 +352,8 @@ form.search-xmpp-contact input {
background
:
url(images/user_offline_panel.png)
no-repeat
5px
2px
;
}
#xmppchat-roster
dd
.current-xmpp-contact.
busy
,
#xmppchat-roster
dd
.current-xmpp-contact.
busy
:hover
{
#xmppchat-roster
dd
.current-xmpp-contact.
dnd
,
#xmppchat-roster
dd
.current-xmpp-contact.
dnd
:hover
{
background
:
url(images/user_busy_panel.png)
no-repeat
5px
2px
;
}
...
...
@@ -634,7 +630,7 @@ input.custom-xmpp-status {
background
:
url(images/user_offline_panel.png)
no-repeat
left
;
}
.dropdown
a
.
busy
{
.dropdown
a
.
dnd
{
background
:
url(images/user_busy_panel.png)
no-repeat
left
;
}
...
...
converse.js
View file @
49fd8a7e
...
...
@@ -559,7 +559,7 @@
this
.
insertStatusNotification
(
fullname
+
'
'
+
'
has gone offline
'
);
}
else
if
(
presence_type
===
'
away
'
)
{
this
.
insertStatusNotification
(
fullname
+
'
'
+
'
has gone away
'
);
}
else
if
((
presence_type
===
'
busy
'
)
||
(
presence_type
===
'
dnd
'
))
{
}
else
if
((
presence_type
===
'
dnd
'
))
{
this
.
insertStatusNotification
(
fullname
+
'
'
+
'
is busy
'
);
}
else
if
(
presence_type
===
'
online
'
)
{
this
.
$el
.
find
(
'
div.chat-event
'
).
remove
();
...
...
@@ -644,7 +644,7 @@
'
<span id="xmpp-status-holder">
'
+
'
<select id="select-xmpp-status">
'
+
'
<option value="online">Online</option>
'
+
'
<option value="
busy
">Busy</option>
'
+
'
<option value="
dnd
">Busy</option>
'
+
'
<option value="away">Away</option>
'
+
'
<option value="offline">Offline</option>
'
+
'
</select>
'
+
...
...
@@ -1419,10 +1419,10 @@
case
'
unavailable
'
:
rank
=
1
;
break
;
case
'
away
'
:
case
'
xa
'
:
rank
=
2
;
break
;
case
'
bus
y
'
:
case
'
awa
y
'
:
rank
=
3
;
break
;
case
'
dnd
'
:
...
...
@@ -1628,11 +1628,11 @@
if
(
show
.
text
()
===
'
chat
'
)
{
presence_type
=
'
online
'
;
}
else
if
(
show
.
text
()
===
'
dnd
'
)
{
presence_type
=
'
busy
'
;
presence_type
=
'
dnd
'
;
}
else
if
(
show
.
text
()
===
'
xa
'
)
{
presence_type
=
'
offline
'
;
}
else
{
presence_type
=
show
.
text
();
presence_type
=
show
.
text
()
||
'
online
'
;
}
}
...
...
@@ -1730,7 +1730,7 @@
$my_contacts
.
after
(
$my_contacts
.
siblings
(
'
dd.current-xmpp-contact.offline
'
).
tsort
(
'
a
'
,
crit
));
$my_contacts
.
after
(
$my_contacts
.
siblings
(
'
dd.current-xmpp-contact.unavailable
'
).
tsort
(
'
a
'
,
crit
));
$my_contacts
.
after
(
$my_contacts
.
siblings
(
'
dd.current-xmpp-contact.away
'
).
tsort
(
'
a
'
,
crit
));
$my_contacts
.
after
(
$my_contacts
.
siblings
(
'
dd.current-xmpp-contact.
busy
'
).
tsort
(
'
a
'
,
crit
));
$my_contacts
.
after
(
$my_contacts
.
siblings
(
'
dd.current-xmpp-contact.
dnd
'
).
tsort
(
'
a
'
,
crit
));
$my_contacts
.
after
(
$my_contacts
.
siblings
(
'
dd.current-xmpp-contact.online
'
).
tsort
(
'
a
'
,
crit
));
}
...
...
@@ -1781,7 +1781,13 @@
},
sendPresence
:
function
(
type
)
{
xmppchat
.
connection
.
send
(
$pres
({
'
type
'
:
type
}));
if
(
type
===
'
unavailable
'
)
{
xmppchat
.
connection
.
send
(
$pres
({
'
type
'
:
type
}));
}
else
if
(
type
===
'
online
'
)
{
xmppchat
.
connection
.
send
(
$pres
());
}
else
{
xmppchat
.
connection
.
send
(
$pres
().
c
(
'
show
'
).
t
(
type
));
}
},
getStatus
:
function
()
{
...
...
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