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
d2358a6a
Commit
d2358a6a
authored
Jan 22, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Controlbox and its toggle are now mutually exclusive.
When the one is visible, the other is hidden and vice versa.
parent
0bc40eed
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
12 deletions
+69
-12
converse.css
converse.css
+5
-0
converse.js
converse.js
+51
-2
index.html
index.html
+1
-1
mockup.html
mockup.html
+1
-1
src/templates/chatbox.html
src/templates/chatbox.html
+1
-0
src/templates/chatroom.html
src/templates/chatroom.html
+10
-8
No files found.
converse.css
View file @
d2358a6a
...
...
@@ -360,6 +360,7 @@ span.spinner.hor_centered {
padding
:
4px
8px
;
margin-right
:
5px
;
color
:
white
;
display
:
none
;
}
#connecting-to-chat
{
...
...
@@ -1171,6 +1172,10 @@ form#set-custom-xmpp-status {
padding
:
1px
2px
1px
1px
;
}
#controlbox
{
display
:
none
;
}
#controlbox
div
.xmpp-status
{
display
:
inline
;
}
...
...
converse.js
View file @
d2358a6a
...
...
@@ -100,6 +100,14 @@
}
};
converse
.
refresh
=
function
()
{
// TODO: only do this for webkit browsers
var
conversejs
=
document
.
getElementById
(
'
conversejs
'
);
conversejs
.
style
.
display
=
'
none
'
;
conversejs
.
offsetHeight
;
// no need to store this anywhere, the reference is enough
conversejs
.
style
.
display
=
'
block
'
;
};
converse
.
initialize
=
function
(
settings
,
callback
)
{
var
converse
=
this
;
...
...
@@ -1218,15 +1226,16 @@
}
},
show
:
function
()
{
show
:
function
(
callback
)
{
if
(
this
.
$el
.
is
(
'
:visible
'
)
&&
this
.
$el
.
css
(
'
opacity
'
)
==
"
1
"
)
{
converse
.
emit
(
'
onChatBoxFocused
'
,
this
);
return
this
.
focus
();
}
if
(
converse
.
animate
)
{
this
.
$el
.
css
({
'
opacity
'
:
0
,
'
display
'
:
'
inline
'
}).
animate
({
opacity
:
'
1
'
},
200
);
this
.
$el
.
css
({
'
opacity
'
:
0
,
'
display
'
:
'
inline
'
}).
animate
({
opacity
:
'
1
'
},
200
,
null
,
callback
);
}
else
{
this
.
$el
.
css
({
'
opacity
'
:
1
,
'
display
'
:
'
inline
'
});
callback
();
}
if
(
converse
.
connection
)
{
// Without a connection, we haven't yet initialized
...
...
@@ -1592,6 +1601,38 @@
}
},
hide
:
function
(
callback
)
{
this
.
$el
.
hide
(
'
fast
'
,
function
()
{
converse
.
controlboxtoggle
.
show
(
function
()
{
converse
.
refresh
();
if
(
typeof
callback
===
"
function
"
)
{
callback
();
}
});
});
},
show
:
function
()
{
converse
.
controlboxtoggle
.
hide
();
if
(
this
.
$el
.
is
(
'
:visible
'
)
&&
this
.
$el
.
css
(
'
opacity
'
)
==
"
1
"
)
{
return
;
}
if
(
converse
.
animate
)
{
this
.
$el
.
css
({
'
opacity
'
:
0
,
'
display
'
:
'
inline
'
}).
animate
({
opacity
:
'
1
'
},
200
,
null
,
function
()
{
converse
.
refresh
();
});
}
else
{
this
.
$el
.
css
({
'
opacity
'
:
1
,
'
display
'
:
'
inline
'
});
converse
.
refresh
();
}
if
(
converse
.
connection
)
{
// Without a connection, we haven't yet initialized
// localstorage
this
.
model
.
save
();
}
converse
.
emit
(
'
onControlBoxOpened
'
,
this
);
return
this
;
},
featureAdded
:
function
(
feature
)
{
if
((
feature
.
get
(
'
var
'
)
==
'
http://jabber.org/protocol/muc
'
)
&&
(
converse
.
allow_muc
))
{
this
.
roomspanel
.
muc_domain
=
feature
.
get
(
'
from
'
);
...
...
@@ -3187,6 +3228,14 @@
return
this
;
},
hide
:
function
(
callback
)
{
this
.
$el
.
hide
(
'
fast
'
,
callback
);
},
show
:
function
(
callback
)
{
this
.
$el
.
show
(
'
fast
'
,
callback
);
},
showControlBox
:
function
()
{
var
controlbox
=
converse
.
chatboxes
.
get
(
'
controlbox
'
);
if
(
!
controlbox
)
{
...
...
index.html
View file @
d2358a6a
...
...
@@ -186,7 +186,7 @@
allow_otr
:
true
,
auto_list_rooms
:
false
,
auto_subscribe
:
false
,
bosh_service_url
:
'
http
s://conversejs.org
/http-bind
'
,
// Please use this connection manager only for testing purposes
bosh_service_url
:
'
http
://devbox:8890
/http-bind
'
,
// Please use this connection manager only for testing purposes
debug
:
true
,
hide_muc_server
:
false
,
i18n
:
locales
[
'
en
'
],
// Refer to ./locale/locales.js to see which locales are supported
...
...
mockup.html
View file @
d2358a6a
...
...
@@ -68,7 +68,7 @@
<span
style=
"display: none"
id=
"online-count"
>
(0)
</span>
</a>
<div
id=
"controlbox"
class=
"chatbox"
>
<div
id=
"controlbox"
class=
"chatbox"
style=
"opacity: 1; display: inline;"
>
<div
class=
"box-flyout"
>
<div
class=
"dragresize dragresize-tm"
></div>
<div
class=
"chat-head controlbox-head"
>
...
...
src/templates/chatbox.html
View file @
d2358a6a
...
...
@@ -2,6 +2,7 @@
<div
class=
"dragresize dragresize-tm"
></div>
<div
class=
"chat-head chat-head-chatbox"
>
<a
class=
"close-chatbox-button icon-close"
></a>
<a
class=
"minimize-chatbox-button icon-minus"
></a>
<a
href=
"{{url}}"
target=
"_blank"
class=
"user"
>
<div
class=
"chat-title"
>
{{ fullname }}
</div>
</a>
...
...
src/templates/chatroom.html
View file @
d2358a6a
<div
class=
"chat-head chat-head-chatroom"
>
<a
class=
"close-chatbox-button icon-close"
></a>
<a
class=
"configure-chatroom-button icon-wrench"
style=
"display:none"
></a>
<div
class=
"chat-title"
>
{{ name }}
</div>
<p
class=
"chatroom-topic"
><p/>
</div>
<div
class=
"chat-body"
>
<span
class=
"spinner centered"
/>
<div
class=
"box-flyout"
>
<div
class=
"dragresize dragresize-tm"
></div>
<div
class=
"chat-head chat-head-chatroom"
>
<a
class=
"close-chatbox-button icon-close"
></a>
<a
class=
"minimize-chatbox-button icon-minus"
></a>
<a
class=
"configure-chatroom-button icon-wrench"
style=
"display:none"
></a>
<div
class=
"chat-title"
>
{{ name }}
</div>
<p
class=
"chatroom-topic"
><p/>
</div>
<div
class=
"chat-body"
><span
class=
"spinner centered"
/></div>
</div>
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