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
309b1112
Commit
309b1112
authored
Dec 13, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:jcbrand/converse.js
parents
2a3aba3a
cbfd8d8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
4 deletions
+48
-4
converse.js
converse.js
+10
-4
spec/controlbox.js
spec/controlbox.js
+38
-0
No files found.
converse.js
View file @
309b1112
...
@@ -3091,7 +3091,7 @@
...
@@ -3091,7 +3091,7 @@
this
.
model
.
messages
.
off
(
'
add
'
,
null
,
this
);
this
.
model
.
messages
.
off
(
'
add
'
,
null
,
this
);
this
.
remove
();
this
.
remove
();
this
.
model
.
maximize
();
this
.
model
.
maximize
();
},
200
)
},
200
,
true
)
});
});
this
.
MinimizedChats
=
Backbone
.
Overview
.
extend
({
this
.
MinimizedChats
=
Backbone
.
Overview
.
extend
({
...
@@ -3228,10 +3228,16 @@
...
@@ -3228,10 +3228,16 @@
showInRoster
:
function
()
{
showInRoster
:
function
()
{
var
chatStatus
=
this
.
get
(
'
chat_status
'
);
var
chatStatus
=
this
.
get
(
'
chat_status
'
);
if
(
converse
.
show_only_online_users
&&
chatStatus
!==
'
online
'
)
if
((
converse
.
show_only_online_users
&&
chatStatus
!==
'
online
'
)
return
false
;
||
(
converse
.
hide_offline_users
&&
chatStatus
===
'
offline
'
))
{
if
(
converse
.
hide_offline_users
&&
chatStatus
===
'
offline
'
)
// If pending or requesting, show
if
((
this
.
get
(
'
ask
'
)
===
'
subscribe
'
)
||
(
this
.
get
(
'
subscription
'
)
===
'
from
'
)
||
(
this
.
get
(
'
requesting
'
)
===
true
))
{
return
true
;
}
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
});
});
...
...
spec/controlbox.js
View file @
309b1112
...
@@ -410,6 +410,44 @@
...
@@ -410,6 +410,44 @@
},
converse
));
},
converse
));
},
converse
));
},
converse
));
it
(
"
are shown in the roster when show_only_online_users
"
,
$
.
proxy
(
function
()
{
converse
.
show_only_online_users
=
true
;
runs
(
function
()
{
_addContacts
();
});
waits
(
50
);
spyOn
(
this
.
rosterview
,
'
update
'
).
andCallThrough
();
runs
(
$
.
proxy
(
function
()
{
expect
(
this
.
rosterview
.
$el
.
is
(
'
:visible
'
)).
toEqual
(
true
);
expect
(
this
.
rosterview
.
update
).
toHaveBeenCalled
();
},
converse
));
waits
(
300
);
// Needed, due to debounce
runs
(
$
.
proxy
(
function
()
{
expect
(
this
.
rosterview
.
$el
.
find
(
'
dd:visible
'
).
length
).
toBe
(
3
);
expect
(
this
.
rosterview
.
$el
.
find
(
'
dt:visible
'
).
length
).
toBe
(
1
);
},
converse
));
converse
.
show_only_online_users
=
false
;
},
converse
));
it
(
"
are shown in the roster when hide_offline_users
"
,
$
.
proxy
(
function
()
{
converse
.
hide_offline_users
=
true
;
runs
(
function
()
{
_addContacts
();
});
waits
(
50
);
spyOn
(
this
.
rosterview
,
'
update
'
).
andCallThrough
();
runs
(
$
.
proxy
(
function
()
{
expect
(
this
.
rosterview
.
$el
.
is
(
'
:visible
'
)).
toEqual
(
true
);
expect
(
this
.
rosterview
.
update
).
toHaveBeenCalled
();
},
converse
));
waits
(
300
);
// Needed, due to debounce
runs
(
$
.
proxy
(
function
()
{
expect
(
this
.
rosterview
.
$el
.
find
(
'
dd:visible
'
).
length
).
toBe
(
3
);
expect
(
this
.
rosterview
.
$el
.
find
(
'
dt:visible
'
).
length
).
toBe
(
1
);
},
converse
));
converse
.
hide_offline_users
=
false
;
},
converse
));
it
(
"
can be removed by the user
"
,
$
.
proxy
(
function
()
{
it
(
"
can be removed by the user
"
,
$
.
proxy
(
function
()
{
runs
(
$
.
proxy
(
function
()
{
runs
(
$
.
proxy
(
function
()
{
_addContacts
();
_addContacts
();
...
...
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