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
cdf0a0d2
Commit
cdf0a0d2
authored
Aug 04, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure contacts added to a collapsed group header are hidden.
updates #83
parent
5171d88c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
converse.js
converse.js
+4
-1
spec/controlbox.js
spec/controlbox.js
+16
-0
No files found.
converse.js
View file @
cdf0a0d2
...
...
@@ -3291,7 +3291,10 @@
addContact
:
function
(
contact
)
{
var
view
=
new
converse
.
RosterContactView
({
model
:
contact
});
this
.
add
(
contact
.
get
(
'
id
'
),
view
);
this
.
positionContact
(
contact
).
render
();
var
view
=
this
.
positionContact
(
contact
).
render
();
if
(
this
.
model
.
get
(
'
state
'
)
===
CLOSED
)
{
view
.
$el
.
hide
();
}
this
.
$el
.
show
();
},
...
...
spec/controlbox.js
View file @
cdf0a0d2
...
...
@@ -364,6 +364,22 @@
checkHeaderToggling
.
apply
(
this
,
[
this
.
rosterview
.
$el
.
find
(
'
dt.roster-group
'
)]);
},
converse
));
it
(
"
will be hidden when appearing under a collapsed group
"
,
$
.
proxy
(
function
()
{
_addContacts
();
this
.
rosterview
.
$el
.
find
(
'
dt.roster-group
'
).
find
(
'
a.group-toggle
'
).
click
();
var
name
=
"
Max Mustermann
"
;
var
jid
=
name
.
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
converse
.
roster
.
create
({
ask
:
null
,
fullname
:
name
,
jid
:
jid
,
requesting
:
false
,
subscription
:
'
both
'
});
var
view
=
this
.
rosterview
.
get
(
'
My contacts
'
).
get
(
jid
);
expect
(
view
.
$el
.
is
(
'
:visible
'
)).
toBe
(
false
);
},
converse
));
it
(
"
can be added to the roster and they will be sorted alphabetically
"
,
$
.
proxy
(
function
()
{
_clearContacts
();
var
i
,
t
;
...
...
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