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
9b5c9138
Commit
9b5c9138
authored
Jun 02, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a config option to by default show the controlbox
parent
2e28b820
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
converse.js
converse.js
+8
-3
docs/source/index.rst
docs/source/index.rst
+14
-0
index.html
index.html
+5
-5
main.js
main.js
+1
-0
No files found.
converse.js
View file @
9b5c9138
...
...
@@ -78,16 +78,18 @@
var
converse
=
{};
converse
.
initialize
=
function
(
settings
)
{
// Default values
this
.
bosh_service_url
=
''
;
// The BOSH connection manager URL. Required if you are not prebinding.
this
.
animate
=
true
;
this
.
auto_list_rooms
=
false
;
this
.
auto_subscribe
=
false
;
this
.
bosh_service_url
=
''
;
// The BOSH connection manager URL. Required if you are not prebinding.
this
.
hide_muc_server
=
false
;
this
.
i18n
=
locales
.
en
;
this
.
prebind
=
false
;
this
.
show_controlbox_by_default
=
false
;
this
.
xhr_user_search
=
false
;
this
.
i18n
=
locales
.
en
;
_
.
extend
(
this
,
settings
);
var
__
=
function
(
str
)
{
var
t
=
converse
.
i18n
.
translate
(
str
);
if
(
arguments
.
length
>
1
)
{
...
...
@@ -2670,12 +2672,15 @@
// This is the end of the initialize method.
this
.
chatboxes
=
new
this
.
ChatBoxes
();
this
.
chatboxesview
=
new
this
.
ChatBoxesView
({
model
:
this
.
chatboxes
});
$
(
'
a.
toggle-online-users
'
).
bind
(
$
(
'
toggle-online-users
'
).
bind
(
'
click
'
,
$
.
proxy
(
function
(
e
)
{
e
.
preventDefault
();
this
.
toggleControlBox
();
},
this
)
);
if
(
this
.
show_controlbox_by_default
)
{
this
.
toggleControlBox
();
}
};
return
converse
;
}));
docs/source/index.rst
View file @
9b5c9138
...
...
@@ -246,6 +246,20 @@ have to write a Javascript snippet to attach to the set up connection::
The backend must authenticate for you, and then return a SID (session ID) and
RID (Request ID), which you use when you attach to the connection.
show_controlbox_by_default
--------------------------
Default = False
The "controlbox" refers to the special chatbox containing your contacts roster,
status widget, chatrooms and other controls.
By default this box is hidden and can be toggled by clicking on any element in
the page with class *toggle-online-users*.
If this options is set to true, the controlbox will by default be shown upon
page load.
xhr_user_search
---------------
...
...
index.html
View file @
9b5c9138
...
...
@@ -5,9 +5,9 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"chrome=1"
/>
<meta
name=
"description"
content=
"Converse.js: Open Source Browser-Based Instant Messaging"
/>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"stylesheets/stylesheet.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"converse.
min.
css"
>
<
script
src=
"converse.min.js"
></script
>
<
!-- For development: <script data-main="main" src="Libraries/require-jquery.js"></script> --
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"converse.css"
>
<
!-- <script src="converse.min.js"></script> --
>
<
script
data-main=
"main"
src=
"Libraries/require-jquery.js"
></script
>
<title>
Converse.js
</title>
</head>
...
...
@@ -17,7 +17,7 @@
<header
class=
"inner"
>
<a
id=
"forkme_banner"
href=
"https://github.com/jcbrand/converse.js"
>
View on GitHub
</a>
<h1
id=
"project_title"
><a
href=
"http://conversejs.org"
>
Converse.js
</a></h1>
<h2
id=
"project_tagline"
>
An XMPP chat client
written in Javascript
</h2>
<h2
id=
"project_tagline"
>
An XMPP chat client
for your website
</h2>
<section
id=
"downloads"
>
<a
class=
"zip_download_link"
href=
"https://github.com/jcbrand/converse.js/archive/v0.3.zip"
>
Download the latest release as a .zip file
</a>
<a
class=
"tar_download_link"
href=
"https://github.com/jcbrand/converse.js/archive/v0.3.tar.gz"
>
Download the latest release as a tar.gz file
</a>
...
...
@@ -158,7 +158,7 @@
<div
id=
"collective-xmpp-chat-data"
></div>
<div
id=
"toggle-controlbox"
>
<a
href=
"#"
class=
"chat toggle-online-users"
>
<strong
class=
"conn-feedback"
>
Click here to
chat
</strong>
<strong
style=
"display: none"
id=
"online-count"
>
(0)
</strong>
<strong
class=
"conn-feedback"
>
Toggle
chat
</strong>
<strong
style=
"display: none"
id=
"online-count"
>
(0)
</strong>
</a>
</div>
</div>
...
...
main.js
View file @
9b5c9138
...
...
@@ -8,6 +8,7 @@ require(["jquery", "converse"], function($, converse) {
hide_muc_server
:
false
,
i18n
:
locales
.
en
,
// Refer to ./locale/locales.js to see which locales are supported
prebind
:
false
,
show_controlbox_by_default
:
true
,
xhr_user_search
:
false
});
});
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