[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) <qsm@odoo.com>
This commit is contained in:
Varun Raval
2019-05-23 11:12:58 +00:00
parent d785adba6c
commit bf70759e14
@@ -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');
});