Przeglądaj źródła

Remove the VCard rendering code.

Probably won't make it in next release.
JC Brand 9 lat temu
rodzic
commit
80d8b89797
2 zmienionych plików z 0 dodań i 29 usunięć
  1. 0 28
      converse.js
  2. 0 1
      src/templates/chatbox.html

+ 0 - 28
converse.js

@@ -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.

+ 0 - 1
src/templates/chatbox.html

@@ -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">