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
9b3c6d1a
Commit
9b3c6d1a
authored
Jan 15, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #985 Give help messages a "message" class and isodate data attr.
parent
fc17550d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
spec/chatbox.js
spec/chatbox.js
+9
-0
src/converse-chatview.js
src/converse-chatview.js
+1
-0
src/templates/help_message.html
src/templates/help_message.html
+1
-1
No files found.
spec/chatbox.js
View file @
9b3c6d1a
...
...
@@ -39,6 +39,15 @@
expect
(
info_messages
.
pop
().
textContent
).
toBe
(
'
/help: Show this menu
'
);
expect
(
info_messages
.
pop
().
textContent
).
toBe
(
'
/me: Write in the third person
'
);
expect
(
info_messages
.
pop
().
textContent
).
toBe
(
'
/clear: Remove messages
'
);
var
msg
=
$msg
({
from
:
contact_jid
,
to
:
_converse
.
connection
.
jid
,
type
:
'
chat
'
,
id
:
(
new
Date
()).
getTime
()
}).
c
(
'
body
'
).
t
(
'
hello world
'
).
tree
();
_converse
.
chatboxes
.
onMessage
(
msg
);
expect
(
view
.
content
.
lastElementChild
.
textContent
.
trim
().
indexOf
(
'
hello world
'
)).
not
.
toBe
(
-
1
);
done
();
}));
...
...
src/converse-chatview.js
View file @
9b3c6d1a
...
...
@@ -580,6 +580,7 @@
this
.
content
.
insertAdjacentHTML
(
'
beforeend
'
,
tpl_help_message
({
'
isodate
'
:
moment
().
format
(),
'
type
'
:
type
||
'
info
'
,
'
message
'
:
xss
.
filterXSS
(
msg
,
{
'
whiteList
'
:
{
'
strong
'
:
[]}})
})
...
...
src/templates/help_message.html
View file @
9b3c6d1a
<div
class=
"
chat-{{{o.typ
e}}}"
>
{{o.message}}
</div>
<div
class=
"
message chat-{{{o.type}}}"
data-isodate=
"{{{o.isodat
e}}}"
>
{{o.message}}
</div>
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