Browse Source
Merge pull request #971 from Studio73/10.0-web_drop_target_multi
Merge pull request #971 from Studio73/10.0-web_drop_target_multi
[IMP] web_drop_target: Upload multiple filespull/1300/head
Simone Orsi
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 144 additions and 39 deletions
-
2web_drop_target/README.rst
-
6web_drop_target/__manifest__.py
-
3web_drop_target/readme/CONTRIBUTORS.rst
-
5web_drop_target/readme/DESCRIPTION.rst
-
4web_drop_target/readme/DEVELOP.rst
-
5web_drop_target/readme/ROADMAP.rst
-
7web_drop_target/readme/USAGE.rst
-
BINweb_drop_target/static/description/screenshot.png
-
0web_drop_target/static/src/css/web_drop_target.css
-
107web_drop_target/static/src/js/web_drop_target.js
-
19web_drop_target/static/src/less/web_drop_target.less
-
17web_drop_target/static/src/xml/widgets.xml
-
2web_drop_target/views/templates.xml
@ -0,0 +1,3 @@ |
|||||
|
* Holger Brunn <hbrunn@therp.nl> |
||||
|
* Pablo Fuentes <pablo@studio73.es> |
||||
|
* Akim Juillerat <akim.juillerat@camptocamp.com> |
@ -0,0 +1,5 @@ |
|||||
|
This module extends the functionality of the web client to support dropping local files into the web client. |
||||
|
|
||||
|
By default, an attachment will be created when dropping a file on a form. |
||||
|
|
||||
|
Further, this module is meant as a base drag&drop module supporting other actions after some file is dropped so that other modules can add more features. |
@ -0,0 +1,4 @@ |
|||||
|
Libraries |
||||
|
--------- |
||||
|
|
||||
|
* `base64js <https://raw.githubusercontent.com/beatgammit/base64-js>`_. |
@ -0,0 +1,5 @@ |
|||||
|
* dropping on list or kanban views would be nice too |
||||
|
* handle multiple files |
||||
|
* add an upload progress meter for huge files |
||||
|
* trigger custom events about different stages of the drop operation for other addons to hook in |
||||
|
* Install document module to display attachments in the sidebar |
@ -0,0 +1,7 @@ |
|||||
|
To use this module, you need to: |
||||
|
|
||||
|
#. drag a file from your local computer onto an Odoo form view |
||||
|
#. it should become an attachment of the currently opened record |
||||
|
|
||||
|
.. image:: /web_drop_target/static/description/screenshot.png |
||||
|
:alt: Screenshot |
After Width: 1376 | Height: 983 | Size: 220 KiB |
@ -0,0 +1,19 @@ |
|||||
|
.o_content { |
||||
|
.o_drag_over{ |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
background-color: rgba(255,255,255,0.6); |
||||
|
border: 1px dashed #4c4c4c; |
||||
|
pointer-events: none; |
||||
|
.o_drag_over_content{ |
||||
|
position: relative; |
||||
|
top: 50%; |
||||
|
transform: translate(0%, -50%); |
||||
|
width: 100%; |
||||
|
text-align: center; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
|
||||
|
<template> |
||||
|
<t t-name="web_drop_target.drop_overlay"> |
||||
|
<div class="o_drag_over"> |
||||
|
<div class="o_drag_over_content"> |
||||
|
<div> |
||||
|
<i class="fa fa-file-o fa-5x" aria-hidden="true"></i> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h2>Drop your files here</h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</t> |
||||
|
</template> |
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue