|
@@ -1207,7 +1207,6 @@
|
|
events: {
|
|
events: {
|
|
'click .close-chatbox-button': 'close',
|
|
'click .close-chatbox-button': 'close',
|
|
'click .toggle-chatbox-button': 'minimize',
|
|
'click .toggle-chatbox-button': 'minimize',
|
|
- 'click .view-vcard-button': 'renderVCard',
|
|
|
|
'keypress textarea.chat-textarea': 'keyPressed',
|
|
'keypress textarea.chat-textarea': 'keyPressed',
|
|
'click .toggle-smiley': 'toggleEmoticonMenu',
|
|
'click .toggle-smiley': 'toggleEmoticonMenu',
|
|
'click .toggle-smiley ul li': 'insertEmoticon',
|
|
'click .toggle-smiley ul li': 'insertEmoticon',
|
|
@@ -1271,33 +1270,6 @@
|
|
return this.showStatusMessage();
|
|
return this.showStatusMessage();
|
|
},
|
|
},
|
|
|
|
|
|
- renderVCard: function () {
|
|
|
|
- var $chat_body = this.$el.find('.chat-body');
|
|
|
|
- if (this.$el.find('.vcard-info').length) {
|
|
|
|
- return this.returnToChat();
|
|
|
|
- }
|
|
|
|
- $chat_body.children().addClass('hidden');
|
|
|
|
- $chat_body.append(converse.templates.vcard(
|
|
|
|
- _.extend(this.model.toJSON(), {
|
|
|
|
- label_return: __('Return to chat')
|
|
|
|
- })
|
|
|
|
- ));
|
|
|
|
- $chat_body.find('input[type=button]').on('click', this.returnToChat.bind(this));
|
|
|
|
- return this;
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- returnToChat: function (ev) {
|
|
|
|
- if (ev && ev.preventDefault) { ev.preventDefault(); }
|
|
|
|
- var $chat_body = this.$el.find('.chat-body');
|
|
|
|
- this.$el.find('.vcard-info').hide(
|
|
|
|
- function () {
|
|
|
|
- $(this).remove();
|
|
|
|
- $chat_body.children().removeClass('hidden');
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
- return this;
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
setWidth: function () {
|
|
setWidth: function () {
|
|
// If a custom width is applied (due to drag-resizing),
|
|
// If a custom width is applied (due to drag-resizing),
|
|
// then we need to set the width of the .chatbox element as well.
|
|
// then we need to set the width of the .chatbox element as well.
|