Преглед изворни кода

updates #161

* Fix typo which broke MUC file upload
* Remove unused method
* Move file input into li element
JC Brand пре 7 година
родитељ
комит
e0aaeb66ea
3 измењених фајлова са 2 додато и 14 уклоњено
  1. 1 1
      src/converse-muc-views.js
  2. 0 12
      src/converse-muc.js
  3. 1 1
      src/templates/toolbar_fileupload.html

+ 1 - 1
src/converse-muc-views.js

@@ -497,7 +497,7 @@
                 className: 'chatbox chatroom hidden',
                 is_chatroom: true,
                 events: {
-                    'change .input.fileupload': 'onFileSelection',
+                    'change input.fileupload': 'onFileSelection',
                     'click .close-chatbox-button': 'close',
                     'click .configure-chatroom-button': 'getAndRenderConfigurationForm',
                     'click .new-msgs-indicator': 'viewUnreadMessages',

+ 0 - 12
src/converse-muc.js

@@ -339,18 +339,6 @@
                     return jid + (nick !== null ? `/${nick}` : "");
                 },
                 
-                sendChatRoomFile (text, to) {
-                    const msgid = _converse.connection.getUniqueId();
-                    const stanza = $msg({
-                        'from': _converse.connection.jid,
-                        'to': to,
-                        'type': 'groupchat',
-                        'id': msgid
-                    }).c("body").t(text).up()
-                      .c("x", {'xmlns': Strophe.NS.OUTOFBAND}).c('url').t(text).up();
-                      _converse.connection.send(stanza);
-                },
-
                 sendChatState () {
                     /* Sends a message with the status of the user in this chat session
                      * as taken from the 'chat_state' attribute of the chat box.

+ 1 - 1
src/templates/toolbar_fileupload.html

@@ -1,4 +1,4 @@
-<input type="file" class="fileupload" multiple style="display:none"/>
 <li class="upload-file">
     <a class="fa fa-paperclip" title="{{{o.tooltip_upload_file}}}"></a>
+    <input type="file" class="fileupload" multiple style="display:none"/>
 </li>