From 226a6a9e677b1ebded9240e181cc2ea83fa49d72 Mon Sep 17 00:00:00 2001 From: Vincent Schippefilt Date: Wed, 6 Mar 2019 14:02:33 +0100 Subject: [REF] website: adapt code after jQuery update Part of task 1896658 Co-authored-by: Aaron Bohy Co-authored-by: Christophe Matthieu Co-authored-by: Mathieu Duckerts-Antoine Co-authored-by: David Monjoie Co-authored-by: Martin Geubelle Co-authored-by: svs-odoo Co-authored-by: Vincent Schippefilt --- addons/website/static/src/js/content/website_root.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/website/static/src/js/content/website_root.js') diff --git a/addons/website/static/src/js/content/website_root.js b/addons/website/static/src/js/content/website_root.js index e1a7be21487..9f16c94b38b 100644 --- a/addons/website/static/src/js/content/website_root.js +++ b/addons/website/static/src/js/content/website_root.js @@ -127,12 +127,12 @@ var WebsiteRoot = publicRootData.PublicRoot.extend({ object: $data.data('object'), }, }) - .done(function (result) { + .then(function (result) { $data.toggleClass("css_unpublished css_published"); $data.find('input').prop("checked", result); $data.parents("[data-publish]").attr("data-publish", +result ? 'on' : 'off'); }) - .fail(function (err, data) { + .guardedCatch(function (err, data) { return new Dialog(self, { title: data.data ? data.data.arguments[0] : "", $content: $('
', { -- cgit v1.2.3