summaryrefslogtreecommitdiff
path: root/addons/base_import/static
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2012-11-07 10:19:58 +0100
committerFabien Meghazi <fme@openerp.com>2012-11-07 10:19:58 +0100
commit185b32d7d570a23ce4e7cf209a20c8fc3dc826f5 (patch)
treebe78d428d3c60112a3e67aaa4be4d2c43b7fc281 /addons/base_import/static
parent13be6e322f4f855b798abc4aab1e29e58e376303 (diff)
parent1c5e8da2765e51b2c8bb49c6d1bf3c6b55c95dbf (diff)
[MERGE] trunk
bzr revid: fme@openerp.com-20121107091958-f3rqu7nc585umjwq
Diffstat (limited to 'addons/base_import/static')
-rw-r--r--addons/base_import/static/src/js/import.js10
-rw-r--r--addons/base_import/static/src/xml/import.xml4
2 files changed, 10 insertions, 4 deletions
diff --git a/addons/base_import/static/src/js/import.js b/addons/base_import/static/src/js/import.js
index 7069886aa12..d29452cc138 100644
--- a/addons/base_import/static/src/js/import.js
+++ b/addons/base_import/static/src/js/import.js
@@ -179,7 +179,8 @@ openerp.base_import = function (instance) {
//- File & settings change section
onfile_loaded: function () {
- this.$('.oe_import_button').prop('disabled', true);
+ this.$('.oe_import_button, .oe_import_file_reload')
+ .prop('disabled', true);
if (!this.$('input.oe_import_file').val()) { return; }
this.$el.removeClass('oe_import_preview oe_import_error');
@@ -189,7 +190,8 @@ openerp.base_import = function (instance) {
},
onpreviewing: function () {
var self = this;
- this.$('.oe_import_button').prop('disabled', true);
+ this.$('.oe_import_button, .oe_import_file_reload')
+ .prop('disabled', true);
this.$el.addClass('oe_import_with_file');
// TODO: test that write // succeeded?
this.$el.removeClass('oe_import_preview_error oe_import_error');
@@ -205,6 +207,7 @@ openerp.base_import = function (instance) {
},
onpreview_error: function (event, from, to, result) {
this.$('.oe_import_options').show();
+ this.$('.oe_import_file_reload').prop('disabled', false);
this.$el.addClass('oe_import_preview_error oe_import_error');
this.$('.oe_import_error_report').html(
QWeb.render('ImportView.preview.error', result));
@@ -212,7 +215,8 @@ openerp.base_import = function (instance) {
onpreview_success: function (event, from, to, result) {
this.$('.oe_import_import').removeClass('oe_highlight');
this.$('.oe_import_validate').addClass('oe_highlight');
- this.$('.oe_import_button').prop('disabled', false);
+ this.$('.oe_import_button, .oe_import_file_reload')
+ .prop('disabled', false);
this.$el.addClass('oe_import_preview');
this.$('table').html(QWeb.render('ImportView.preview', result));
diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml
index a121c15f8c8..0da75eb69b9 100644
--- a/addons/base_import/static/src/xml/import.xml
+++ b/addons/base_import/static/src/xml/import.xml
@@ -30,7 +30,9 @@
<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" title="Reload data to check changes.">
+ <button type="button" class="oe_import_file_reload"
+ disabled="disabled"
+ title="Reload data to check changes.">
<img src="/web/static/src/img/icons/gtk-refresh.png"/>
</button>
<div class="oe_import_with_file">