mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Adding insertText method
This commit is contained in:
parent
df68fbc889
commit
f8024bbf2b
@ -18,9 +18,9 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
||||
this.bindEvents();
|
||||
},
|
||||
bindEvents: function () {
|
||||
$('.smiley').click(function (event) {
|
||||
alert($(event.target).attr('alt'));
|
||||
});
|
||||
$('.smiley').click($.proxy(function (event) {
|
||||
this.insertText($(event.target).attr('alt'));
|
||||
}, this));
|
||||
|
||||
// $(window).bind('beforeunload', function() {
|
||||
// return false;
|
||||
@ -116,10 +116,14 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
|
||||
}
|
||||
$('.chatMessage').animate({scrollTop: $('.chatMessage ul').height()}, 10000);
|
||||
},
|
||||
insertText: function (text) {
|
||||
// TODO: Add options here
|
||||
$('#chatInput').val(text);
|
||||
},
|
||||
toggleUserMenu: function (target) {
|
||||
liUserID = '#' + target.parent().attr('id');
|
||||
if ($(liUserID).hasClass('activeMenuItem')) {
|
||||
$(liUserID + ' .chatUserMenu').wcfBlindOut('vertical', function() {
|
||||
$(liUserID + ' .chatUserMenu').wcfBlindOut('vertical', function () {
|
||||
$(liUserID).removeClass('activeMenuItem');
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user