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
3cf7fefa
Commit
3cf7fefa
authored
Dec 22, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the `:last-child` selector more specific
otherwise deeper leaf-nodes get returned
parent
49addedd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
src/converse-muc.js
src/converse-muc.js
+1
-1
src/templates/info.html
src/templates/info.html
+1
-1
src/templates/message.html
src/templates/message.html
+1
-1
src/utils.js
src/utils.js
+2
-2
No files found.
src/converse-muc.js
View file @
3cf7fefa
...
...
@@ -1827,7 +1827,7 @@
displayJoinNotification
(
stanza
)
{
const
nick
=
Strophe
.
getResourceFromJid
(
stanza
.
getAttribute
(
'
from
'
));
const
stat
=
stanza
.
querySelector
(
'
status
'
);
const
last_el
=
this
.
content
.
querySelector
(
'
:last-child
'
);
const
last_el
=
this
.
content
.
querySelector
(
'
.message
:last-child
'
);
if
(
_
.
includes
(
_
.
get
(
last_el
,
'
classList
'
,
[]),
'
chat-info
'
)
&&
_
.
get
(
last_el
,
'
dataset
'
,
{}).
leave
===
`"
${
nick
}
"`
)
{
last_el
.
outerHTML
=
...
...
src/templates/info.html
View file @
3cf7fefa
<div
class=
"chat-info"
{{{
o
.
data
}}}
>
{{{o.message}}}
</div>
<div
class=
"
message
chat-info"
{{{
o
.
data
}}}
>
{{{o.message}}}
</div>
src/templates/message.html
View file @
3cf7fefa
<div
class=
"chat-message {{{o.extra_classes}}}"
data-isodate=
"{{{o.isodate}}}"
data-msgid=
"{{{o.msgid}}}"
>
<div
class=
"
message
chat-message {{{o.extra_classes}}}"
data-isodate=
"{{{o.isodate}}}"
data-msgid=
"{{{o.msgid}}}"
>
<span
class=
"chat-msg-author chat-msg-{{{o.sender}}}"
>
{{{o.time}}} {{{o.username}}}:
</span>
<span
class=
"chat-msg-content"
>
<!-- message gets added here via renderMessage -->
</span>
</div>
src/utils.js
View file @
3cf7fefa
...
...
@@ -169,7 +169,7 @@
return
_
.
includes
(
el
.
classList
,
className
);
};
u
.
slideOut
=
function
(
el
,
duration
=
2
5
0
)
{
u
.
slideOut
=
function
(
el
,
duration
=
2
0
0
)
{
/* Shows/expands an element by sliding it out of itself
*
* Parameters:
...
...
@@ -233,7 +233,7 @@
});
};
u
.
slideIn
=
function
(
el
,
duration
=
2
5
0
)
{
u
.
slideIn
=
function
(
el
,
duration
=
2
0
0
)
{
/* Hides/collapses an element by sliding it into itself. */
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
_
.
isNil
(
el
))
{
...
...
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