[FIX] website_mail: "save and continue" button
authorAjay Patel <apa@openerp.com>
Tue, 26 Aug 2014 05:11:52 +0000 (10:41 +0530)
committerRichard Mathot <rim@openerp.com>
Mon, 6 Oct 2014 08:46:35 +0000 (10:46 +0200)
addons/website_mail/static/src/js/website_email_designer.js
addons/website_mail/views/website_email_designer.xml

index 9f0692b..b0573c1 100644 (file)
             $('#email_body_html').addClass('oe_dirty');
 
             openerp.website.editor_bar.edit();
-            event.preventDefault();
+            ev.preventDefault();
         });
     });
 
+    website.EditorBar.include({
+        edit: function () {
+            this._super();
+            $('body').on('click','#save_and_continue',_.bind(this.save_and_continue));
+        },
+        save_and_continue: function() {
+            openerp.website.editor_bar.save();
+            window.location = $("#save_and_continue").attr("href");
+        }
+    });
 })();
index f95b0a3..f9acf48 100644 (file)
@@ -38,7 +38,7 @@
                 </div>
             </div>
             <div id="email_designer" class="mb32" t-att-style="mode != 'email_designer' and 'display: none' or ''">
-                <a class="mt16 btn btn-primary pull-right" 
+                <a class="mt16 btn btn-primary pull-right" id="save_and_continue"
                   t-attf-href="/web#return_label=Website&amp;model=#{model}&amp;id=#{res_id}&amp;view_type=form">
                     Save and Continue
                 </a>