summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2013-11-06 16:24:12 +0100
committerXavier Morel <xmo@openerp.com>2013-11-06 16:24:12 +0100
commit20899155c5881f2ca1a576b01fb68da876e6e2a9 (patch)
treebb1ca7a64fe4ac6facaddd2cc88d07e2a0af8c67 /addons/website/static/src/js/website.editor.js
parent21ffca33c524ce063f958a29343eb10b46e4a32b (diff)
[IMP] during image upload, disable save button
hide it and replace it with a button telling the user what we're currently doing (uploading the image). Leave the possibility of discarding the whole thing and going away though. bzr revid: xmo@openerp.com-20131106152412-eb283vghb18aafyr
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 734d4b0606d..b23ccf7a9f0 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -1030,6 +1030,7 @@
}),
start: function () {
+ this.$('.modal-footer [disabled]').text("Uploading…");
var $options = this.$('.image-style').children();
this.image_styles = $options.map(function () { return this.value; }).get();
@@ -1065,6 +1066,7 @@
},
file_selection: function () {
+ this.$el.addClass('nosave');
this.$('button.filepicker').removeClass('btn-danger btn-success');
var self = this;
@@ -1087,6 +1089,7 @@
this.set_image(url);
},
preview_image: function () {
+ this.$el.removeClass('nosave');
var image = this.$('input.url').val();
if (!image) { return; }