mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Adding JSDoc
This commit is contained in:
parent
e68dec0573
commit
b73ba2168c
@ -22,6 +22,9 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
|||||||
WCF.Icon.add('wcf.icon.toRight1', $('#chatForm .inputImage').attr('src'));
|
WCF.Icon.add('wcf.icon.toRight1', $('#chatForm .inputImage').attr('src'));
|
||||||
$('#chatInput').focus();
|
$('#chatInput').focus();
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Binds all the events needed for Tims Chat.
|
||||||
|
*/
|
||||||
bindEvents: function () {
|
bindEvents: function () {
|
||||||
$('.smiley').click($.proxy(function (event) {
|
$('.smiley').click($.proxy(function (event) {
|
||||||
this.insertText($(event.target).attr('alt'));
|
this.insertText($(event.target).attr('alt'));
|
||||||
@ -81,6 +84,11 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
|||||||
});
|
});
|
||||||
}, this));
|
}, this));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Changes the chat-room.
|
||||||
|
*
|
||||||
|
* @param object target
|
||||||
|
*/
|
||||||
changeRoom: function (target) {
|
changeRoom: function (target) {
|
||||||
window.history.replaceState({}, '', target.attr('href'));
|
window.history.replaceState({}, '', target.attr('href'));
|
||||||
|
|
||||||
@ -134,6 +142,11 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
|||||||
getMessages: function (id) {
|
getMessages: function (id) {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Appends the messages.
|
||||||
|
*
|
||||||
|
* @param array<object> messages
|
||||||
|
*/
|
||||||
handleMessages: function (messages) {
|
handleMessages: function (messages) {
|
||||||
for (message in messages) {
|
for (message in messages) {
|
||||||
message = messages[message];
|
message = messages[message];
|
||||||
@ -148,6 +161,12 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
|||||||
}
|
}
|
||||||
$('.chatMessageContainer').animate({scrollTop: $('.chatMessageContainer ul').height()}, 10000);
|
$('.chatMessageContainer').animate({scrollTop: $('.chatMessageContainer ul').height()}, 10000);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Inserts text into the chat-input.
|
||||||
|
*
|
||||||
|
* @param string text
|
||||||
|
* @param object options
|
||||||
|
*/
|
||||||
insertText: function (text, options) {
|
insertText: function (text, options) {
|
||||||
options = $.extend({
|
options = $.extend({
|
||||||
append: true,
|
append: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user