New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MERGE][IMP] mail, web: drag/drop files in conversations #18914

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
8 participants
@dpr-odoo
Contributor

dpr-odoo commented Aug 18, 2017

This merge adds the support of drag/drop files in a conversation
(discuss, document chatter and chat windows).

It also adds helper functions to simulate drag/drop with files in test
environments.

Task-ID 32469

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch 4 times, most recently from a6346cb to 92f8c05 Aug 18, 2017

@dreispt

This comment has been minimized.

Contributor

dreispt commented Aug 18, 2017

Hmm, not working yet:

image

@C3POdoo C3POdoo added the RD label Aug 18, 2017

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch 4 times, most recently from 0942994 to 4b7bfff Aug 18, 2017

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch from 4b7bfff to b6d66f1 Sep 11, 2017

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch from b6d66f1 to 46e82bb Oct 27, 2017

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch 2 times, most recently from f4664d3 to 90d949e Nov 10, 2017

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch from 90d949e to 02d4415 Jan 23, 2018

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch from 02d4415 to e2cb611 Jan 31, 2018

@abh-odoo abh-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch 3 times, most recently from f590c7f to fafdbd9 Feb 1, 2018

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch 4 times, most recently from 5908d22 to 11967db Feb 26, 2018

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch 2 times, most recently from 9fb0c62 to 7563ce1 Mar 14, 2018

@hmo-odoo hmo-odoo added the Services label Mar 20, 2018

@dpr-odoo dpr-odoo force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch 4 times, most recently from ffa653b to de18f41 Mar 21, 2018

@alexkuhn alexkuhn changed the title from [MERGE][IMP] mail, web: drag/drop file attachment in conversation to [MERGE][IMP] mail, web: drag/drop files in conversations Nov 26, 2018

dpr-odoo and others added some commits Jul 25, 2018

[IMP] mail: Allowing drag/drop files/images on mail composer
By this commit user can upload attachments by drag and drop in chatter composer.
This feature can be used from discuss UI, chat windows and form view chatter.

Before this commit chatter unlinks the attachment if another attachment uploaded
with same name. Criteria for removing duplicate attachment is changed with this
commit. Now it will remove the attachment based on name and size of attachment.
The reason for this change is, when you upload image with same name from different
directory with old condition it was not possible to attach more then one image/file
of same name.

Related to task #32469
Closes #18914
[ADD] web:tests: test utils for drag/drop files
This commit adds test helper functions to drag and drop
files:

- `createFile`: create a file that can be used for drag and
  drop in tests.
- `dragoverFile`: to drag a file created from `createFile`
  over a DOM element.
- `dropFile`: to drop a file created from `createFile` on
  a DOM element.

These utility functions are available from `testUtils.file`.

Example of usage:

```js
var testUtils = require('web.test_utils');
testUtils.file.createFile({
	name: 'text.txt',
	content: 'hello, world',
	contentType: 'text/plain',
}).then(function (file) {
	testUtils.file.dragoverFile($el, file);
	testUtils.file.dropFile($el, file);
});
```

@alexkuhn alexkuhn force-pushed the odoo-dev:master-discuss_file_drag_drop-dpr branch from f7d9cb5 to 0377ae9 Nov 26, 2018

@robodoo robodoo added r+ 👌 and removed CI 🤖 r+ 👌 labels Nov 26, 2018

@alexkuhn

This comment has been minimized.

Contributor

alexkuhn commented Nov 26, 2018

robodoo r-

@robodoo robodoo removed the r+ 👌 label Nov 26, 2018

@alexkuhn

This comment has been minimized.

Contributor

alexkuhn commented Nov 26, 2018

robodoo r+

@robodoo

This comment has been minimized.

Contributor

robodoo commented Nov 26, 2018

I'm sorry, @alexkuhn. Retry makes no sense when the PR is not in error.

@odoo odoo deleted a comment from robodoo Nov 26, 2018

@odoo odoo deleted a comment from robodoo Nov 26, 2018

@robodoo

This comment has been minimized.

Contributor

robodoo commented Nov 26, 2018

I'm sorry, @alexkuhn. This PR is already reviewed, reviewing it again is useless.

robodoo pushed a commit that referenced this pull request Nov 26, 2018

[IMP] mail: Allowing drag/drop files/images on mail composer
By this commit user can upload attachments by drag and drop in chatter composer.
This feature can be used from discuss UI, chat windows and form view chatter.

Before this commit chatter unlinks the attachment if another attachment uploaded
with same name. Criteria for removing duplicate attachment is changed with this
commit. Now it will remove the attachment based on name and size of attachment.
The reason for this change is, when you upload image with same name from different
directory with old condition it was not possible to attach more then one image/file
of same name.

Related to task #32469
Closes #18914

robodoo added a commit that referenced this pull request Nov 26, 2018

[MERGE][IMP] mail, web: drag/drop files in conversations
This merge adds the support of drag/drop files in a conversation
(discuss, document chatter and chat windows).

It also adds helper functions to simulate drag/drop with files in test
environments.

Task-ID 32469

closes #18914
@robodoo

This comment has been minimized.

Contributor

robodoo commented Nov 26, 2018

Merged, thanks!

@robodoo robodoo closed this Nov 26, 2018

@alexkuhn alexkuhn deleted the odoo-dev:master-discuss_file_drag_drop-dpr branch Nov 26, 2018

arbaes added a commit to odoo-dev/odoo that referenced this pull request Nov 28, 2018

[IMP] mail: Allowing drag/drop files/images on mail composer
By this commit user can upload attachments by drag and drop in chatter composer.
This feature can be used from discuss UI, chat windows and form view chatter.

Before this commit chatter unlinks the attachment if another attachment uploaded
with same name. Criteria for removing duplicate attachment is changed with this
commit. Now it will remove the attachment based on name and size of attachment.
The reason for this change is, when you upload image with same name from different
directory with old condition it was not possible to attach more then one image/file
of same name.

Related to task #32469
Closes odoo#18914

arbaes added a commit to odoo-dev/odoo that referenced this pull request Dec 4, 2018

[IMP] mail: Allowing drag/drop files/images on mail composer
By this commit user can upload attachments by drag and drop in chatter composer.
This feature can be used from discuss UI, chat windows and form view chatter.

Before this commit chatter unlinks the attachment if another attachment uploaded
with same name. Criteria for removing duplicate attachment is changed with this
commit. Now it will remove the attachment based on name and size of attachment.
The reason for this change is, when you upload image with same name from different
directory with old condition it was not possible to attach more then one image/file
of same name.

Related to task #32469
Closes odoo#18914
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment