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
3b158444
Commit
3b158444
authored
Dec 24, 2017
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
8b757c6d
1e1aa1d9
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
114 additions
and
82 deletions
+114
-82
spec/chatbox.js
spec/chatbox.js
+1
-0
spec/chatroom.js
spec/chatroom.js
+1
-3
src/converse-chatview.js
src/converse-chatview.js
+87
-64
src/converse-dragresize.js
src/converse-dragresize.js
+1
-1
src/converse-muc.js
src/converse-muc.js
+22
-12
src/templates/action.html
src/templates/action.html
+1
-1
src/templates/info.html
src/templates/info.html
+1
-1
No files found.
spec/chatbox.js
View file @
3b158444
...
...
@@ -1616,6 +1616,7 @@
// See XEP-0085 http://xmpp.org/extensions/xep-0085.html#definitions
spyOn
(
_converse
,
'
emit
'
);
var
sender_jid
=
mock
.
cur_names
[
1
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
test_utils
.
openChatBoxFor
(
_converse
,
sender_jid
);
// <composing> state
var
msg
=
$msg
({
...
...
spec/chatroom.js
View file @
3b158444
...
...
@@ -1708,9 +1708,7 @@
.
c
(
'
status
'
,
{
code
:
'
172
'
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
message
));
var
$chat_body
=
view
.
$
(
'
.chatroom-body
'
);
expect
(
$chat_body
.
html
().
trim
().
indexOf
(
'
<div class="message chat-info">This room is now no longer anonymous</div>
'
)).
not
.
toBe
(
-
1
);
expect
(
$chat_body
.
find
(
'
.message:last
'
).
text
()).
toBe
(
'
This room is now no longer anonymous
'
);
done
();
});
}));
...
...
src/converse-chatview.js
View file @
3b158444
This diff is collapsed.
Click to expand it.
src/converse-dragresize.js
View file @
3b158444
...
...
@@ -186,7 +186,7 @@
}
else
{
width
=
""
;
}
this
.
$el
[
0
]
.
style
.
width
=
width
;
this
.
el
.
style
.
width
=
width
;
this
.
$el
.
children
(
'
.box-flyout
'
)[
0
].
style
.
width
=
width
;
},
...
...
src/converse-muc.js
View file @
3b158444
...
...
@@ -1306,7 +1306,7 @@
container_el
.
insertAdjacentHTML
(
'
beforeend
'
,
tpl_chatroom_form
());
const
form_el
=
container_el
.
querySelector
(
'
form.chatroom-form
'
),
fieldset_el
=
form_el
.
querySelector
(
'
fieldset
:first-child
'
),
fieldset_el
=
form_el
.
querySelector
(
'
fieldset
'
),
fields
=
stanza
.
querySelectorAll
(
'
field
'
),
title
=
_
.
get
(
stanza
.
querySelector
(
'
title
'
),
'
textContent
'
),
instructions
=
_
.
get
(
stanza
.
querySelector
(
'
instructions
'
),
'
textContent
'
);
...
...
@@ -1817,7 +1817,13 @@
return
;
}
_
.
each
(
notification
.
messages
,
(
message
)
=>
{
this
.
content
.
insertAdjacentHTML
(
'
beforeend
'
,
tpl_info
({
'
message
'
:
message
,
'
data
'
:
''
}));
this
.
content
.
insertAdjacentHTML
(
'
beforeend
'
,
tpl_info
({
'
data
'
:
''
,
'
isodate
'
:
moment
().
format
(),
'
message
'
:
message
}));
});
if
(
notification
.
reason
)
{
this
.
showStatusNotification
(
__
(
'
The reason given is: "%1$s".
'
,
notification
.
reason
),
true
);
...
...
@@ -1830,13 +1836,14 @@
displayJoinNotification
(
stanza
)
{
const
nick
=
Strophe
.
getResourceFromJid
(
stanza
.
getAttribute
(
'
from
'
));
const
stat
=
stanza
.
querySelector
(
'
status
'
);
const
last_el
=
this
.
content
.
querySelector
(
'
.message:last-child
'
)
;
const
last_el
=
this
.
content
.
lastElementChild
;
if
(
_
.
includes
(
_
.
get
(
last_el
,
'
classList
'
,
[]),
'
chat-info
'
)
&&
_
.
get
(
last_el
,
'
dataset
'
,
{}).
leave
===
`"
${
nick
}
"`
)
{
last_el
.
outerHTML
=
tpl_info
({
'
message
'
:
__
(
nick
+
'
has left and re-entered the room.
'
),
'
data
'
:
`data-leavejoin="
${
nick
}
"`
'
data
'
:
`data-leavejoin="
${
nick
}
"`
,
'
isodate
'
:
moment
().
format
(),
'
message
'
:
__
(
nick
+
'
has left and re-entered the room.
'
)
});
}
else
{
let
message
=
__
(
nick
+
'
has entered the room.
'
);
...
...
@@ -1844,8 +1851,9 @@
message
=
message
+
'
"
'
+
stat
.
textContent
+
'
"
'
;
}
const
data
=
{
'
message
'
:
message
,
'
data
'
:
`data-join="
${
nick
}
"`
'
data
'
:
`data-join="
${
nick
}
"`
,
'
isodate
'
:
moment
().
format
(),
'
message
'
:
message
};
if
(
_
.
includes
(
_
.
get
(
last_el
,
'
classList
'
,
[]),
'
chat-info
'
)
&&
_
.
get
(
last_el
,
'
dataset
'
,
{}).
joinleave
===
`"
${
nick
}
"`
)
{
...
...
@@ -1861,7 +1869,7 @@
displayLeaveNotification
(
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
.
lastElementChild
;
if
(
_
.
includes
(
_
.
get
(
last_el
,
'
classList
'
,
[]),
'
chat-info
'
)
&&
_
.
get
(
last_el
,
'
dataset
'
,
{}).
join
===
`"
${
nick
}
"`
)
{
...
...
@@ -1871,8 +1879,9 @@
}
last_el
.
outerHTML
=
tpl_info
({
'
message
'
:
message
,
'
data
'
:
`data-joinleave="
${
nick
}
"`
'
data
'
:
`data-joinleave="
${
nick
}
"`
,
'
isodate
'
:
moment
().
format
(),
'
message
'
:
message
});
}
else
{
let
message
=
__
(
'
%1$s has left the room.
'
,
nick
);
...
...
@@ -2078,8 +2087,9 @@
this
.
content
.
insertAdjacentHTML
(
'
beforeend
'
,
tpl_info
({
'
message
'
:
__
(
'
Topic set by %1$s to: %2$s
'
,
sender
,
subject
),
'
data
'
:
''
'
data
'
:
''
,
'
isodate
'
:
moment
().
format
(),
'
message
'
:
__
(
'
Topic set by %1$s to: %2$s
'
,
sender
,
subject
)
}));
this
.
scrollDown
();
},
...
...
src/templates/action.html
View file @
3b158444
<div
class=
"chat-message {{{o.extra_classes}}}"
data-isodate=
"{{{o.isodate}}}"
>
<div
class=
"
message
chat-message {{{o.extra_classes}}}"
data-isodate=
"{{{o.isodate}}}"
>
<span
class=
"chat-msg-author chat-msg-{{{o.sender}}}"
>
{{{o.time}}} **{{{o.username}}}
</span>
<span
class=
"chat-msg-content chat-action"
>
<!-- message gets added here via renderMessage -->
</span>
</div>
src/templates/info.html
View file @
3b158444
<div
class=
"message chat-info"
{{{
o
.
data
}}}
>
{{{o.message}}}
</div>
<div
class=
"message chat-info
{{{o.extra_classes}}}"
data-isodate=
"{{{o.isodate}}}
"
{{{
o
.
data
}}}
>
{{{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