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
0c2c7be4
Commit
0c2c7be4
authored
Nov 03, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close the controlbox when logging out...
and don't show the online count in the toggle.
parent
5610d759
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
src/converse-controlbox.js
src/converse-controlbox.js
+12
-10
src/templates/controlbox_toggle.html
src/templates/controlbox_toggle.html
+0
-1
No files found.
src/converse-controlbox.js
View file @
0c2c7be4
...
...
@@ -175,8 +175,9 @@
closeAllChatBoxes
:
function
()
{
this
.
each
(
function
(
view
)
{
if
(
view
.
model
.
get
(
'
id
'
)
!==
'
controlbox
'
)
{
view
.
close
();
if
(
!
converse
.
connection
.
connected
||
view
.
model
.
get
(
'
id
'
)
!==
'
controlbox
'
)
{
view
.
close
();
}
});
return
this
;
...
...
@@ -361,6 +362,9 @@
this
.
$el
.
hide
(
'
fast
'
,
function
()
{
utils
.
refreshWebkit
();
converse
.
emit
(
'
chatBoxClosed
'
,
this
);
if
(
!
converse
.
connection
.
connected
)
{
converse
.
controlboxtoggle
.
render
();
}
converse
.
controlboxtoggle
.
show
(
function
()
{
if
(
typeof
callback
===
"
function
"
)
{
callback
();
...
...
@@ -738,7 +742,7 @@
},
initialize
:
function
()
{
this
.
render
(
);
$
(
'
#conversejs
'
).
prepend
(
this
.
render
()
);
this
.
updateOnlineCount
();
converse
.
on
(
'
initialized
'
,
function
()
{
converse
.
roster
.
on
(
"
add
"
,
this
.
updateOnlineCount
,
this
);
...
...
@@ -749,17 +753,15 @@
},
render
:
function
()
{
$
(
'
#conversejs
'
).
prepend
(
this
.
$el
.
html
(
converse
.
templates
.
controlbox_toggle
({
'
label_toggle
'
:
__
(
'
Toggle chat
'
)
})
));
// We let the render method of ControlBoxView decide whether
// the ControlBox or the Toggle must be shown. This prevents
// artifacts (i.e. on page load the toggle is shown only to then
// seconds later be hidden in favor of the control box).
this
.
$el
.
hide
();
return
this
;
return
this
.
$el
.
html
(
converse
.
templates
.
controlbox_toggle
({
'
label_toggle
'
:
__
(
'
Toggle chat
'
)
})
).
hide
();
},
updateOnlineCount
:
_
.
debounce
(
function
()
{
...
...
src/templates/controlbox_toggle.html
View file @
0c2c7be4
<span
class=
"conn-feedback"
>
{{label_toggle}}
</span>
<span
id=
"online-count"
>
(0)
</span>
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