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
d03a9a01
Commit
d03a9a01
authored
Oct 26, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix in positionGroup.
Index must always be 0 if there aren't any group elements in the dom yet.
parent
902e833d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
converse.js
converse.js
+3
-2
spec/profiling.js
spec/profiling.js
+1
-1
No files found.
converse.js
View file @
d03a9a01
...
...
@@ -4077,13 +4077,14 @@
/* Place the group's DOM element in the correct alphabetical
* position amongst the other groups in the roster.
*/
var
index
=
this
.
model
.
indexOf
(
view
.
model
);
var
$groups
=
this
.
$
(
'
.roster-group
'
),
index
=
$groups
.
length
?
this
.
model
.
indexOf
(
view
.
model
)
:
0
;
if
(
index
===
0
)
{
this
.
$roster
.
prepend
(
view
.
$el
);
}
else
if
(
index
==
(
this
.
model
.
length
-
1
))
{
this
.
appendGroup
(
view
);
}
else
{
$
(
this
.
$
(
'
.roster-group
'
)
.
eq
(
index
)).
before
(
view
.
$el
);
$
(
$groups
.
eq
(
index
)).
before
(
view
.
$el
);
}
return
this
;
},
...
...
spec/profiling.js
View file @
d03a9a01
...
...
@@ -53,7 +53,7 @@
});
_
.
each
([
'
Friends
'
,
'
Colleagues
'
,
'
Family
'
,
'
Acquaintances
'
],
function
(
group
)
{
var
i
;
for
(
i
=
0
;
i
<
5
00
;
i
++
)
{
for
(
i
=
0
;
i
<
1
00
;
i
++
)
{
stanza
=
stanza
.
c
(
'
item
'
,
{
jid
:
Math
.
random
().
toString
().
replace
(
'
0.
'
,
''
)
+
'
@example.net
'
,
subscription
:
'
both
'
...
...
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