diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-10-01 19:18:14 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-10-01 19:18:14 +0200 |
| commit | 709c9868de7c4ac4985ed4e0055ae3e3e49742ad (patch) | |
| tree | e90227a947bddf47b3043fcbe8b99529a22aa7dd /addons/website_quote/static/src/js | |
| parent | 85f26244a71a0b9a7faa283d6d24fdde6bae899a (diff) | |
| parent | e8831932464814ed5f9e3a0af33f98891a466417 (diff) | |
[MERGE] forward port of branch 8.0 up to e883193
Diffstat (limited to 'addons/website_quote/static/src/js')
| -rw-r--r-- | addons/website_quote/static/src/js/website_quotation.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js index 1e9203b5df6..37f5e2a9a62 100644 --- a/addons/website_quote/static/src/js/website_quotation.js +++ b/addons/website_quote/static/src/js/website_quotation.js @@ -1,4 +1,9 @@ -$(document).ready(function () { +(function () { +'use strict'; +var website = openerp.website; + +website.if_dom_contains('div.o_website_quote', function () { + $('a.js_update_line_json').on('click', function (ev) { ev.preventDefault(); var $link = $(ev.currentTarget); @@ -61,7 +66,7 @@ $(document).ready(function () { $('#modelaccept').modal('hide'); window.location.href = '/quote/'+order_id[1]+'/'+token+'?message=3'; }); - return false + return false; }); // automatically generate a menu from h1 and h2 tag in content @@ -71,6 +76,7 @@ $(document).ready(function () { var sub_ul = null; $("[id^=quote_header_], [id^=quote_]", $container).attr("id", ""); $("h1, h2", $container).each(function() { + var id; switch (this.tagName.toLowerCase()) { case "h1": id = _.uniqueId('quote_header_'); @@ -90,5 +96,6 @@ $(document).ready(function () { break; } }); - }); + +}()); |
