Commit 1c5d6d8a authored by JC Brand's avatar JC Brand

Style the online contacts box and the private chat boxes.

parent 65e0ad4d
...@@ -41,10 +41,10 @@ var xmppchat = (function ($, console) { ...@@ -41,10 +41,10 @@ var xmppchat = (function ($, console) {
} }
} }
if (open_chats === 0) { if (open_chats === 0) {
chatbox.css('right', '20px'); chatbox.css('right', '15px');
} }
else { else {
width = (open_chats)*(225+7)+20; width = (open_chats)*(225+7)+15;
chatbox.css('right', width+'px'); chatbox.css('right', width+'px');
} }
}; };
...@@ -70,7 +70,11 @@ var xmppchat = (function ($, console) { ...@@ -70,7 +70,11 @@ var xmppchat = (function ($, console) {
}); });
}; };
obj.handleCollectionRetrieval = function (iq) { obj.handleError = function (response) {
console.log(response);
};
obj.handleCollectionRetrieval = function (response) {
// Get the last collection. // Get the last collection.
return false; return false;
}; };
...@@ -89,8 +93,7 @@ var xmppchat = (function ($, console) { ...@@ -89,8 +93,7 @@ var xmppchat = (function ($, console) {
.c('set', {'xmlns': 'http://jabber.org/protocol/rsm'}) .c('set', {'xmlns': 'http://jabber.org/protocol/rsm'})
.c('max') .c('max')
.t('30'); .t('30');
jarnxmpp.connection.addHandler(this.handleCollectionRetrieval, uri, "iq"); jarnxmpp.connection.sendIQ(iq, this.handleCollectionRetrieval, this.handleError);
jarnxmpp.connection.send(iq);
}; };
obj.createChatBox = function (jid) { obj.createChatBox = function (jid) {
...@@ -184,10 +187,10 @@ var xmppchat = (function ($, console) { ...@@ -184,10 +187,10 @@ var xmppchat = (function ($, console) {
var chatbox = $("#"+this.hash(this.chats[i])); var chatbox = $("#"+this.hash(this.chats[i]));
if (chatbox.css('display') != 'none') { if (chatbox.css('display') != 'none') {
if (index === 0) { if (index === 0) {
chatbox.css('right', '20px'); chatbox.css('right', '15px');
} }
else { else {
width = (index)*(225+7)+20; width = (index)*(225+7)+15;
chatbox.css('right', width+'px'); chatbox.css('right', width+'px');
} }
index++; index++;
...@@ -402,3 +405,6 @@ $(document).bind('jarnxmpp.connected', function() { ...@@ -402,3 +405,6 @@ $(document).bind('jarnxmpp.connected', function() {
} }
}); });
$(document).ready(function () {
$('ul.tabs').tabs('div.panes > div');
});
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