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
4331f920
Commit
4331f920
authored
Jul 02, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests
parent
c6d7317b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
12 deletions
+29
-12
dist/converse.js
dist/converse.js
+11
-6
spec/roomslist.js
spec/roomslist.js
+13
-4
src/converse-muc-views.js
src/converse-muc-views.js
+1
-0
src/templates/chatroom_details_modal.html
src/templates/chatroom_details_modal.html
+4
-2
No files found.
dist/converse.js
View file @
4331f920
...
...
@@ -75878,6 +75878,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
toHTML() {
return tpl_chatroom_details_modal(_.extend(this.model.toJSON(), {
'_': _,
'__': __,
'display_name': __('Groupchat info for %1$s', this.model.getDisplayName()),
'num_occupants': this.model.occupants.length
...
...
@@ -84258,15 +84259,19 @@ __e(o.jid) +
__e(o.__('Description')) +
'</strong>: ' +
__e(o.description) +
'</p>\n <p class="room-info"><strong>' +
'</p>\n ';
if (o.subject) { ;
__p += '\n <p class="room-info"><strong>' +
__e(o.__('Topic')) +
'</strong>: ' +
__e(o.
subject.text
) +
__e(o.
_.get(o.subject, 'text')
) +
'</p>\n <p class="room-info"><strong>' +
__e(o.__('Topic
A
uthor')) +
__e(o.__('Topic
a
uthor')) +
'</strong>: ' +
__e(o.subject.author) +
'</p>\n <p class="room-info"><strong>' +
__e(o._.get(o.subject, 'author')) +
'</p>\n ';
} ;
__p += '\n <p class="room-info"><strong>' +
__e(o.__('Online users')) +
'</strong>: ' +
__e(o.num_occupants) +
spec/roomslist.js
View file @
4331f920
...
...
@@ -114,7 +114,7 @@
const
room_els
=
_converse
.
rooms_list_view
.
el
.
querySelectorAll
(
"
.open-room
"
);
expect
(
room_els
.
length
).
toBe
(
1
);
var
info_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.room-info
"
);
const
info_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.room-info
"
);
info_el
.
click
();
const
modal
=
view
.
model
.
room_details_modal
;
...
...
@@ -122,8 +122,8 @@
}).
then
(()
=>
{
const
modal
=
view
.
model
.
room_details_modal
;
let
els
=
modal
.
el
.
querySelectorAll
(
'
p.room-info
'
);
expect
(
els
[
0
].
textContent
).
toBe
(
"
Room address (JID): coven@chat.shakespeare.lit
"
)
expect
(
els
[
1
].
textContent
).
toBe
(
"
Name: A Dark Cave
"
)
expect
(
els
[
0
].
textContent
).
toBe
(
"
Name: A Dark Cave
"
)
expect
(
els
[
1
].
textContent
).
toBe
(
"
Room address (JID): coven@chat.shakespeare.lit
"
)
expect
(
els
[
2
].
textContent
).
toBe
(
"
Description: This is the description
"
)
expect
(
els
[
3
].
textContent
).
toBe
(
"
Online users: 1
"
)
const
features_list
=
modal
.
el
.
querySelector
(
'
.features-list
'
);
...
...
@@ -149,8 +149,17 @@
els
=
modal
.
el
.
querySelectorAll
(
'
p.room-info
'
);
expect
(
els
[
3
].
textContent
).
toBe
(
"
Online users: 2
"
)
view
.
model
.
set
({
'
subject
'
:
{
'
author
'
:
'
someone
'
,
'
text
'
:
'
Hatching dark plots
'
}});
els
=
modal
.
el
.
querySelectorAll
(
'
p.room-info
'
);
expect
(
els
[
0
].
textContent
).
toBe
(
"
Name: A Dark Cave
"
)
expect
(
els
[
1
].
textContent
).
toBe
(
"
Room address (JID): coven@chat.shakespeare.lit
"
)
expect
(
els
[
2
].
textContent
).
toBe
(
"
Description: This is the description
"
)
expect
(
els
[
3
].
textContent
).
toBe
(
"
Topic: Hatching dark plots
"
)
expect
(
els
[
4
].
textContent
).
toBe
(
"
Topic author: someone
"
)
expect
(
els
[
5
].
textContent
).
toBe
(
"
Online users: 2
"
)
done
();
});
})
.
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
FATAL
))
;
}));
it
(
"
can be closed
"
,
mock
.
initConverseWithPromises
(
...
...
src/converse-muc-views.js
View file @
4331f920
...
...
@@ -493,6 +493,7 @@
toHTML
()
{
return
tpl_chatroom_details_modal
(
_
.
extend
(
this
.
model
.
toJSON
(),
{
'
_
'
:
_
,
'
__
'
:
__
,
'
display_name
'
:
__
(
'
Groupchat info for %1$s
'
,
this
.
model
.
getDisplayName
()),
'
num_occupants
'
:
this
.
model
.
occupants
.
length
...
...
src/templates/chatroom_details_modal.html
View file @
4331f920
...
...
@@ -10,8 +10,10 @@
<p
class=
"room-info"
><strong>
{{{o.__('Name')}}}
</strong>
: {{{o.name}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Room address (JID)')}}}
</strong>
: {{{o.jid}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Description')}}}
</strong>
: {{{o.description}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Topic')}}}
</strong>
: {{{o.subject.text}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Topic Author')}}}
</strong>
: {{{o.subject.author}}}
</p>
{[ if (o.subject) { ]}
<p
class=
"room-info"
><strong>
{{{o.__('Topic')}}}
</strong>
: {{{o._.get(o.subject, 'text')}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Topic author')}}}
</strong>
: {{{o._.get(o.subject, 'author')}}}
</p>
{[ } ]}
<p
class=
"room-info"
><strong>
{{{o.__('Online users')}}}
</strong>
: {{{o.num_occupants}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Features')}}}
</strong>
:
<div
class=
"chatroom-features"
>
...
...
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