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
df931af2
Commit
df931af2
authored
Mar 21, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-implement the login dialog as part of the controlbox.
parent
9f437cbc
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
149 additions
and
119 deletions
+149
-119
converse.css
converse.css
+7
-1
converse.js
converse.js
+141
-58
index.html
index.html
+0
-10
main.js
main.js
+1
-50
No files found.
converse.css
View file @
df931af2
...
...
@@ -159,7 +159,8 @@ input.new-chatroom-name {
}
div
#settings
,
div
#chatrooms
{
div
#chatrooms
,
div
#login-dialog
{
height
:
279px
;
}
...
...
@@ -477,6 +478,10 @@ div#controlbox-panes {
width
:
199px
;
}
form
#xmppchat-login
{
padding
:
2em
0
0.3em
0.5em
;
}
form
.set-xmpp-status
,
form
.add-chatroom
{
padding
:
0.5em
0
0.3em
0.5em
;
...
...
@@ -544,6 +549,7 @@ ul#controlbox-tabs a.current, ul#controlbox-tabs a.current:hover {
div
#users
,
div
#chatrooms
,
div
#login-dialog
,
div
#settings
{
border
:
0
;
font-size
:
14px
;
...
...
converse.js
View file @
df931af2
This diff is collapsed.
Click to expand it.
index.html
View file @
df931af2
...
...
@@ -9,16 +9,6 @@
</head>
<body>
<h1>
Converse.js Demo Page
</h1>
Log in with your Jabber/XMPP ID and password.
<!-- login dialog -->
<div
id=
'login_dialog'
class=
'hidden'
>
<label>
Login ID:
</label>
<input
type=
'text'
id=
'jid'
>
<label>
Password:
</label>
<input
type=
'password'
id=
'password'
>
<label>
BOSH Service URL:
</label>
<input
type=
'text'
id=
'bosh_service_url'
>
</div>
<div
id=
"collective-xmpp-chat-data"
></div>
</body>
</html>
main.js
View file @
df931af2
require
([
"
jquery
"
,
"
converse
"
],
function
(
$
)
{
$
(
function
()
{
$
(
'
#login_dialog
'
).
dialog
({
autoOpen
:
true
,
draggable
:
false
,
modal
:
true
,
title
:
'
Connect to XMPP
'
,
buttons
:
{
"
Connect
"
:
function
()
{
$
(
document
).
trigger
(
'
connect
'
,
{
jid
:
$
(
'
#jid
'
).
val
(),
password
:
$
(
'
#password
'
).
val
(),
bosh_service_url
:
$
(
'
#bosh_service_url
'
).
val
()
});
$
(
'
#password
'
).
val
(
''
);
$
(
this
).
dialog
(
'
close
'
);
}
}
});
$
(
document
).
bind
(
'
connect
'
,
function
(
ev
,
data
)
{
var
connection
=
new
Strophe
.
Connection
(
data
.
bosh_service_url
);
connection
.
connect
(
data
.
jid
,
data
.
password
,
function
(
status
)
{
if
(
status
===
Strophe
.
Status
.
CONNECTED
)
{
console
.
log
(
'
Connected
'
);
$
(
document
).
trigger
(
'
jarnxmpp.connected
'
,
connection
);
}
else
if
(
status
===
Strophe
.
Status
.
DISCONNECTED
)
{
console
.
log
(
'
Disconnected
'
);
$
(
document
).
trigger
(
'
jarnxmpp.disconnected
'
);
}
else
if
(
status
===
Strophe
.
Status
.
Error
)
{
console
.
log
(
'
Error
'
);
}
else
if
(
status
===
Strophe
.
Status
.
CONNECTING
)
{
console
.
log
(
'
Connecting
'
);
}
else
if
(
status
===
Strophe
.
Status
.
CONNFAIL
)
{
console
.
log
(
'
Connection Failed
'
);
}
else
if
(
status
===
Strophe
.
Status
.
AUTHENTICATING
)
{
console
.
log
(
'
Authenticating
'
);
}
else
if
(
status
===
Strophe
.
Status
.
AUTHFAIL
)
{
console
.
log
(
'
Authenticating Failed
'
);
}
else
if
(
status
===
Strophe
.
Status
.
DISCONNECTING
)
{
console
.
log
(
'
Disconnecting
'
);
}
else
if
(
status
===
Strophe
.
Status
.
ATTACHED
)
{
console
.
log
(
'
Attached
'
);
}
});
});
});
});
require
([
"
jquery
"
,
"
converse
"
],
function
(
$
)
{});
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