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
f9bb840d
Commit
f9bb840d
authored
Jul 11, 2012
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code.
parent
2669a179
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
62 deletions
+0
-62
chat.js
chat.js
+0
-9
chatui.js
chatui.js
+0
-53
No files found.
chat.js
View file @
f9bb840d
var
helpers
=
(
function
(
helpers
)
{
var
helpers
=
(
function
(
helpers
)
{
helpers
.
oc
=
function
(
a
)
{
// Thanks to Jonathan Snook: http://snook.ca
var
o
=
{};
for
(
var
i
=
0
;
i
<
a
.
length
;
i
++
)
{
o
[
a
[
i
]]
=
''
;
}
return
o
;
};
helpers
.
hash
=
function
(
str
)
{
helpers
.
hash
=
function
(
str
)
{
// FIXME
// FIXME
if
(
str
==
'
online-users-container
'
)
{
if
(
str
==
'
online-users-container
'
)
{
...
...
chatui.js
View file @
f9bb840d
...
@@ -212,7 +212,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
...
@@ -212,7 +212,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
if
(
_
.
indexOf
(
this
.
chats
,
jid
)
==
-
1
)
{
if
(
_
.
indexOf
(
this
.
chats
,
jid
)
==
-
1
)
{
this
.
chats
.
push
(
jid
);
this
.
chats
.
push
(
jid
);
}
}
this
.
addChatToCookie
(
jid
);
};
};
ob
.
getChatbox
=
function
(
jid
,
callback
)
{
ob
.
getChatbox
=
function
(
jid
,
callback
)
{
...
@@ -266,44 +265,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
...
@@ -266,44 +265,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
ob
.
reorderChats
=
function
()
{
ob
.
reorderChats
=
function
()
{
};
};
ob
.
addChatToCookie
=
function
(
jid
)
{
var
cookie
=
jQuery
.
cookie
(
'
chats-open-
'
+
xmppchat
.
username
),
new_cookie
,
open_chats
=
[];
if
(
cookie
)
{
open_chats
=
cookie
.
split
(
'
|
'
);
}
if
(
!
(
jid
in
helpers
.
oc
(
open_chats
)))
{
// Update the cookie if this new chat is not yet in it.
open_chats
.
push
(
jid
);
new_cookie
=
open_chats
.
join
(
'
|
'
);
jQuery
.
cookie
(
'
chats-open-
'
+
xmppchat
.
username
,
new_cookie
,
{
path
:
'
/
'
});
console
.
log
(
'
updated cookie =
'
+
new_cookie
+
'
\n
'
);
}
};
ob
.
removeChatFromCookie
=
function
(
jid
)
{
var
cookie
=
jQuery
.
cookie
(
'
chats-open-
'
+
xmppchat
.
username
),
open_chats
=
[],
new_chats
=
[];
if
(
cookie
)
{
open_chats
=
cookie
.
split
(
'
|
'
);
}
for
(
var
i
=
0
;
i
<
open_chats
.
length
;
i
++
)
{
if
(
open_chats
[
i
]
!=
jid
)
{
new_chats
.
push
(
open_chats
[
i
]);
}
}
if
(
new_chats
.
length
)
{
jQuery
.
cookie
(
'
chats-open-
'
+
xmppchat
.
username
,
new_chats
.
join
(
'
|
'
),
{
path
:
'
/
'
});
}
else
{
jQuery
.
cookie
(
'
chats-open-
'
+
xmppchat
.
username
,
null
,
{
path
:
'
/
'
});
}
};
ob
.
addMessageToChatbox
=
function
(
event
)
{
ob
.
addMessageToChatbox
=
function
(
event
)
{
/* XXX: event.mtype should be 'xhtml' for XHTML-IM messages,
/* XXX: event.mtype should be 'xhtml' for XHTML-IM messages,
but I only seem to get 'text'.
but I only seem to get 'text'.
...
@@ -355,20 +316,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
...
@@ -355,20 +316,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
});
});
};
};
ob
.
closeChat
=
function
(
jid
)
{
var
chat_id
=
helpers
.
hash
(
jid
),
that
=
this
;
jQuery
(
'
#
'
+
chat_id
).
hide
(
'
fast
'
,
function
()
{
var
idx
=
that
.
chats
.
indexOf
(
jid
);
if
(
idx
!==
undefined
)
{
that
.
chats
.
splice
(
idx
,
1
);
}
that
.
removeChatFromCookie
(
jid
);
that
.
reorderChats
();
});
};
ob
.
keyPressed
=
function
(
ev
,
textarea
)
{
ob
.
keyPressed
=
function
(
ev
,
textarea
)
{
var
$textarea
=
jQuery
(
textarea
),
var
$textarea
=
jQuery
(
textarea
),
jid
=
$textarea
.
attr
(
'
data-recipient
'
),
// FIXME: bare jid
jid
=
$textarea
.
attr
(
'
data-recipient
'
),
// FIXME: bare 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