diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-10-10 12:18:36 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-10-10 12:18:36 +0200 |
| commit | 4dd9a0529e79eccb7670a180c5d88fad144fa4c9 (patch) | |
| tree | a72f1a5057c7731cf1a5e37526b1cf0012692b84 /addons/base_import/static/src/xml/import.xml | |
| parent | f168998a49cbced240962f1aca86f2c89f665549 (diff) | |
[ADD] reload file button next to the file input, as webkit browsers and MSIE don't trigger change when a file input is re-set to thee same file
Using other events (e.g. 'click') is not kosher as the event is
triggered long before the file is picked, the alternative is to use
the File API and regularly check the file in the input to see if it's
been altered (by storing a crc) and re-pushing it if the hash is
different. Of course this has other issues (risks catching the file
mid-edition...)
A third alternative is, once a file has been uploaded, to clear and
re-insert the corresponding file input. This means the file input will
*always* be empty
bzr revid: xmo@openerp.com-20121010101836-qtqmcc5n5zblgmcp
Diffstat (limited to 'addons/base_import/static/src/xml/import.xml')
| -rw-r--r-- | addons/base_import/static/src/xml/import.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index adca0579f8f..902478468e1 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -24,6 +24,7 @@ <label t-attf-for="file_#{_id}" autofocus="autofocus">CSV File:</label> <input type="file" id-attf-id="file_#{_id}" name="file" class="oe_import_file"/> + <button type="button" class="oe_import_file_reload">Reload File</button> <div class="oe_import_with_file"> <a href="#" class="oe_import_toggle"> File Format Options…</a> |
