|
|
|
@ -136,8 +136,7 @@ $(function () { |
|
|
|
|
$('#chat-users').html(html); |
|
|
|
|
}, |
|
|
|
|
onPreviewListener: function () { |
|
|
|
|
$ |
|
|
|
|
.post(ChChat._ajaxUrl, { |
|
|
|
|
$.post(ChChat._ajaxUrl, { |
|
|
|
|
action: 'preview', |
|
|
|
|
'message': $('textarea#chat-writer').val() |
|
|
|
|
}) |
|
|
|
@ -159,8 +158,7 @@ $(function () { |
|
|
|
|
var self = this; |
|
|
|
|
self.disabled = true; |
|
|
|
|
|
|
|
|
|
$ |
|
|
|
|
.post(ChChat._ajaxUrl, { |
|
|
|
|
$.post(ChChat._ajaxUrl, { |
|
|
|
|
action: 'write', |
|
|
|
|
message: $('textarea#chat-writer').val(), |
|
|
|
|
friend: ChChat.currentFriend |
|
|
|
@ -181,8 +179,7 @@ $(function () { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
$ |
|
|
|
|
.get(ChChat._ajaxUrl, { |
|
|
|
|
$.get(ChChat._ajaxUrl, { |
|
|
|
|
action: 'reset', |
|
|
|
|
friend: ChChat.currentFriend |
|
|
|
|
}) |
|
|
|
@ -219,13 +216,13 @@ $(function () { |
|
|
|
|
|
|
|
|
|
$('body').on('click', '#chat-reset', ChChat.onResetListener); |
|
|
|
|
$('#preview').on('click', ChChat.onPreviewListener); |
|
|
|
|
|
|
|
|
|
$('#emojis').on('click', function () { |
|
|
|
|
$('[data-toggle="tab"][href="#tab1"]').show().tab('show'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('textarea#chat-writer').emojiarea({ |
|
|
|
|
button: '#emojis' |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('textarea#chat-writer').emojiarea({button: '#emojis'}); |
|
|
|
|
|
|
|
|
|
$('body').delay(1500).find('.emoji-wysiwyg-editor').textcomplete([{ |
|
|
|
|
match: /\B:([\-+\w]*)$/, |
|
|
|
@ -271,6 +268,7 @@ $(function () { |
|
|
|
|
}], {}); |
|
|
|
|
|
|
|
|
|
$('button#chat-send-message').on('click', ChChat.onSendMessageListener); |
|
|
|
|
|
|
|
|
|
$('#chat-users').on('click', 'div.chat-user', function (e) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
var jSelf = $(this), |
|
|
|
|