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
2669a179
Commit
2669a179
authored
Jul 11, 2012
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a controlbox model and view and fixed ordering of chatboxes.
parent
56d6c39d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
201 additions
and
87 deletions
+201
-87
chat.js
chat.js
+201
-48
chatui.js
chatui.js
+0
-39
No files found.
chat.js
View file @
2669a179
This diff is collapsed.
Click to expand it.
chatui.js
View file @
2669a179
...
...
@@ -368,25 +368,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
});
};
ob
.
restoreOpenChats
=
function
()
{
/* Check the open-chats cookie and re-open all the chatboxes it mentions.
* We need to wait for current chatbox creation to finish before we create the
* next, so we use a task buffer to make sure the next task is only
* executed after the previous is done.
*/
var
cookie
=
jQuery
.
cookie
(
'
chats-open-
'
+
xmppchat
.
username
),
open_chats
=
[];
jQuery
.
cookie
(
'
chats-open-
'
+
xmppchat
.
username
,
null
,
{
path
:
'
/
'
});
if
(
cookie
)
{
open_chats
=
cookie
.
split
(
'
|
'
);
// FIXME: Change this so that the online contacts box is always created first.
for
(
var
i
=
0
;
i
<
open_chats
.
length
;
i
++
)
{
xmppchat
.
Taskbuffer
.
tasks
.
push
({
'
that
'
:
this
,
'
method
'
:
this
.
getChatbox
,
'
parameters
'
:[
open_chats
[
i
]]});
}
xmppchat
.
Taskbuffer
.
handleTasks
();
}
};
ob
.
keyPressed
=
function
(
ev
,
textarea
)
{
var
$textarea
=
jQuery
(
textarea
),
...
...
@@ -482,24 +463,8 @@ xmppchat.UI = (function (xmppUI, $, console) {
// Event handlers
// --------------
$
(
document
).
ready
(
function
()
{
var
chatdata
=
jQuery
(
'
span#babble-client-chatdata
'
),
$toggle
=
$
(
'
a#toggle-online-users
'
);
xmppchat
.
username
=
chatdata
.
attr
(
'
username
'
);
xmppchat
.
base_url
=
chatdata
.
attr
(
'
base_url
'
);
xmppchat
.
UI
.
createStatusSelectWidget
();
$toggle
.
unbind
(
'
click
'
);
$toggle
.
bind
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
if
(
$
(
"
div#online-users-container
"
).
is
(
'
:visible
'
))
{
xmppchat
.
UI
.
closeChat
(
'
online-users-container
'
);
}
else
{
xmppchat
.
UI
.
getChatbox
(
'
online-users-container
'
);
}
});
$
(
document
).
unbind
(
'
jarnxmpp.message
'
);
$
(
document
).
bind
(
'
jarnxmpp.message
'
,
function
(
event
)
{
xmppchat
.
UI
.
addMessageToChatbox
(
event
);
...
...
@@ -518,10 +483,6 @@ $(document).ready(function () {
xmppchat
.
UI
.
keyPressed
(
ev
,
this
);
});
$
(
'
a.close-controlbox-button
'
).
live
(
'
click
'
,
function
(
ev
)
{
xmppchat
.
UI
.
closeChat
(
'
online-users-container
'
);
});
$
(
'
ul.tabs
'
).
tabs
(
'
div.panes > div
'
);
$
(
'
#fancy-xmpp-status-select
'
).
click
(
function
(
ev
)
{
...
...
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