From bf70759e14947ba40bbb088c1f15853449495001 Mon Sep 17 00:00:00 2001 From: Varun Raval Date: Thu, 23 May 2019 07:20:46 +0000 Subject: [PATCH] [FIX] website_links: fix url of the landing page in link tracker The feature was broken by #28404 which made the JS make use of the "animations" system. Currently, on the website, we have an option 'Track this page' in promote section, which will give us the URL of the landing page. However, this option is not working and shows the default placeholder provided on the input. This commit will fix the issue. From now 'Track this page' option will get the URL of the landing page and it will be shown on input rather than the default placeholder value. task-1998160 closes #33603 Signed-off-by: Quentin Smetz (qsm) --- addons/website_links/static/src/js/website_links_menu.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/website_links/static/src/js/website_links_menu.js b/addons/website_links/static/src/js/website_links_menu.js index 4adf2b950af..b57a51a58d3 100644 --- a/addons/website_links/static/src/js/website_links_menu.js +++ b/addons/website_links/static/src/js/website_links_menu.js @@ -7,10 +7,10 @@ odoo.define('website_links.website_links_menu', function (require) { 'use strict'; -var sAnimations = require('website.content.snippets.animation'); +var Widget = require('web.Widget'); +var websiteNavbarData = require('website.navbar'); -sAnimations.registry.websiteLinksMenu = sAnimations.Class.extend({ - selector: '#o_website_links_share_page', +var WebsiteLinksMenu = Widget.extend({ /** * @override @@ -20,4 +20,7 @@ sAnimations.registry.websiteLinksMenu = sAnimations.Class.extend({ return this._super.apply(this, arguments); }, }); + +websiteNavbarData.websiteNavbarRegistry.add(WebsiteLinksMenu, '#o_website_links_share_page'); + });