]> git.babelmonkeys.de Git - xmppchat.git/commitdiff
Fade out Bubbles and handle IQs
authorFlorian Zeitz <florob@babelmonkeys.de>
Sun, 30 Nov 2008 14:49:08 +0000 (15:49 +0100)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sun, 30 Nov 2008 14:49:08 +0000 (15:49 +0100)
* Bubbles now fade out on closing them using the .hide('slow') function
  from jQuery
* IQs are now answered (not fullfilling a SHOULD though)

js/main.js

index 857dc258418421771bf40b6d4582fdb4c608e962..2647add49e260805a76efdd89647eb1714a3b01b 100644 (file)
@@ -63,7 +63,7 @@ function addBubble(nick) {
        if (!document.getElementById(id)) {
                var div = '';
                div += '<div id="' + id + '" class="bubble" onmousedown="startDrag(this)" style="display: none">';
-               div += '<a href="#" onclick="' +"document.getElementById('" + id + "').style.display='none'" + '">Close</a>';
+               div += '<a href="#" onclick="' +"$('#" + id + "').hide('slow')" + '">Close</a>';
                div += '<div id="' + id + 'Chat" class="bubbleChat"></div>';
                div += '<form id="' + id + 'Form" class="bubbleForm" onsubmit="return sendChatMessage(this,' + "'" + nick + "');" + '" action="#">';
                div += '<input type="text" name="text" id="' + id + 'Text" class="bubbleForm"/>';
@@ -123,9 +123,10 @@ function handleIQ(iq) {
        var to = iq.getAttribute('to');
        var from = iq.getAttribute('from');
        var type = iq.getAttribute('type');
-       var content = iq.childNodes;
 
-       var reply = $iq({to: from, from: to, type: 'error'}).cnode(content).up().c('error', {type: 'cancel'}).c('feature-not-implemented', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'});
+       //FIXME: Clients SHOULD send the content of the original stanza back for analysis
+
+       var reply = $iq({to: from, from: to, type: 'error'}).c('error', {type: 'cancel'}).c('feature-not-implemented', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'});
 
        connection.send(reply.tree());