summaryrefslogtreecommitdiff
path: root/addons/website_quote/static/src/js/website_quotation.js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2015-10-01 16:53:26 +0200
committerNicolas Martinelli <nim@odoo.com>2015-10-01 17:01:23 +0200
commitdda5eb7dff15992f86c9d6925c8d7208a172de77 (patch)
tree84d5bb11cf9274a1970ca7a463c00d5ffe69e0d5 /addons/website_quote/static/src/js/website_quotation.js
parent86e50baefc1695c4cf2a18064f8e761a08481a7f (diff)
[FIX] website_quote: remove loading attribute if missing data
In commit bc43417b, a loading attribute is set on any submit button. The problem is that this attribute is the first thing to be set. Therefore, we cannot prevent its propagation. Since Bootstrap sets this 'loading' attribute in a setTimeout, we need to remove it in a setTimeout as well.
Diffstat (limited to 'addons/website_quote/static/src/js/website_quotation.js')
-rw-r--r--addons/website_quote/static/src/js/website_quotation.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js
index d1c38d85633..88948908295 100644
--- a/addons/website_quote/static/src/js/website_quotation.js
+++ b/addons/website_quote/static/src/js/website_quotation.js
@@ -79,6 +79,9 @@ if(!$('.o_website_quote').length) {
self.$('#signer').toggleClass('has-error', !signer_name);
self.$('#drawsign').toggleClass('panel-danger', is_empty).toggleClass('panel-default', !is_empty);
if (is_empty || ! signer_name){
+ setTimeout(function () {
+ self.$('button[type="submit"], a.a-submit').removeAttr('data-loading-text').button('reset');
+ })
return false;
}
ajax.jsonRpc("/quote/"+action[1], 'call', {