parent
37bd332897
commit
0d4603d80d
17
dist/converse.js
vendored
17
dist/converse.js
vendored
@ -59022,7 +59022,9 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
|
|||||||
'click .toggle-smiley': 'toggleEmojiMenu',
|
'click .toggle-smiley': 'toggleEmojiMenu',
|
||||||
'click .upload-file': 'toggleFileUpload',
|
'click .upload-file': 'toggleFileUpload',
|
||||||
'input .chat-textarea': 'inputChanged',
|
'input .chat-textarea': 'inputChanged',
|
||||||
'keydown .chat-textarea': 'keyPressed'
|
'keydown .chat-textarea': 'keyPressed',
|
||||||
|
'dragover .chat-textarea': 'onDragOver',
|
||||||
|
'drop .chat-textarea': 'onDrop'
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize() {
|
initialize() {
|
||||||
@ -59128,6 +59130,19 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
|
|||||||
this.model.sendFiles(evt.target.files);
|
this.model.sendFiles(evt.target.files);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onDragOver(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
},
|
||||||
|
|
||||||
|
onDrop(evt) {
|
||||||
|
/* There are no files to be dropped, this isn’t a file transfer
|
||||||
|
* operation.
|
||||||
|
*/
|
||||||
|
if (evt.dataTransfer.files.length == 0) return;
|
||||||
|
evt.preventDefault();
|
||||||
|
this.model.sendFiles(evt.dataTransfer.files);
|
||||||
|
},
|
||||||
|
|
||||||
async addFileUploadButton(options) {
|
async addFileUploadButton(options) {
|
||||||
const result = await _converse.api.disco.supports(Strophe.NS.HTTPUPLOAD, _converse.domain);
|
const result = await _converse.api.disco.supports(Strophe.NS.HTTPUPLOAD, _converse.domain);
|
||||||
|
|
||||||
|
@ -296,7 +296,9 @@ converse.plugins.add('converse-chatview', {
|
|||||||
'click .toggle-smiley': 'toggleEmojiMenu',
|
'click .toggle-smiley': 'toggleEmojiMenu',
|
||||||
'click .upload-file': 'toggleFileUpload',
|
'click .upload-file': 'toggleFileUpload',
|
||||||
'input .chat-textarea': 'inputChanged',
|
'input .chat-textarea': 'inputChanged',
|
||||||
'keydown .chat-textarea': 'keyPressed'
|
'keydown .chat-textarea': 'keyPressed',
|
||||||
|
'dragover .chat-textarea': 'onDragOver',
|
||||||
|
'drop .chat-textarea': 'onDrop',
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize () {
|
initialize () {
|
||||||
@ -398,6 +400,20 @@ converse.plugins.add('converse-chatview', {
|
|||||||
this.model.sendFiles(evt.target.files);
|
this.model.sendFiles(evt.target.files);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onDragOver (evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
},
|
||||||
|
|
||||||
|
onDrop (evt) {
|
||||||
|
/* There are no files to be dropped, this isn’t a file transfer
|
||||||
|
* operation.
|
||||||
|
*/
|
||||||
|
if (evt.dataTransfer.files.length == 0)
|
||||||
|
return;
|
||||||
|
evt.preventDefault();
|
||||||
|
this.model.sendFiles(evt.dataTransfer.files);
|
||||||
|
},
|
||||||
|
|
||||||
async addFileUploadButton (options) {
|
async addFileUploadButton (options) {
|
||||||
const result = await _converse.api.disco.supports(Strophe.NS.HTTPUPLOAD, _converse.domain);
|
const result = await _converse.api.disco.supports(Strophe.NS.HTTPUPLOAD, _converse.domain);
|
||||||
if (result.length) {
|
if (result.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user