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
4f3d34eb
Commit
4f3d34eb
authored
May 31, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into gh-pages
parents
1ae5aaed
7974ffc7
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
282 additions
and
199 deletions
+282
-199
CHANGES.rst
CHANGES.rst
+2
-0
converse.css
converse.css
+6
-4
converse.js
converse.js
+262
-184
converse.min.css
converse.min.css
+1
-1
converse.min.js
converse.min.js
+1
-1
mock.js
mock.js
+2
-1
spec/ChatRoomSpec.js
spec/ChatRoomSpec.js
+8
-8
No files found.
CHANGES.rst
View file @
4f3d34eb
...
@@ -8,6 +8,8 @@ Changelog
...
@@ -8,6 +8,8 @@ Changelog
[jcbrand]
[jcbrand]
- Bugfix: Cannot join chatroom when clicking from a list of rooms.
- Bugfix: Cannot join chatroom when clicking from a list of rooms.
[jcbrand]
[jcbrand]
- Add better support for kicking or banning users from chatrooms.
[jcbrand]
0.3 (2013-05-21)
0.3 (2013-05-21)
----------------
----------------
...
...
converse.css
View file @
4f3d34eb
...
@@ -87,7 +87,8 @@ img.centered {
...
@@ -87,7 +87,8 @@ img.centered {
.chatroom
.chat-body
{
.chatroom
.chat-body
{
height
:
272px
;
height
:
272px
;
background-color
:
white
;
background-color
:
white
;
border-radius
:
4px
;
border-bottom-right-radius
:
4px
;
border-bottom-left-radius
:
4px
;
}
}
.chatroom
.chat-area
{
.chatroom
.chat-area
{
...
@@ -193,11 +194,11 @@ ul.participant-list li.moderator {
...
@@ -193,11 +194,11 @@ ul.participant-list li.moderator {
display
:
inline-block
;
display
:
inline-block
;
}
}
.chat-event
,
.chat-date
,
.chat-
help
{
.chat-event
,
.chat-date
,
.chat-
info
{
color
:
#808080
;
color
:
#808080
;
}
}
li
.chat-
help
{
li
.chat-
info
{
padding-left
:
10px
;
padding-left
:
10px
;
}
}
...
@@ -410,7 +411,8 @@ a.configure-chatroom-button {
...
@@ -410,7 +411,8 @@ a.configure-chatroom-button {
.chat-body
p
{
.chat-body
p
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#666
;
color
:
#666
;
margin
:
5px
;
padding
:
5px
;
margin
:
0
;
}
}
.chatroom-form
legend
{
.chatroom-form
legend
{
...
...
converse.js
View file @
4f3d34eb
This diff is collapsed.
Click to expand it.
converse.min.css
View file @
4f3d34eb
This diff is collapsed.
Click to expand it.
converse.min.js
View file @
4f3d34eb
This diff is collapsed.
Click to expand it.
mock.js
View file @
4f3d34eb
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
'
listRooms
'
:
function
()
{},
'
listRooms
'
:
function
()
{},
'
join
'
:
function
()
{},
'
join
'
:
function
()
{},
'
leave
'
:
function
()
{},
'
leave
'
:
function
()
{},
'
removeRoom
'
:
function
()
{}
'
removeRoom
'
:
function
()
{},
'
rooms
'
:
{}
},
},
'
jid
'
:
'
dummy@localhost
'
,
'
jid
'
:
'
dummy@localhost
'
,
'
addHandler
'
:
function
(
handler
,
ns
,
name
,
type
,
id
,
from
,
options
)
{
'
addHandler
'
:
function
(
handler
,
ns
,
name
,
type
,
id
,
from
,
options
)
{
...
...
spec/ChatRoomSpec.js
View file @
4f3d34eb
...
@@ -162,7 +162,7 @@
...
@@ -162,7 +162,7 @@
.
c
(
'
registration-required
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
registration-required
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not on the member list of this room
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not on the member list of this room
'
);
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
.
c
(
'
forbidden
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
forbidden
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You have been banned from this room
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You have been banned from this room
'
);
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
.
c
(
'
jid-malformed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
jid-malformed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
No nickname was specified
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
No nickname was specified
'
);
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
.
c
(
'
not-allowed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
not-allowed
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not allowed to create new rooms
'
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
'
You are not allowed to create new rooms
'
);
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
.
c
(
'
not-acceptable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
not-acceptable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname doesn't conform to this room's policies
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname doesn't conform to this room's policies
"
);
...
@@ -247,7 +247,7 @@
...
@@ -247,7 +247,7 @@
.
c
(
'
conflict
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
conflict
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname is already taken
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
Your nickname is already taken
"
);
...
@@ -264,7 +264,7 @@
...
@@ -264,7 +264,7 @@
.
c
(
'
item-not-found
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
item-not-found
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room does not (yet) exist
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room does not (yet) exist
"
);
...
@@ -281,7 +281,7 @@
...
@@ -281,7 +281,7 @@
.
c
(
'
service-unavailable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
.
c
(
'
service-unavailable
'
).
attrs
({
xmlns
:
'
urn:ietf:params:xml:ns:xmpp-stanzas
'
}).
nodeTree
;
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
var
view
=
this
.
chatboxesview
.
views
[
'
problematic@muc.localhost
'
];
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
converse
.
connection
.
muc
,
'
removeRoom
'
);
spyOn
(
view
,
'
render
ErrorMessage
'
).
andCallThrough
();
spyOn
(
view
,
'
show
ErrorMessage
'
).
andCallThrough
();
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
view
.
onChatRoomPresence
(
presence
,
{
'
nick
'
:
'
dummy
'
});
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
muc
.
removeRoom
).
toHaveBeenCalled
();
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room has reached it's maximum number of occupants
"
);
expect
(
view
.
$el
.
find
(
'
.chat-body p
'
).
text
()).
toBe
(
"
This room has reached it's maximum number of occupants
"
);
...
...
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