Commit 80d8b897 authored by JC Brand's avatar JC Brand

Remove the VCard rendering code.

Probably won't make it in next release.
parent 43b9fa0f
...@@ -1207,7 +1207,6 @@ ...@@ -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 @@ ...@@ -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.
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<div class="chat-head chat-head-chatbox"> <div class="chat-head chat-head-chatbox">
<a class="chatbox-btn close-chatbox-button icon-close" title="{{info_close}}"></a> <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 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"> <div class="chat-title">
{[ if (url) { ]} {[ if (url) { ]}
<a href="{{url}}" target="_blank" class="user"> <a href="{{url}}" target="_blank" class="user">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment