Remove the VCard rendering code.
Probably won't make it in next release.
This commit is contained in:
parent
43b9fa0fc8
commit
80d8b89797
28
converse.js
28
converse.js
@ -1207,7 +1207,6 @@
|
||||
events: {
|
||||
'click .close-chatbox-button': 'close',
|
||||
'click .toggle-chatbox-button': 'minimize',
|
||||
'click .view-vcard-button': 'renderVCard',
|
||||
'keypress textarea.chat-textarea': 'keyPressed',
|
||||
'click .toggle-smiley': 'toggleEmoticonMenu',
|
||||
'click .toggle-smiley ul li': 'insertEmoticon',
|
||||
@ -1271,33 +1270,6 @@
|
||||
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 () {
|
||||
// If a custom width is applied (due to drag-resizing),
|
||||
// then we need to set the width of the .chatbox element as well.
|
||||
|
@ -5,7 +5,6 @@
|
||||
<div class="chat-head chat-head-chatbox">
|
||||
<a class="chatbox-btn close-chatbox-button icon-close" title="{{info_close}}"></a>
|
||||
<a class="chatbox-btn toggle-chatbox-button icon-minus" title="{{info_minimize}}"></a>
|
||||
<a class="chatbox-btn view-vcard-button icon-eye" title="{{info_view}}"></a>
|
||||
<div class="chat-title">
|
||||
{[ if (url) { ]}
|
||||
<a href="{{url}}" target="_blank" class="user">
|
||||
|
Loading…
Reference in New Issue
Block a user