[FIX] Bundlification remains (Fixes #2463)
[odoo/odoo.git] / addons / website_mail / static / src / js / website_email_designer.js
1 (function () {
2     'use strict';
3     var website = openerp.website;
4
5     website.if_dom_contains('#email_designer', function () {
6         website.snippet.BuildingBlock.include({
7             _get_snippet_url: function () {
8                 return '/website_mail/snippets';
9             }
10         });
11
12         $('.js_template_set').click(function(ev) {
13             // Copy the template to the body of the email
14             $('#email_designer').show();
15             $('#email_template').hide();
16             $(".js_content", $(this).parent()).children().clone().appendTo('#email_body');
17             $(".js_content", $(this).parent()).children().clone().appendTo('#email_body_html');
18             $('#email_body').addClass('oe_dirty');
19             $('#email_body_html').addClass('oe_dirty');
20
21             openerp.website.editor_bar.edit();
22             event.preventDefault();
23         });
24     });
25
26 })();