Commit 385eb834 authored by JC Brand's avatar JC Brand

Rewrote more functionality to use backbone.js

parent d82e7261
This diff is collapsed.
...@@ -98,9 +98,6 @@ xmppchat.UI = (function (xmppUI, $, console) { ...@@ -98,9 +98,6 @@ xmppchat.UI = (function (xmppUI, $, console) {
}); });
}; };
ob.renderChatbox = function (bare_jid, callback) {
};
ob.insertCollectionMessages = function ($chat, bare_jid, recipient_name) { ob.insertCollectionMessages = function ($chat, bare_jid, recipient_name) {
xmppchat.Collections.getLastMessages(bare_jid, function (result) { xmppchat.Collections.getLastMessages(bare_jid, function (result) {
$('body').append($chat); $('body').append($chat);
...@@ -533,21 +530,6 @@ $(document).ready(function () { ...@@ -533,21 +530,6 @@ $(document).ready(function () {
} }
}); });
$(document).bind('xmppchat.roster_updated', function (event) {
$('#xmpp-contacts').empty();
$(xmppchat.Roster.getCached()).each(function (idx, contact) {
if (contact.subscription !== 'none') {
var user_id = Strophe.getNodeFromJid(contact.jid),
bare_jid = Strophe.getBareJidFromJid(contact.jid);
// FIXME: We should store the contact name on the jabber server!
xmppchat.Presence.getUserInfo(user_id, function (data) {
xmppchat.UI.addUserToRosterUI(user_id, bare_jid, data.fullname, 'offline');
});
}
});
});
$(document).unbind('jarnxmpp.message'); $(document).unbind('jarnxmpp.message');
$(document).bind('jarnxmpp.message', function (event) { $(document).bind('jarnxmpp.message', function (event) {
xmppchat.UI.addMessageToChatbox(event); xmppchat.UI.addMessageToChatbox(event);
...@@ -562,11 +544,6 @@ $(document).ready(function () { ...@@ -562,11 +544,6 @@ $(document).ready(function () {
xmppchat.UI.updateOnPresence(jid, status, presence); xmppchat.UI.updateOnPresence(jid, status, presence);
}); });
$('a.user-details-toggle').live('click', function (e) {
e.preventDefault();
xmppchat.UI.getChatbox($(this).parent().attr('data-recipient'));
});
$('textarea.chat-textarea').live('keypress', function (ev) { $('textarea.chat-textarea').live('keypress', function (ev) {
xmppchat.UI.keyPressed(ev, this); xmppchat.UI.keyPressed(ev, this);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment