summaryrefslogtreecommitdiff
path: root/addons/base_import/static/src/js/import.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/base_import/static/src/js/import.js')
-rw-r--r--addons/base_import/static/src/js/import.js10
1 files changed, 7 insertions, 3 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));