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
f84bf925
Commit
f84bf925
authored
May 28, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Couldn't open chatroom when clicking from a list
parent
b97e23ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
converse.js
converse.js
+15
-7
No files found.
converse.js
View file @
f84bf925
...
...
@@ -872,31 +872,39 @@
createChatRoom
:
function
(
ev
)
{
ev
.
preventDefault
();
var
name
,
server
,
jid
,
$name
,
$server
,
errors
;
var
name
,
$name
,
server
,
$server
,
jid
,
$nick
=
this
.
$el
.
find
(
'
input.new-chatroom-nick
'
),
nick
=
$nick
.
val
();
if
(
!
nick
)
{
$nick
.
addClass
(
'
error
'
);
}
else
{
$nick
.
removeClass
(
'
error
'
);
}
if
(
ev
.
type
===
'
click
'
)
{
jid
=
$
(
ev
.
target
).
attr
(
'
data-room-jid
'
);
}
else
{
$name
=
this
.
$el
.
find
(
'
input.new-chatroom-name
'
);
$nick
=
this
.
$el
.
find
(
'
input.new-chatroom-nick
'
);
$server
=
this
.
$el
.
find
(
'
input.new-chatroom-server
'
);
server
=
$server
.
val
();
nick
=
$nick
.
val
();
name
=
$name
.
val
().
trim
().
toLowerCase
();
$name
.
val
(
''
);
// Clear the input
if
(
name
&&
server
&&
nick
)
{
if
(
name
&&
server
)
{
jid
=
Strophe
.
escapeNode
(
name
)
+
'
@
'
+
server
;
$name
.
removeClass
(
'
error
'
);
$nick
.
removeClass
(
'
error
'
);
$server
.
removeClass
(
'
error
'
);
this
.
muc_domain
=
server
;
}
else
{
errors
=
true
;
if
(
!
name
)
{
$name
.
addClass
(
'
error
'
);
}
if
(
!
nick
)
{
$nick
.
addClass
(
'
error
'
);
}
if
(
!
server
)
{
$server
.
addClass
(
'
error
'
);
}
return
;
}
}
if
(
!
nick
)
{
return
;
}
converse
.
chatboxes
.
create
({
'
id
'
:
jid
,
'
jid
'
:
jid
,
...
...
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